feat: 도시 점령, 국가 멸망 시 트리거 추가

This commit is contained in:
2022-02-05 07:43:27 +00:00
committed by Gitea
parent 2ff3746df2
commit 4e359f5eb9
3 changed files with 212 additions and 153 deletions
+4 -4
View File
@@ -398,7 +398,7 @@ class TurnExecutionHelper
// 1달마다 처리하는 것들, 벌점 감소 및 건국,전턴,합병 -1, 군량 소모
if (!preUpdateMonthly()) {
$gameStor->resetCache(true);
$gameStor->resetCache();
unlock();
throw new \RuntimeException('preUpdateMonthly() 처리 에러');
}
@@ -435,7 +435,7 @@ class TurnExecutionHelper
// 이벤트 핸들러 동작
$e_env = null;
foreach (DB::db()->query('SELECT * from event') as $rawEvent) {
foreach (DB::db()->query('SELECT * FROM event WHERE target = "MONTH" ORDER BY `priority` DESC, `id` ASC') as $rawEvent) {
if ($e_env === null) {
$e_env = $gameStor->getAll(false);
}
@@ -449,7 +449,7 @@ class TurnExecutionHelper
}
if ($e_env !== null) {
$gameStor->resetCache(true);
$gameStor->resetCache();
}
postUpdateMonthly();
@@ -480,7 +480,7 @@ class TurnExecutionHelper
//거래 처리
processAuction();
// 잡금 해제
$gameStor->resetCache(true);
$gameStor->resetCache();
unlock();
}
}