From 0cac139f65de3f6adb6bb7e92e49cd3f185263a8 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 1 Apr 2018 23:44:52 +0900 Subject: [PATCH] =?UTF-8?q?Namespace=20=EC=8B=A4=EC=88=98=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0.=20=EC=88=98=EB=8F=99=20Event=20=EB=93=B1=EB=A1=9D?= =?UTF-8?q?=EC=8B=9C=20Date=EA=B0=80=20=EC=95=84=EB=8B=88=EB=9D=BC=20date?= =?UTF-8?q?=EB=A1=9C=20=EC=9E=85=EB=A0=A5=ED=96=88=EB=8D=98=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func.php | 4 ++-- hwe/func_history.php | 3 +++ hwe/func_process_chief.php | 1 + hwe/func_time_event.php | 1 + hwe/sammo/Event/Condition/Date.php | 2 +- hwe/sammo/Event/Condition/Logic.php | 2 +- hwe/sammo/Scenario.php | 2 +- 7 files changed, 10 insertions(+), 5 deletions(-) diff --git a/hwe/func.php b/hwe/func.php index bac417c5..51096452 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -1408,7 +1408,7 @@ function updateTraffic() { 'maxonline'=>$game['maxonline'] ], true); - $db->update('general', ['refresh'=>0]); + $db->update('general', ['refresh'=>0], true); $date = date('Y-m-d H:i:s'); $fp = fopen("logs/_traffic.txt", "a"); @@ -1662,7 +1662,7 @@ function checkTurn($connect) { // 이벤트 핸들러 동작 foreach (DB::db()->query('SELECT * from event') as $rawEvent) { $eventID = $rawEvent['id']; - $cond = Json::decode($rawEvent['cond']); + $cond = Json::decode($rawEvent['condition']); $action = Json::decode($rawEvent['action']); $event = new Event\EventHandler($cond, $action); diff --git a/hwe/func_history.php b/hwe/func_history.php index cee5a418..4873c725 100644 --- a/hwe/func_history.php +++ b/hwe/func_history.php @@ -131,6 +131,9 @@ function getGeneralHistoryAll(int $no) { } function pushWorldHistory(array $history, $year=null, $month=null) { + if(!$history){ + return; + } $db = DB::db(); if($year === null || $month === null){ $game = $db->queryFirstRow('SELECT year, month FROM game LIMIT 1'); diff --git a/hwe/func_process_chief.php b/hwe/func_process_chief.php index f0b7c36a..c0731124 100644 --- a/hwe/func_process_chief.php +++ b/hwe/func_process_chief.php @@ -1,4 +1,5 @@ true, diff --git a/hwe/sammo/Event/Condition/Logic.php b/hwe/sammo/Event/Condition/Logic.php index 09614c1c..38c9a84b 100644 --- a/hwe/sammo/Event/Condition/Logic.php +++ b/hwe/sammo/Event/Condition/Logic.php @@ -1,7 +1,7 @@ events[] = [ - 'cond'=>['date', '==', $targetYear, '1'], + 'cond'=>['Date', '==', $targetYear, '1'], 'action'=>$actions ]; }