feat: PageFront 상단 정보(wip)

This commit is contained in:
2023-03-09 02:20:22 +09:00
parent 5fde900554
commit 5dabdb2636
5 changed files with 155 additions and 53 deletions
+5 -1
View File
@@ -92,7 +92,8 @@ class GetFrontInfo extends \sammo\BaseAPI
$isTournamentApplicationOpen = $gameStor->tournament == 1;
$isBettingActive = $gameStor->tournament == 6;
$tournamentType = $gameStor->tnmt_type;
$tournamentState = getTournamentTermText($gameStor->turnterm);
$tournamentState = $gameStor->tournament;
$tournamentTime = $gameStor->tnmt_time;
$isLocked = boolval($db->queryFirstField('SELECT plock FROM plock WHERE `type`="GAME" LIMIT 1'));
$globalGenCount = $db->queryAllLists('SELECT npc, count(no) FROM general GROUP BY npc');
@@ -122,6 +123,7 @@ class GetFrontInfo extends \sammo\BaseAPI
'isLocked' => $isLocked,
'tournamentType' => $tournamentType,
'tournamentState' => $tournamentState,
'tournamentTime' => $tournamentTime,
'genCount' => $globalGenCount,
'generalCntLimit' => $generalCntLimit,
'serverCnt' => $serverCnt,
@@ -176,6 +178,7 @@ class GetFrontInfo extends \sammo\BaseAPI
return [
'id' => $nationID,
'full' => true,
'name' => $rawNation['name'],
'population' => $nationPopulation,
'crew' => $nationCrew,
@@ -214,6 +217,7 @@ class GetFrontInfo extends \sammo\BaseAPI
$staticInfo = getNationStaticInfo(0);
return [
'id' => 0,
'full' => false,
'name' => $staticInfo['name'],
'population' => [
'cityCnt' => 0,