From 79e2543266c0dae7b4261d3c595817e2b6edb279 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 6 Oct 2019 19:26:08 +0900 Subject: [PATCH] =?UTF-8?q?NPC=20=EC=88=98=EB=87=8C=20=EC=9E=84=EB=AA=85?= =?UTF-8?q?=20=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/sammo/GeneralAI.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index 7e19f9fb..e680c101 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -1791,13 +1791,13 @@ class GeneralAI{ $iterCandChiefStrength = new \ArrayIterator($candChiefStrength); $iterCandChiefIntel = new \ArrayIterator($candChiefIntel); - foreach(range(10, $minChiefLevel, -1) as $cheifLevel){ - if(key_exists($cheifLevel, $chiefCandidate)){ + foreach(range(10, $minChiefLevel, -1) as $chiefLevel){ + if(key_exists($chiefLevel, $chiefCandidate)){ continue; } /** @var \ArrayIterator $iterCurrentType */ - $iterCurrentType = ($cheifLevel % 2 == 0)?$iterCandChiefStrength:$iterCandChiefIntel; + $iterCurrentType = ($chiefLevel % 2 == 0)?$iterCandChiefStrength:$iterCandChiefIntel; $candidate = $iterCurrentType->current(); while(key_exists($candidate, $promoted)){ @@ -1809,15 +1809,15 @@ class GeneralAI{ } if($candidate){ - $chiefCandidate[$cheifLevel] = $candidate; - $promoted[$candidate] = $cheifLevel; + $chiefCandidate[$chiefLevel] = $candidate; + $promoted[$candidate] = $chiefLevel; } } foreach($chiefCandidate as $chiefLevel=>$chiefID){ $db->update('general', [ - 'level'=>$cheifLevel + 'level'=>$chiefLevel ], 'no=%i',$chiefID); } }