fix: AI 일부 key 접근 문제 수정

This commit is contained in:
2025-08-30 06:11:37 +00:00
parent 656baeb9ee
commit 185c0e16a0
+8 -2
View File
@@ -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;