fix: RaiseInvader의 중첩 호줄 대비

- isunited 변수를 빠르게 1로 설정
- 만약 RaiseInavder를 빠르게 두번 호출하더라도 isunited 변수를 검사하게 하여 대응 가능
This commit is contained in:
2023-05-22 02:19:47 +09:00
parent 57c8c3f6a4
commit 3ebc44ea5a
+3 -2
View File
@@ -93,6 +93,9 @@ class RaiseInvader extends \sammo\Event\Action
public function run(array $env)
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$gameStor->setValue('isunited', 1);
$npcEachCount = $this->npcEachCount;
/** @var \sammo\CityInitDetail[] */
@@ -260,8 +263,6 @@ class RaiseInvader extends \sammo\Event\Action
'secu' => $db->sqleval('secu_max'),
], true);
$gameStor = KVStorage::getStorage($db, 'game_env');
$gameStor->setValue('isunited', 1);
refreshNationStaticInfo();
$logger = new ActionLogger(0, 0, $year, $env['month']);