From e443f92ddbfcab73a1a6a2a1c1ffc29ff0b323ce Mon Sep 17 00:00:00 2001 From: Hide_D Date: Wed, 6 Jul 2022 22:45:18 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=B4=88=EB=B0=98=20=EB=82=B4=EC=A0=95?= =?UTF-8?q?=20=EA=B8=B0=EA=B0=84=EC=97=90=20NPC=EA=B0=80=20=EB=8B=A4?= =?UTF-8?q?=EC=A4=91=20=EC=84=A0=ED=8F=AC=EA=B0=80=20=EA=B0=80=EB=8A=A5?= =?UTF-8?q?=ED=95=9C=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/GeneralAI.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index 9c972ad1..1fb802a5 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -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;