From c89bd2f63fc141aeb6d379e89f6f1afc19d4f447 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Wed, 21 Sep 2022 22:48:55 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=95=98=EC=95=BC,=20=EB=A7=9D=EB=AA=85?= =?UTF-8?q?=20=EC=8B=9C=20=EC=B5=9C=EB=8C=80=20=EC=9E=84=EA=B4=80=20?= =?UTF-8?q?=EB=85=84=EC=88=98=EA=B0=80=20=EB=B0=98=EC=98=81=EB=90=98?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EB=B2=84=EA=B7=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func.php | 6 +++--- hwe/sammo/Command/General/che_등용수락.php | 7 +++++++ hwe/sammo/Command/General/che_하야.php | 7 +++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/hwe/func.php b/hwe/func.php index e7546e1e..258a3e42 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -1823,11 +1823,11 @@ function deleteNation(General $lord, bool $applyDB): array // 전 장수 재야로 foreach ($nationGeneralList as $general) { - $general->setAuxVar( - InheritanceKey::max_belong->value, + $general->setInheritancePoint( + InheritanceKey::max_belong, max( $general->getVar('belong'), - $general->getAuxVar(InheritanceKey::max_belong->value) ?? 0 + $general->getInheritancePoint(InheritanceKey::max_belong) ?? 0 ) ); $general->setVar('belong', 0); diff --git a/hwe/sammo/Command/General/che_등용수락.php b/hwe/sammo/Command/General/che_등용수락.php index ef798761..86337059 100644 --- a/hwe/sammo/Command/General/che_등용수락.php +++ b/hwe/sammo/Command/General/che_등용수락.php @@ -179,6 +179,13 @@ 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 + ) + ); $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 b00aea20..6fce7ba3 100644 --- a/hwe/sammo/Command/General/che_하야.php +++ b/hwe/sammo/Command/General/che_하야.php @@ -113,6 +113,13 @@ 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 + ) + ); $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange();