diff --git a/hwe/func.php b/hwe/func.php index 258a3e42..6987d794 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -1823,13 +1823,16 @@ function deleteNation(General $lord, bool $applyDB): array // 전 장수 재야로 foreach ($nationGeneralList as $general) { - $general->setInheritancePoint( - InheritanceKey::max_belong, - max( - $general->getVar('belong'), - $general->getInheritancePoint(InheritanceKey::max_belong) ?? 0 - ) - ); + if($general->getNPCType() < 2){ + $general->setAuxVar( + InheritanceKey::max_belong->value, + max( + $general->getVar('belong'), + $general->getInheritancePoint(InheritanceKey::max_belong) ?? 0 + ) + ); + } + $general->setVar('belong', 0); $general->setVar('troop', 0); $general->setVar('officer_level', 0); diff --git a/hwe/sammo/Command/General/che_등용수락.php b/hwe/sammo/Command/General/che_등용수락.php index 86337059..5417f067 100644 --- a/hwe/sammo/Command/General/che_등용수락.php +++ b/hwe/sammo/Command/General/che_등용수락.php @@ -179,13 +179,15 @@ class che_등용수락 extends Command\GeneralCommand{ $db->update('nation', $setScoutNationValues, 'nation=%i', $destNationID); $general->increaseInheritancePoint(InheritanceKey::active_action, 1); - $general->setInheritancePoint( - InheritanceKey::max_belong, - max( - $general->getVar('belong'), - $general->getInheritancePoint(InheritanceKey::max_belong) ?? 0 - ) - ); + if($general->getNPCType() < 2){ + $general->setAuxVar( + InheritanceKey::max_belong->value, + max( + $general->getVar('belong'), + $general->getInheritancePoint(InheritanceKey::max_belong) ?? 0 + ) + ); + } $general->setVar('permission', 'normal'); $general->setVar('belong', 1); $general->setVar('officer_level', 1); diff --git a/hwe/sammo/Command/General/che_하야.php b/hwe/sammo/Command/General/che_하야.php index 6fce7ba3..7b465306 100644 --- a/hwe/sammo/Command/General/che_하야.php +++ b/hwe/sammo/Command/General/che_하야.php @@ -113,13 +113,15 @@ class che_하야 extends Command\GeneralCommand{ $general->setVar('troop', 0); $general->increaseInheritancePoint(InheritanceKey::active_action, 1); - $general->setInheritancePoint( - InheritanceKey::max_belong, - max( - $general->getVar('belong'), - $general->getInheritancePoint(InheritanceKey::max_belong) ?? 0 - ) - ); + if($general->getNPCType() < 2){ + $general->setAuxVar( + InheritanceKey::max_belong->value, + max( + $general->getVar('belong'), + $general->getInheritancePoint(InheritanceKey::max_belong) ?? 0 + ) + ); + } $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange();