diff --git a/hwe/_admin1.php b/hwe/_admin1.php index 66c069d2..1a65ba48 100644 --- a/hwe/_admin1.php +++ b/hwe/_admin1.php @@ -62,8 +62,8 @@ $admin = getAdmin(); > - 기준 장수수 - > + + 현재 수입률 % diff --git a/hwe/_admin1_submit.php b/hwe/_admin1_submit.php index 0f33955c..bcaf9c7f 100644 --- a/hwe/_admin1_submit.php +++ b/hwe/_admin1_submit.php @@ -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분턴": diff --git a/hwe/func_gamerule.php b/hwe/func_gamerule.php index 08e081eb..f3eb03a2 100644 --- a/hwe/func_gamerule.php +++ b/hwe/func_gamerule.php @@ -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; diff --git a/hwe/j_install.php b/hwe/j_install.php index b6592f42..d231ac33 100644 --- a/hwe/j_install.php +++ b/hwe/j_install.php @@ -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, diff --git a/hwe/sammo/GameConst.php b/hwe/sammo/GameConst.php index 3fe47c18..f80d05a4 100644 --- a/hwe/sammo/GameConst.php +++ b/hwe/sammo/GameConst.php @@ -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; } diff --git a/hwe/sql/schema.sql b/hwe/sql/schema.sql index d0511349..f7f62d28 100644 --- a/hwe/sql/schema.sql +++ b/hwe/sql/schema.sql @@ -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',