퇴각시 $oppose를 해제하여 마지막 페이즈 쌀 소모하는 문제 해결.

This commit is contained in:
2018-04-12 01:27:29 +09:00
parent be8e22309f
commit 643a2822a0
+5
View File
@@ -1405,6 +1405,7 @@ function processWar($general, $city) {
pushGenLog($oppose, $opplog); pushGenLog($oppose, $opplog);
pushBatLog($oppose, $oppbatlog); pushBatLog($oppose, $oppbatlog);
pushBatRes($oppose, $oppbatres); pushBatRes($oppose, $oppbatres);
unset($oppose);
unset($opplog); unset($opplog);
unset($oppbatlog); unset($oppbatlog);
unset($oppbatres); unset($oppbatres);
@@ -1468,6 +1469,9 @@ function processWar($general, $city) {
} }
} }
if(isset($oppose)){
//마지막 페이즈에 장수가 전멸하지 않은 경우. 쌀 소모 후속 처리
// 상대장수 경험 등등 증가(페이즈 초과시) // 상대장수 경험 등등 증가(페이즈 초과시)
$opexp = Util::round($opexp / 50 * 0.8); $opexp = Util::round($opexp / 50 * 0.8);
// 성격 보정 // 성격 보정
@@ -1478,6 +1482,7 @@ function processWar($general, $city) {
$query = "update general set rice='{$oppose['rice']}',experience=experience+'$opexp',dedication=dedication+'$opexp' where no='{$oppose['no']}'"; $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),""); MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
// 경험치 상승 // 경험치 상승
if(intdiv($general['crewtype'], 10) == 3) { // 귀병 if(intdiv($general['crewtype'], 10) == 3) { // 귀병