feat(wip): 세력장수 추가작업, 병종 등

This commit is contained in:
2022-04-07 03:03:38 +09:00
parent 0a3c98ec5a
commit 35eafa36d6
4 changed files with 176 additions and 59 deletions
+13 -1
View File
@@ -20,7 +20,7 @@ use function sammo\prepareDir;
class GetConst extends \sammo\BaseAPI
{
/** 반환하는 StaticValues 타입이 달라지면 +1 */
const CONST_API_VERSION = 1;
const CONST_API_VERSION = 2;
const CACHE_KEY = 'JSConst';
private ?string $cacheKey = null;
@@ -258,6 +258,18 @@ class GetConst extends \sammo\BaseAPI
$iActionInfo[$mappedKey] = $actionInfo;
}
$crewtypeMap = [];
foreach(GameUnitConst::all() as $crewtypeObj){
$crewtypeMap[$crewtypeObj->id] = [
'value'=>(string)$crewtypeObj->id,
'name'=>$crewtypeObj->name,
'info'=>$crewtypeObj->getInfo(),
];
}
$iActionInfo['crewtype'] = $crewtypeMap;
return [
'gameConst' => get_class_vars('\sammo\GameConst'),
'gameUnitConst' => GameUnitConst::all(),