From fe55df8b2fd8a7a2152250454d704365ff863f7a Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 18 Jul 2018 03:41:45 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=B2=B4=ED=81=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func.php | 2 +- hwe/func_command.php | 2 +- hwe/func_npc.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hwe/func.php b/hwe/func.php index 561060b5..590171ce 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -1870,7 +1870,7 @@ function PreprocessCommand($no) { $josaUl = JosaUtil::pick($general['item'], '을'); $log[0] = "".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),""); diff --git a/hwe/func_command.php b/hwe/func_command.php index c10eaf58..de2b9b72 100644 --- a/hwe/func_command.php +++ b/hwe/func_command.php @@ -772,7 +772,7 @@ parent.moveProcessing(, ); function EncodeCommand($fourth, $third, $double, $command) { - return Json::encode($command, $double, $third, $fourth); + return Json::encode([$command, $double, $third, $fourth]); } function DecodeCommand($str) { diff --git a/hwe/func_npc.php b/hwe/func_npc.php index 9e50decb..a2f15f28 100644 --- a/hwe/func_npc.php +++ b/hwe/func_npc.php @@ -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; }