From c1f06b4ce5022103570828522a0e9e0aac74e247 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Thu, 22 Sep 2022 11:54:47 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=B5=9C=EB=8C=80=20=EC=9E=84=EA=B4=80?= =?UTF-8?q?=20=EB=85=84=EB=8F=84=20=EC=88=98=20=EC=A0=9C=EC=96=B4=20?= =?UTF-8?q?=EA=B7=9C=EC=95=BD=20=EC=9A=B0=ED=9A=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func.php | 17 ++++++++++------- hwe/sammo/Command/General/che_등용수락.php | 16 +++++++++------- hwe/sammo/Command/General/che_하야.php | 16 +++++++++------- 3 files changed, 28 insertions(+), 21 deletions(-) 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();