버그 체크
This commit is contained in:
+1
-1
@@ -1870,7 +1870,7 @@ function PreprocessCommand($no) {
|
|||||||
$josaUl = JosaUtil::pick($general['item'], '을');
|
$josaUl = JosaUtil::pick($general['item'], '을');
|
||||||
$log[0] = "<C>●</><C>".getItemName($general['item'])."</>{$josaUl} 사용하여 치료합니다!";
|
$log[0] = "<C>●</><C>".getItemName($general['item'])."</>{$josaUl} 사용하여 치료합니다!";
|
||||||
pushGenLog($general, $log);
|
pushGenLog($general, $log);
|
||||||
} elseif($general['injury'] > 10 && $general['item'] == 1 && $general['turn0'] != EncodeCommand(0, 0, 0, 50)) {
|
} elseif($general['injury'] > 10 && $general['item'] == 1 && DecodeCommand($general['turn0'])[0] != 50) {
|
||||||
//환약 사용
|
//환약 사용
|
||||||
$query = "update general set injury=0,item=0 where no='$no'";
|
$query = "update general set injury=0,item=0 where no='$no'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|||||||
@@ -772,7 +772,7 @@ parent.moveProcessing(<?=$commandtype?>, <?=Json::encode($turn)?>);
|
|||||||
|
|
||||||
|
|
||||||
function EncodeCommand($fourth, $third, $double, $command) {
|
function EncodeCommand($fourth, $third, $double, $command) {
|
||||||
return Json::encode($command, $double, $third, $fourth);
|
return Json::encode([$command, $double, $third, $fourth]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function DecodeCommand($str) {
|
function DecodeCommand($str) {
|
||||||
|
|||||||
+1
-1
@@ -183,7 +183,7 @@ function processAI($no) {
|
|||||||
$general = MYDB_fetch_array($result);
|
$general = MYDB_fetch_array($result);
|
||||||
|
|
||||||
// 입력된 턴이 있으면 그것 실행
|
// 입력된 턴이 있으면 그것 실행
|
||||||
if($general['turn0'] != EncodeCommand(0, 0, 0, 0)) {
|
if(DecodeCommand($general['turn0'])[0] != 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user