From 643a2822a06cd3d84730d2105cb7635983955cb4 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 12 Apr 2018 01:27:29 +0900 Subject: [PATCH] =?UTF-8?q?=ED=87=B4=EA=B0=81=EC=8B=9C=20$oppose=EB=A5=BC?= =?UTF-8?q?=20=ED=95=B4=EC=A0=9C=ED=95=98=EC=97=AC=20=EB=A7=88=EC=A7=80?= =?UTF-8?q?=EB=A7=89=20=ED=8E=98=EC=9D=B4=EC=A6=88=20=EC=8C=80=20=EC=86=8C?= =?UTF-8?q?=EB=AA=A8=ED=95=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/process_war.php | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/hwe/process_war.php b/hwe/process_war.php index 4bf80ca8..3f83a21d 100644 --- a/hwe/process_war.php +++ b/hwe/process_war.php @@ -1405,6 +1405,7 @@ function processWar($general, $city) { pushGenLog($oppose, $opplog); pushBatLog($oppose, $oppbatlog); pushBatRes($oppose, $oppbatres); + unset($oppose); unset($opplog); unset($oppbatlog); unset($oppbatres); @@ -1468,16 +1469,20 @@ function processWar($general, $city) { } } - // 상대장수 경험 등등 증가(페이즈 초과시) - $opexp = Util::round($opexp / 50 * 0.8); - // 성격 보정 - $opexp = CharExperience($opexp, $oppose['personal']); - // 쌀 소모 - $oppose['rice'] -= ($opexp * 5 * getCrewtypeRice($oppose['crewtype'], $destnation['tech'])); - if($oppose['rice'] < 0) { $oppose['rice'] = 0; } + if(isset($oppose)){ + //마지막 페이즈에 장수가 전멸하지 않은 경우. 쌀 소모 후속 처리 - $query = "update general set rice='{$oppose['rice']}',experience=experience+'$opexp',dedication=dedication+'$opexp' where no='{$oppose['no']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 상대장수 경험 등등 증가(페이즈 초과시) + $opexp = Util::round($opexp / 50 * 0.8); + // 성격 보정 + $opexp = CharExperience($opexp, $oppose['personal']); + // 쌀 소모 + $oppose['rice'] -= ($opexp * 5 * getCrewtypeRice($oppose['crewtype'], $destnation['tech'])); + if($oppose['rice'] < 0) { $oppose['rice'] = 0; } + + $query = "update general set rice='{$oppose['rice']}',experience=experience+'$opexp',dedication=dedication+'$opexp' where no='{$oppose['no']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } // 경험치 상승 if(intdiv($general['crewtype'], 10) == 3) { // 귀병