버그 체크

This commit is contained in:
2018-07-18 03:41:45 +09:00
parent 457f605898
commit fe55df8b2f
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1870,7 +1870,7 @@ function PreprocessCommand($no) {
$josaUl = JosaUtil::pick($general['item'], '을');
$log[0] = "<C>●</><C>".getItemName($general['item'])."</>{$josaUl} 사용하여 치료합니다!";
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'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
+1 -1
View File
@@ -772,7 +772,7 @@ parent.moveProcessing(<?=$commandtype?>, <?=Json::encode($turn)?>);
function EncodeCommand($fourth, $third, $double, $command) {
return Json::encode($command, $double, $third, $fourth);
return Json::encode([$command, $double, $third, $fourth]);
}
function DecodeCommand($str) {
+1 -1
View File
@@ -183,7 +183,7 @@ function processAI($no) {
$general = MYDB_fetch_array($result);
// 입력된 턴이 있으면 그것 실행
if($general['turn0'] != EncodeCommand(0, 0, 0, 0)) {
if(DecodeCommand($general['turn0'])[0] != 0) {
return;
}