normgeneral 삭제

This commit is contained in:
2018-04-08 12:31:42 +09:00
parent 7875e6885f
commit 493b3c7d97
6 changed files with 17 additions and 17 deletions
+2 -2
View File
@@ -62,8 +62,8 @@ $admin = getAdmin();
<td width=285><input type=text size=3 maxlength=2 style=color:white;background-color:black;text-align:right; name=maxnation value=<?=$admin['maxnation'];?>><input type=submit name=btn value=변경3></td>
</tr>
<tr>
<td width=110 align=right>기준 장수수</td>
<td width=285><input type=text size=3 maxlength=3 style=color:white;background-color:black;text-align:right; name=gen_rate value=<?=$admin['normgeneral'];?>><input type=submit name=btn value=변경5></td>
<td width=110 align=right></td>
<td width=285></td>
<td width=110 align=right>현재 수입률</td>
<td width=285><?=$admin['gold_rate'];?>%</td>
</tr>
+4 -4
View File
@@ -22,6 +22,10 @@ if(!$v->validate()){
Error($v->errorStr());
}
$log = Util::getReq('log');
$starttime = Util::getReq('starttime', 'string', (new DateTime())->format('Y-m-d H:i:s'));
$maxgeneral = Util::getReq('maxgeneral', 'int', 500);
$maxnation = Util::getReq('maxnation', 'int', 55);
$db = DB::db();
@@ -57,10 +61,6 @@ switch($btn) {
$query = "update game set startyear='$startyear'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
break;
case "변경5":
$query = "update game set normgeneral='$gen_rate'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
break;
case "1분턴":
case "2분턴":
case "5분턴":
+1 -6
View File
@@ -345,7 +345,7 @@ function preUpdateMonthly() {
if($result == false) { return false; }
$query = "select startyear,year,month,normgeneral from game limit 1";
$query = "select startyear,year,month from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
@@ -424,11 +424,6 @@ function preUpdateMonthly() {
$rate = round(($admin['year'] - $admin['startyear']) / 1.5) + 60;
if($rate > 100) $rate = 100;
//금률 쌀률, 내정비용
// $query = "select count(*) as cnt from general";
// $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
// $gencount = MYDB_fetch_array($result); // 전체 등록자 수
// $ratio = 50 + round($gencount['cnt'] / $admin['normgeneral'] * 100 / 2); // 300명 등록시에 100% 지급
$ratio = 100;
// 20 ~ 140원
$develcost = ($admin['year'] - $admin['startyear'] + 10) * 2;
+3 -4
View File
@@ -171,9 +171,8 @@ $env = [
'year'=> $year,
'month'=> $month,
'msg'=>'공지사항',//TODO:공지사항
'maxgeneral'=>500,
'normgeneral'=>300,
'maxnation'=>55,
'maxgeneral'=>GameConst::$defaultMaxGeneral,
'maxnation'=>GameConst::$defaultMaxNation,
'conlimit'=>300,
'gold_rate'=>100,
'rice_rate'=>100,
@@ -181,7 +180,7 @@ $env = [
'starttime'=>$starttime,
'turnterm'=>$turnterm,
'killturn'=>$killturn,
'genius'=>5,
'genius'=>GameConst::$defaultMaxGenius,
'show_img_level'=>$show_img_level,
'npcmode'=>$npcmode,
'extended_general'=>$extend,
+7
View File
@@ -71,4 +71,11 @@ class GameConst
public static $taxrate = 0.01;
/** @var float 성인 연령 */
public static $adultAge = 14;
/** @var int 초기 최대 장수수 */
public static $defaultMaxGeneral = 500;
/** @var int 초기 최대 국가 수 */
public static $defaultMaxNation = 55;
/** @var int 초기 최대 천재 수 */
public static $defaultMaxGenius = 5;
}
-1
View File
@@ -371,7 +371,6 @@ CREATE TABLE `game` (
`msg` TEXT NULL DEFAULT '',
`maxgeneral` INT(3) NULL DEFAULT '100',
`genius` INT(2) NULL DEFAULT '3',
`normgeneral` INT(3) NULL DEFAULT '100',
`maxnation` INT(3) NULL DEFAULT '50',
`gold_rate` INT(3) NULL DEFAULT '100',
`rice_rate` INT(3) NULL DEFAULT '100',