버그 수정

This commit is contained in:
2019-04-21 02:53:27 +09:00
parent 3064a13450
commit a0a4e52fca
3 changed files with 14 additions and 9 deletions
+6 -6
View File
@@ -214,7 +214,7 @@ function getNationType2(?string $type) {
} }
function getNationTypeClass(?string $type){ function getNationTypeClass(?string $type){
if($type === null){ if($type === null || $type === ''){
$type = GameConst::$neutralNationType; $type = GameConst::$neutralNationType;
} }
@@ -234,7 +234,7 @@ function getNationTypeClass(?string $type){
} }
function getPersonalityClass(?string $type){ function getPersonalityClass(?string $type){
if($type === null){ if($type === null || $type === ''){
$type = GameConst::$neutralPersonality; $type = GameConst::$neutralPersonality;
} }
@@ -291,7 +291,7 @@ function getItemClass(int $itemCode){
} }
function getGeneralSpecialDomesticClass(?string $type){ function getGeneralSpecialDomesticClass(?string $type){
if($type === null){ if($type === null || $type === ''){
$type = GameConst::$defaultSpecialDomestic; $type = GameConst::$defaultSpecialDomestic;
} }
@@ -311,7 +311,7 @@ function getGeneralSpecialDomesticClass(?string $type){
} }
function getGeneralSpecialWarClass(?string $type){ function getGeneralSpecialWarClass(?string $type){
if($type === null){ if($type === null || $type === ''){
$type = GameConst::$defaultSpecialWar; $type = GameConst::$defaultSpecialWar;
} }
@@ -331,7 +331,7 @@ function getGeneralSpecialWarClass(?string $type){
} }
function getGeneralCommandClass(?string $type){ function getGeneralCommandClass(?string $type){
if($type === null){ if($type === null || $type === ''){
$type = '휴식'; $type = '휴식';
} }
@@ -351,7 +351,7 @@ function buildGeneralCommandClass(?string $type, General $generalObj, array $env
} }
function getNationCommandClass(?string $type){ function getNationCommandClass(?string $type){
if($type === null){ if($type === null || $type === ''){
$type = '휴식'; $type = '휴식';
} }
+3 -3
View File
@@ -1195,9 +1195,9 @@ function checkStatistic() {
$auxData['nations']['all'] = $nations; $auxData['nations']['all'] = $nations;
$nationHist = ''; $nationHist = '';
for($i=1; $i <= 13; $i++) { foreach(GameConst::$availableNationType as $nationType){
if(!Util::array_get($nationHists[$i])) { $nationHists[$i] = '-'; } if(!Util::array_get($nationHists[$nationType])) { $nationHists[$nationType] = '-'; }
$nationHist .= getNationType($i)."({$nationHists[$i]}), "; $nationHist .= getNationType($nationType)."({$nationHists[$i]}), ";
} }
$generals = $db->query('SELECT `no`,npc,personal,special,special2,crewtype FROM general'); $generals = $db->query('SELECT `no`,npc,personal,special,special2,crewtype FROM general');
+5
View File
@@ -326,12 +326,17 @@ WHERE turntime < %s ORDER BY turntime ASC, `no` ASC',
// 트래픽 업데이트 // 트래픽 업데이트
updateTraffic(); updateTraffic();
/*
TODO: executionOver 재설계
if($executionOver){ if($executionOver){
if($currentTurn !== null){ if($currentTurn !== null){
$gameStor->turntime = $currentTurn; $gameStor->turntime = $currentTurn;
} }
unlock();
return; return;
} }
*/
// 1달마다 처리하는 것들, 벌점 감소 및 건국,전턴,합병 -1, 군량 소모 // 1달마다 처리하는 것들, 벌점 감소 및 건국,전턴,합병 -1, 군량 소모
if(!preUpdateMonthly()){ if(!preUpdateMonthly()){