fix: 초반 내정 기간에 NPC가 다중 선포가 가능한 버그 수정

This commit is contained in:
2022-07-06 22:45:18 +09:00
parent cb65666600
commit e443f92ddb
+6 -6
View File
@@ -200,7 +200,12 @@ class GeneralAI
$yearMonth = Util::joinYearMonth($env['year'], $env['month']);
if ($yearMonth <= Util::joinYearMonth($env['startyear'] + 2, 5)) {
$warTarget = $db->queryAllLists(
'SELECT you, state, term FROM diplomacy WHERE me = %i AND state IN (0, 1)',
$nationID
);
if (!$warTarget && $yearMonth <= Util::joinYearMonth($env['startyear'] + 2, 5)) {
$this->dipState = self::d평화;
$this->attackable = false;
return;
@@ -210,11 +215,6 @@ class GeneralAI
// 공격가능도시 있으면
$this->attackable = !!$frontStatus;
$warTarget = $db->queryAllLists(
'SELECT you, state, term FROM diplomacy WHERE me = %i AND state IN (0, 1)',
$nationID
);
$onWar = 0;
$onWarReady = 0;
$onWarYet = 0;