내정 상승 코드 마저 수정
This commit is contained in:
@@ -380,7 +380,7 @@ function preUpdateMonthly() {
|
|||||||
$setValues = [];
|
$setValues = [];
|
||||||
|
|
||||||
//인구는 고정
|
//인구는 고정
|
||||||
$setValues['pop'] = $db->sqleval('if(pop > pop2, GREATEST(pop2, pop*0.99), pop');
|
$setValues['pop'] = $db->sqleval('if(pop > pop2, GREATEST(pop2, pop*0.99), pop)');
|
||||||
|
|
||||||
//농지, 상업
|
//농지, 상업
|
||||||
if(in_array($nationType, [2, 12])){
|
if(in_array($nationType, [2, 12])){
|
||||||
|
|||||||
@@ -272,7 +272,6 @@ function process_1(&$general, $type) {
|
|||||||
$ded = CharDedication($ded, $general['personal']);
|
$ded = CharDedication($ded, $general['personal']);
|
||||||
|
|
||||||
$score += $city["$stype"];
|
$score += $city["$stype"];
|
||||||
if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; }
|
|
||||||
// 내정 상승
|
// 내정 상승
|
||||||
$query = "update city set {$stype}='$score' where city='{$general['city']}'";
|
$query = "update city set {$stype}='$score' where city='{$general['city']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -568,7 +567,6 @@ function process_5(&$general, $type) {
|
|||||||
$ded = CharDedication($ded, $general['personal']);
|
$ded = CharDedication($ded, $general['personal']);
|
||||||
|
|
||||||
$score += $city["$stype"];
|
$score += $city["$stype"];
|
||||||
if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; }
|
|
||||||
// 내정 상승
|
// 내정 상승
|
||||||
$query = "update city set {$stype}='$score' where city='{$general['city']}'";
|
$query = "update city set {$stype}='$score' where city='{$general['city']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -656,7 +654,6 @@ function process_7(&$general) {
|
|||||||
$ded = CharDedication($ded, $general['personal']);
|
$ded = CharDedication($ded, $general['personal']);
|
||||||
|
|
||||||
$score = $city['pop'] + ($score * 10);
|
$score = $city['pop'] + ($score * 10);
|
||||||
if($score > $city['pop2']) { $score = $city['pop2']; }
|
|
||||||
// 민심 상승
|
// 민심 상승
|
||||||
$query = "update city set pop='$score' where city='{$general['city']}'";
|
$query = "update city set pop='$score' where city='{$general['city']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -754,7 +751,6 @@ function process_8(&$general) {
|
|||||||
$ded = CharDedication($ded, $general['personal']);
|
$ded = CharDedication($ded, $general['personal']);
|
||||||
|
|
||||||
$score += $city["$stype"];
|
$score += $city["$stype"];
|
||||||
if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; }
|
|
||||||
// 내정 상승
|
// 내정 상승
|
||||||
$query = "update city set {$stype}='$score' where city='{$general['city']}'";
|
$query = "update city set {$stype}='$score' where city='{$general['city']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|||||||
@@ -186,13 +186,7 @@ function popIncrease() {
|
|||||||
if($cityrate > 100) { $cityrate = 100; }
|
if($cityrate > 100) { $cityrate = 100; }
|
||||||
if($cityrate < 0) { $cityrate = 0; }
|
if($cityrate < 0) { $cityrate = 0; }
|
||||||
}
|
}
|
||||||
if($pop > $city['pop2']) { $pop = $city['pop2']; }
|
|
||||||
if($pop < 0) { $pop = 0; }
|
if($pop < 0) { $pop = 0; }
|
||||||
if($agri > $city['agri2']) { $agri = $city['agri2']; }
|
|
||||||
if($comm > $city['comm2']) { $comm = $city['comm2']; }
|
|
||||||
if($secu > $city['secu2']) { $secu = $city['secu2']; }
|
|
||||||
if($def > $city['def2']) { $def= $city['def2']; }
|
|
||||||
if($wall > $city['wall2']) { $wall = $city['wall2']; }
|
|
||||||
|
|
||||||
//시세
|
//시세
|
||||||
$query = "update city set pop='$pop',rate='$cityrate',agri='$agri',comm='$comm',secu='$secu',def='$def',wall='$wall' where city='{$city['city']}'";
|
$query = "update city set pop='$pop',rate='$cityrate',agri='$agri',comm='$comm',secu='$secu',def='$def',wall='$wall' where city='{$city['city']}'";
|
||||||
|
|||||||
Reference in New Issue
Block a user