diff --git a/hwe/func_converter.php b/hwe/func_converter.php index 5aed1274..fb474510 100644 --- a/hwe/func_converter.php +++ b/hwe/func_converter.php @@ -214,7 +214,7 @@ function getNationType2(?string $type) { } function getNationTypeClass(?string $type){ - if($type === null){ + if($type === null || $type === ''){ $type = GameConst::$neutralNationType; } @@ -234,7 +234,7 @@ function getNationTypeClass(?string $type){ } function getPersonalityClass(?string $type){ - if($type === null){ + if($type === null || $type === ''){ $type = GameConst::$neutralPersonality; } @@ -291,7 +291,7 @@ function getItemClass(int $itemCode){ } function getGeneralSpecialDomesticClass(?string $type){ - if($type === null){ + if($type === null || $type === ''){ $type = GameConst::$defaultSpecialDomestic; } @@ -311,7 +311,7 @@ function getGeneralSpecialDomesticClass(?string $type){ } function getGeneralSpecialWarClass(?string $type){ - if($type === null){ + if($type === null || $type === ''){ $type = GameConst::$defaultSpecialWar; } @@ -331,7 +331,7 @@ function getGeneralSpecialWarClass(?string $type){ } function getGeneralCommandClass(?string $type){ - if($type === null){ + if($type === null || $type === ''){ $type = '휴식'; } @@ -351,7 +351,7 @@ function buildGeneralCommandClass(?string $type, General $generalObj, array $env } function getNationCommandClass(?string $type){ - if($type === null){ + if($type === null || $type === ''){ $type = '휴식'; } diff --git a/hwe/func_gamerule.php b/hwe/func_gamerule.php index e4693500..874496f1 100644 --- a/hwe/func_gamerule.php +++ b/hwe/func_gamerule.php @@ -1195,9 +1195,9 @@ function checkStatistic() { $auxData['nations']['all'] = $nations; $nationHist = ''; - for($i=1; $i <= 13; $i++) { - if(!Util::array_get($nationHists[$i])) { $nationHists[$i] = '-'; } - $nationHist .= getNationType($i)."({$nationHists[$i]}), "; + foreach(GameConst::$availableNationType as $nationType){ + if(!Util::array_get($nationHists[$nationType])) { $nationHists[$nationType] = '-'; } + $nationHist .= getNationType($nationType)."({$nationHists[$i]}), "; } $generals = $db->query('SELECT `no`,npc,personal,special,special2,crewtype FROM general'); diff --git a/hwe/sammo/TurnExecutionHelper.php b/hwe/sammo/TurnExecutionHelper.php index 240102fd..febb71b5 100644 --- a/hwe/sammo/TurnExecutionHelper.php +++ b/hwe/sammo/TurnExecutionHelper.php @@ -326,12 +326,17 @@ WHERE turntime < %s ORDER BY turntime ASC, `no` ASC', // 트래픽 업데이트 updateTraffic(); + /* + TODO: executionOver 재설계 if($executionOver){ if($currentTurn !== null){ $gameStor->turntime = $currentTurn; } + unlock(); return; } + */ + // 1달마다 처리하는 것들, 벌점 감소 및 건국,전턴,합병 -1, 군량 소모 if(!preUpdateMonthly()){