From 185c0e16a0b748e74a3e879be1681edc4883c5f3 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Sat, 30 Aug 2025 06:11:33 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20AI=20=EC=9D=BC=EB=B6=80=20key=20?= =?UTF-8?q?=EC=A0=91=EA=B7=BC=20=EB=AC=B8=EC=A0=9C=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 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index bf17125c..1c7458f1 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -3129,8 +3129,14 @@ class GeneralAI $db = DB::db(); $dupLord = $db->queryFirstField('SELECT COUNT(*) FROM general WHERE officer_level = 12 AND city = %i', $this->general->getCityID()); - if($dupLord <= 1 && !in_array($this->general->getRawCity()['level'], [5, 6])) { - return null; + if($dupLord <= 1) { + if ($this->general->getRawCity() === null) { + $rawCity = $db->queryFirstRow('SELECT * FROM city WHERE city = %i', $this->general->getCityID()); + $this->general->setRawCity($rawCity); + } + if (!in_array($this->general->getRawCity()['level'], [5, 6])) { + return null; + } } $general = $this->general;