From d806935c58e26341fcde0b1b48533f727cbe9eb8 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 27 Oct 2021 02:04:10 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9E=91=EC=9C=84=20=EB=B3=B4=EC=83=81?= =?UTF-8?q?=EC=9D=B4=20=EA=B5=B0=EC=A3=BC=EC=9D=B8=20=EA=B2=BD=EC=9A=B0=20?= =?UTF-8?q?=EB=B0=98=EC=98=81=EC=9D=B4=20=EC=95=88=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_gamerule.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hwe/func_gamerule.php b/hwe/func_gamerule.php index c9a817ec..fd9b4e85 100644 --- a/hwe/func_gamerule.php +++ b/hwe/func_gamerule.php @@ -624,12 +624,12 @@ function updateNationState() $targetKillTurn ); $nationGenList = General::createGeneralObjListFromDB($nationGenIDList, ['belong', 'npc', 'aux'], 2); - $chiefObj = null; + $chiefID = null; $uniqueLotteryWeightList = []; foreach ($nationGenList as $nationGen) { if ($nationGen->getVar('officer_level') == 12) { - $chiefObj = $nationGen; + $chiefID = $nationGen->getID(); } $trialCnt = count(GameConst::$allItems); @@ -670,8 +670,10 @@ function updateNationState() $winnerObj->applyDB($db); } - if($chiefObj){ + if($chiefID){ + $chiefObj = General::createGeneralObjFromDB($chiefID, ['belong', 'npc', 'aux'], 2); $chiefObj->increaseInheritancePoint('unifier', 250 * $levelDiff); + $chiefObj->applyDB($db); } } }