unset대신 []로 초기화

This commit is contained in:
2018-06-29 09:35:24 +09:00
parent e81075ef04
commit 72920a0432
+16 -16
View File
@@ -146,9 +146,9 @@ function processWar($general, $city) {
pushGenLog($general, $log); pushGenLog($general, $log);
pushGeneralPublicRecord($alllog, $year, $month); pushGeneralPublicRecord($alllog, $year, $month);
pushWorldHistory($history); pushWorldHistory($history);
unset($log); $log = [];
unset($alllog); $alllog = [];
unset($history); $history= [];
//패퇴시 병량보충 //패퇴시 병량보충
$destnation['rice'] += 500; $destnation['rice'] += 500;
@@ -1464,10 +1464,10 @@ function processWar($general, $city) {
pushGenLog($oppose, $opplog); pushGenLog($oppose, $opplog);
pushBatLog($oppose, $oppbatlog); pushBatLog($oppose, $oppbatlog);
pushBatRes($oppose, $oppbatres); pushBatRes($oppose, $oppbatres);
unset($oppose); $oppose = null;
unset($opplog); $opplog = [];
unset($oppbatlog); $oppbatlog = [];
unset($oppbatres); $oppbatres = [];
// 공격 장수 병사 소진이나 쌀 소진시 실패 처리 // 공격 장수 병사 소진이나 쌀 소진시 실패 처리
} elseif($general['crew'] <= 0 || $myRice <= Util::round($general['crew']/100)) { } elseif($general['crew'] <= 0 || $myRice <= Util::round($general['crew']/100)) {
if($myRice <= Util::round($general['crew']/100)) { if($myRice <= Util::round($general['crew']/100)) {
@@ -1512,21 +1512,21 @@ function processWar($general, $city) {
pushGenLog($oppose, $opplog); pushGenLog($oppose, $opplog);
pushBatLog($oppose, $oppbatlog); pushBatLog($oppose, $oppbatlog);
pushBatRes($oppose, $oppbatres); pushBatRes($oppose, $oppbatres);
unset($opplog); $opplog = [];
unset($oppbatlog); $oppbatlog = [];
unset($oppbatres); $oppbatres = [];
// $josaYi = JosaUtil::pick($general['name'], '이'); // $josaYi = JosaUtil::pick($general['name'], '이');
// $alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>{$josaYi} }<G>{$city['name']}</> 공략에 실패했습니다. <1>$date</>"; // $alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>{$josaYi} }<G>{$city['name']}</> 공략에 실패했습니다. <1>$date</>";
// $log[] = "<C>●</> <G>{$city['name']}</> 공략에 실패했습니다. <1>$date</>"; // $log[] = "<C>●</> <G>{$city['name']}</> 공략에 실패했습니다. <1>$date</>";
break; break;
} else { } else {
// 무승부일때 로그 남김 // 무승부일때 로그 남김
pushGenLog($oppose, $opplog); pushGenLog($oppose, $opplog);
pushBatLog($oppose, $oppbatlog); pushBatLog($oppose, $oppbatlog);
pushBatRes($oppose, $oppbatres); pushBatRes($oppose, $oppbatres);
unset($opplog); $opplog = [];
unset($oppbatlog); $oppbatlog = [];
unset($oppbatres); $oppbatres = [];
} }
} }
} }