Namespace 실수 해결.
수동 Event 등록시 Date가 아니라 date로 입력했던 문제 해결
This commit is contained in:
+2
-2
@@ -1408,7 +1408,7 @@ function updateTraffic() {
|
|||||||
'maxonline'=>$game['maxonline']
|
'maxonline'=>$game['maxonline']
|
||||||
], true);
|
], true);
|
||||||
|
|
||||||
$db->update('general', ['refresh'=>0]);
|
$db->update('general', ['refresh'=>0], true);
|
||||||
|
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = date('Y-m-d H:i:s');
|
||||||
$fp = fopen("logs/_traffic.txt", "a");
|
$fp = fopen("logs/_traffic.txt", "a");
|
||||||
@@ -1662,7 +1662,7 @@ function checkTurn($connect) {
|
|||||||
// 이벤트 핸들러 동작
|
// 이벤트 핸들러 동작
|
||||||
foreach (DB::db()->query('SELECT * from event') as $rawEvent) {
|
foreach (DB::db()->query('SELECT * from event') as $rawEvent) {
|
||||||
$eventID = $rawEvent['id'];
|
$eventID = $rawEvent['id'];
|
||||||
$cond = Json::decode($rawEvent['cond']);
|
$cond = Json::decode($rawEvent['condition']);
|
||||||
$action = Json::decode($rawEvent['action']);
|
$action = Json::decode($rawEvent['action']);
|
||||||
$event = new Event\EventHandler($cond, $action);
|
$event = new Event\EventHandler($cond, $action);
|
||||||
|
|
||||||
|
|||||||
@@ -131,6 +131,9 @@ function getGeneralHistoryAll(int $no) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pushWorldHistory(array $history, $year=null, $month=null) {
|
function pushWorldHistory(array $history, $year=null, $month=null) {
|
||||||
|
if(!$history){
|
||||||
|
return;
|
||||||
|
}
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
if($year === null || $month === null){
|
if($year === null || $month === null){
|
||||||
$game = $db->queryFirstRow('SELECT year, month FROM game LIMIT 1');
|
$game = $db->queryFirstRow('SELECT year, month FROM game LIMIT 1');
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
namespace sammo;
|
||||||
|
|
||||||
function process_23($connect, &$general) {
|
function process_23($connect, &$general) {
|
||||||
$log = array();
|
$log = array();
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
namespace sammo;
|
||||||
/**
|
/**
|
||||||
* 시간 단위로 일어나는 이벤트들에 대한 함수 모음
|
* 시간 단위로 일어나는 이벤트들에 대한 함수 모음
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace sammo\Event\Condition;
|
namespace sammo\Event\Condition;
|
||||||
|
|
||||||
class Date extends sammo\Event\Condition{
|
class Date extends \sammo\Event\Condition{
|
||||||
|
|
||||||
const AVAILABLE_CMP = [
|
const AVAILABLE_CMP = [
|
||||||
'=='=>true,
|
'=='=>true,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace sammo\Event\Condition;
|
namespace sammo\Event\Condition;
|
||||||
|
|
||||||
class Logic extends sammo\Event\Condition{
|
class Logic extends \sammo\Event\Condition{
|
||||||
private $mode = 'and';
|
private $mode = 'and';
|
||||||
private $conditions = [];
|
private $conditions = [];
|
||||||
const AVAILABLE_LOGIC_NAME = [
|
const AVAILABLE_LOGIC_NAME = [
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ class Scenario{
|
|||||||
|
|
||||||
$actions[] = ['DeleteEvent'];
|
$actions[] = ['DeleteEvent'];
|
||||||
$this->events[] = [
|
$this->events[] = [
|
||||||
'cond'=>['date', '==', $targetYear, '1'],
|
'cond'=>['Date', '==', $targetYear, '1'],
|
||||||
'action'=>$actions
|
'action'=>$actions
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user