diff --git a/hwe/sammo/Event/Action/CreateManyNPC.php b/hwe/sammo/Event/Action/CreateManyNPC.php index 59a6586b..3bc9b69d 100644 --- a/hwe/sammo/Event/Action/CreateManyNPC.php +++ b/hwe/sammo/Event/Action/CreateManyNPC.php @@ -70,7 +70,9 @@ class CreateManyNPC extends \sammo\Event\Action if ($this->fillCnt) { $db = DB::db(); $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; }