fix: 국가가 하나도 없을 땐 CreateManyNPC가 동작하지 않아야 함
This commit is contained in:
@@ -70,7 +70,9 @@ class CreateManyNPC extends \sammo\Event\Action
|
|||||||
if ($this->fillCnt) {
|
if ($this->fillCnt) {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$nations = $db->queryFirstColumn('SELECT nation FROM general WHERE npc < 3 AND officer_level = 12');
|
$nations = $db->queryFirstColumn('SELECT nation FROM general WHERE npc < 3 AND officer_level = 12');
|
||||||
$regGens = $db->queryFirstField('SELECT count(*) FROM general WHERE nation IN %li AND npc < 4', $nations);
|
if($nations){
|
||||||
|
$regGens = $db->queryFirstField('SELECT count(*) FROM general WHERE nation IN %li AND npc < 4', $nations);
|
||||||
|
}
|
||||||
$moreGenCnt = count($nations) * $this->fillCnt - $regGens;
|
$moreGenCnt = count($nations) * $this->fillCnt - $regGens;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user