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 ]; }