refac: GameUnitConstBase의 getBuildData

This commit is contained in:
2025-01-21 16:06:03 +00:00
parent 7cffa68d04
commit f26ac8c37b
+7 -2
View File
@@ -39,7 +39,8 @@ class GameUnitConstBase{
self::T_SIEGE => '차병', self::T_SIEGE => '차병',
]; ];
protected static $_buildData = [ protected static function getBuildData(): array {
return [
[ [
1000, self::T_CASTLE, '성벽', 1000, self::T_CASTLE, '성벽',
100, 100, 7, 0, 0, 99, 9, 100, 100, 7, 0, 0, 99, 9,
@@ -352,6 +353,8 @@ class GameUnitConstBase{
['che_성벽부상무효'], ['che_저지시도', 'che_저지발동'], null ['che_성벽부상무효'], ['che_저지시도', 'che_저지발동'], null
] ]
]; ];
}
public static function addGameUnit(GameUnitDetail $unitType){ public static function addGameUnit(GameUnitDetail $unitType){
static::_generate(); static::_generate();
@@ -417,7 +420,9 @@ class GameUnitConstBase{
$constName = []; $constName = [];
$constType = []; $constType = [];
foreach(static::$_buildData as $rawUnit){ $buildData = static::getBuildData();
foreach($buildData as $rawUnit){
[ [
$id, $id,
$armType, $armType,