diff --git a/hwe/func.php b/hwe/func.php index 8a716889..aba88a71 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -1223,8 +1223,8 @@ function addAge() { if($admin['year'] >= $admin['startyear']+3) { foreach($db->query('SELECT no,name,nation,leadership,strength,intel from general where specage<=age and special=%s', GameConst::$defaultSpecialDomestic) as $general){ $special = SpecialityConst::pickSpecialDomestic($general); - $specialClass = getGeneralSpecialDomesticClass($special); - $specialText = $specialClass::$name; + $specialClass = buildGeneralSpecialDomesticClass($special); + $specialText = $specialClass->getName(); $db->update('general', [ 'special'=>$special ], 'no=%i',$general['no']); diff --git a/hwe/func_converter.php b/hwe/func_converter.php index 8a2df5f3..251f7ea1 100644 --- a/hwe/func_converter.php +++ b/hwe/func_converter.php @@ -13,7 +13,7 @@ function getCharacterList(){ $infoText = []; foreach(GameConst::$allPersonality as $personalityID){ $class = buildPersonalityClass($personalityID); - $infoText[$personalityID] = [$class->getName(), $class::$info]; + $infoText[$personalityID] = [$class->getName(), $class->getInfo()]; } return $infoText; } diff --git a/hwe/func_template.php b/hwe/func_template.php index ae602afe..86f6f54a 100644 --- a/hwe/func_template.php +++ b/hwe/func_template.php @@ -93,9 +93,9 @@ function displaySpecialWarInfo(?string $type):string{ } function displaySpecialDomesticInfo(?string $type):string{ - $class = getGeneralSpecialDomesticClass($type); - $info = $class::$info; - $name = $class::$name; + $class = buildGeneralSpecialDomesticClass($type); + $info = $class->getInfo(); + $name = $class->getName(); $templates = new \League\Plates\Engine(__dir__.'/templates'); diff --git a/hwe/sammo/Command/General/che_건국.php b/hwe/sammo/Command/General/che_건국.php index 581d8e76..3a36c9de 100644 --- a/hwe/sammo/Command/General/che_건국.php +++ b/hwe/sammo/Command/General/che_건국.php @@ -129,8 +129,8 @@ class che_건국 extends Command\GeneralCommand{ $logger = $general->getLogger(); - $nationTypeClass = getNationTypeClass($nationType); - $nationTypeName = $nationTypeClass::$name; + $nationTypeClass = buildNationTypeClass($nationType); + $nationTypeName = $nationTypeClass->getName(); $logger->pushGeneralActionLog("{$nationName}{$josaUl} 건국하였습니다. <1>$date"); @@ -216,9 +216,9 @@ class che_건국 extends Command\GeneralCommand{ $form[] = '현재 도시에서 나라를 세웁니다. 중, 소도시에서만 가능합니다.

'; foreach(GameConst::$availableNationType as $nationType){ - $nationClass = getNationTypeClass($nationType); + $nationClass = buildNationTypeClass($nationType); - [$name, $pros, $cons] = [$nationClass::$name, $nationClass::$pros, $nationClass::$cons]; + [$name, $pros, $cons] = [$nationClass->getName(), $nationClass::$pros, $nationClass::$cons]; $form[] = "- $name : {$pros} {$cons}
"; } @@ -240,9 +240,9 @@ EOT; 성향 :