wip: 출력 시작

This commit is contained in:
2022-07-15 00:29:51 +09:00
parent 11a8efac85
commit cc15834484
6 changed files with 61 additions and 5 deletions
+17 -1
View File
@@ -26,7 +26,13 @@ class GetNationInfo extends \sammo\BaseAPI
{
public function validateArgs(): ?string
{
return null;
$v = new Validator($this->args);
$v->rule('boolean', 'full');
if (!$v->validate()) {
return $v->errorStr();
}
return null;
}
public function getRequiredSessionMode(): int
@@ -48,6 +54,16 @@ class GetNationInfo extends \sammo\BaseAPI
];
}
$isFull = $this->args['full'] ?? false;
if(!$isFull){
$nation = getNationStaticInfo($nationID);
return [
'result' => true,
'nation' => $nation,
];
}
$generalObj = General::createGeneralObjFromDB($session->generalID, null, 1);
$gameStor = KVStorage::getStorage($db, 'game_env');