From f6315a5b46cf77182ec8ba15e3e065787afcebcf Mon Sep 17 00:00:00 2001 From: hide_d Date: Fri, 29 Jun 2018 09:35:24 +0900 Subject: [PATCH] =?UTF-8?q?unset=EB=8C=80=EC=8B=A0=20[]=EB=A1=9C=20?= =?UTF-8?q?=EC=B4=88=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/process_war.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/hwe/process_war.php b/hwe/process_war.php index 359c1a06..b8f31378 100644 --- a/hwe/process_war.php +++ b/hwe/process_war.php @@ -146,9 +146,9 @@ function processWar($general, $city) { pushGenLog($general, $log); pushGeneralPublicRecord($alllog, $year, $month); pushWorldHistory($history); - unset($log); - unset($alllog); - unset($history); + $log = []; + $alllog = []; + $history= []; //패퇴시 병량보충 $destnation['rice'] += 500; @@ -1464,10 +1464,10 @@ function processWar($general, $city) { pushGenLog($oppose, $opplog); pushBatLog($oppose, $oppbatlog); pushBatRes($oppose, $oppbatres); - unset($oppose); - unset($opplog); - unset($oppbatlog); - unset($oppbatres); + $oppose = null; + $opplog = []; + $oppbatlog = []; + $oppbatres = []; // 공격 장수 병사 소진이나 쌀 소진시 실패 처리 } elseif($general['crew'] <= 0 || $myRice <= Util::round($general['crew']/100)) { if($myRice <= Util::round($general['crew']/100)) { @@ -1512,21 +1512,21 @@ function processWar($general, $city) { pushGenLog($oppose, $opplog); pushBatLog($oppose, $oppbatlog); pushBatRes($oppose, $oppbatres); - unset($opplog); - unset($oppbatlog); - unset($oppbatres); -// $josaYi = JosaUtil::pick($general['name'], '이'); -// $alllog[] = "●{$month}월:{$general['name']}{$josaYi} }{$city['name']} 공략에 실패했습니다. <1>$date"; -// $log[] = "{$city['name']} 공략에 실패했습니다. <1>$date"; + $opplog = []; + $oppbatlog = []; + $oppbatres = []; + // $josaYi = JosaUtil::pick($general['name'], '이'); + // $alllog[] = "●{$month}월:{$general['name']}{$josaYi} }{$city['name']} 공략에 실패했습니다. <1>$date"; + // $log[] = "{$city['name']} 공략에 실패했습니다. <1>$date"; break; } else { // 무승부일때 로그 남김 pushGenLog($oppose, $opplog); pushBatLog($oppose, $oppbatlog); pushBatRes($oppose, $oppbatres); - unset($opplog); - unset($oppbatlog); - unset($oppbatres); + $opplog = []; + $oppbatlog = []; + $oppbatres = []; } } }