임관 제한을 하드코딩 10에서 Const로 전환

This commit is contained in:
2018-06-12 01:32:34 +09:00
parent e7f5850c31
commit ef0dec32ee
11 changed files with 54 additions and 35 deletions
+3 -3
View File
@@ -682,7 +682,7 @@ function checkMerge() {
pushNationHistory($younation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>과 <D><b>{$you['makenation']}</b></>로 통합");
$newGenCount = $gencount + $gencount2;
if($newGenCount < 10) { $newGenCount = 10; }
if($newGenCount < GameConst::$initialNationGenLimit) { $newGenCount = GameConst::$initialNationGenLimit; }
$newTotalTech = $younation['totaltech'] + $mynation['totaltech'];
$newTech = Util::round($newTotalTech / $newGenCount);
// 자금 통합, 외교제한 5년, 기술유지
@@ -805,7 +805,7 @@ function checkSurrender() {
pushNationHistory($younation, "<C>●</>{$admin['year']}{$admin['month']}월:<D><b>{$mynation['name']}</b></>{$josaWa} 합병");
$newGenCount = $gencount + $gencount2;
if($newGenCount < 10) { $newGenCount = 10; }
if($newGenCount < GameConst::$initialNationGenLimit) { $newGenCount = GameConst::$initialNationGenLimit; }
$newTotalTech = $younation['totaltech'] + $mynation['totaltech'];
$newTech = Util::round($newTotalTech / $newGenCount);
// 자금 통합, 외교제한 5년, 기술유지
@@ -932,7 +932,7 @@ function updateNationState() {
refreshNationStaticInfo();
}
$gennum = $gencount;
if($gencount < 10) $gencount = 10;
if($gencount < GameConst::$initialNationGenLimit) $gencount = GameConst::$initialNationGenLimit;
//기술 및 변경횟수 업데이트
$query = "update nation set tech=totaltech/'$gencount',gennum='$gennum' where nation='{$nation['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");