fix: 거병 시 인구 정보를 0이 아니라 null로 보내는 문제 수정

This commit is contained in:
2023-03-12 16:38:32 +09:00
parent 47bf5cdd17
commit 4901a2d384
+8
View File
@@ -245,6 +245,14 @@ class GetFrontInfo extends \sammo\BaseAPI
$nationID
);
if($nationPopulation['cityCnt'] == 0){
$nationPopulation = [
'cityCnt' => 0,
'now' => 0,
'max' => 0
];
}
//XXX: 매번 더하는가?
$nationCrew = $db->queryFirstRow(
'SELECT COUNT(*) as generalCnt, CAST(SUM(crew) AS INTEGER) as `now`,CAST(SUM(leadership)*100 AS INTEGER) as `max` from general where nation=%i AND npc != 5',