fix: ProvideNPCTroopLeader는 국가가 없을땐 동작하지 않아야함

This commit is contained in:
2023-03-16 00:04:33 +09:00
parent fb5946fba5
commit 49b39c34eb
@@ -35,6 +35,9 @@ class ProvideNPCTroopLeader extends \sammo\Event\Action
foreach ($db->queryAllLists('SELECT nation,count(no) FROM general WHERE npc = 5 GROUP BY nation') as [$nationID, $NPCTroopLeaderCnt]) {
$NPCTroopLeaderCntByNation[$nationID] = $NPCTroopLeaderCnt;
};
if(!$NPCTroopLeaderCntByNation){
return;
}
$year = $env['year'];
$month = $env['month'];