diff --git a/hwe/sammo/API/General/GetFrontInfo.php b/hwe/sammo/API/General/GetFrontInfo.php index 76f81374..36508e4b 100644 --- a/hwe/sammo/API/General/GetFrontInfo.php +++ b/hwe/sammo/API/General/GetFrontInfo.php @@ -135,13 +135,13 @@ class GetFrontInfo extends \sammo\BaseAPI //XXX: 매번 더하는가? $nationPopulation = $db->queryFirstRow( - 'SELECT COUNT(*) as cityCnt, SUM(pop) as `now`, SUM(pop_max) as `max` from city where nation=%i', + 'SELECT COUNT(*) as cityCnt, CAST(SUM(pop) AS INTEGER) as `now`, CAST(SUM(pop_max) AS INTEGER) as `max` from city where nation=%i', $nationID ); //XXX: 매번 더하는가? $nationCrew = $db->queryFirstRow( - 'SELECT COUNT(*) as generalCnt, SUM(crew) as `now`,SUM(leadership)*100 as `max` from general where nation=%i AND npc != 5', + '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', $nationID ); @@ -169,16 +169,6 @@ class GetFrontInfo extends \sammo\BaseAPI $nationClass = buildNationTypeClass($rawNation['type']); - //TODO: 이부분은 const로 빼야하지 않는가? - $officerLevelTexts = []; - foreach (range(0, 4) as $officerLevel) { - $officerLevelTexts[$officerLevel] = getOfficerLevelText($officerLevel); - } - foreach (range(5, 12) as $officerLevel) { - $officerLevelTexts[$officerLevel] = getOfficerLevelText($rawNation['level'] * 100 + $officerLevel); - } - - return [ 'id' => $nationID, 'name' => $rawNation['name'], @@ -204,13 +194,11 @@ class GetFrontInfo extends \sammo\BaseAPI 'onlineGen' => $onlineGen, 'notice' => $nationNotice, 'topChiefs' => $topChiefs, - 'officerLevelTexts' => $officerLevelTexts, 'diplomaticLimit' => $rawNation['surlimit'], 'strategicCmdLimit' => $rawNation['strategic_cmd_limit'], 'impossibleStrategicCommand' => $impossibleStrategicCommandLists, - 'prohibitScout' => $rawNation['scout'], 'prohibitWar' => $rawNation['war'], ]; @@ -250,7 +238,6 @@ class GetFrontInfo extends \sammo\BaseAPI 'notice' => '', 'topChiefs' => [], 'impossibleStrategicCommand' => [], - 'officerLevelTexts' => [], ]; } diff --git a/hwe/ts/defs/API/Global.ts b/hwe/ts/defs/API/Global.ts index 7159ef98..b7c90451 100644 --- a/hwe/ts/defs/API/Global.ts +++ b/hwe/ts/defs/API/Global.ts @@ -181,7 +181,6 @@ export type GetFrontInfoResponse = { npc: GeneralListItemP0["npc"]; } >; - officerLevelTexts: Record; diplomaticLimit: number; strategicCmdLimit: number; impossibleStrategicCommand: [string, number][];