game 테이블을 모두 gameStor로 변환
This commit is contained in:
+27
-77
@@ -195,9 +195,7 @@ function process_1(&$general, $type) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select startyear,year,month,develcost from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['startyear', 'year', 'month', 'develcost']);
|
||||
|
||||
if($type == 1) { $dtype = "농지 개간"; $atype = "을"; $btype = "은"; $stype = "agri"; }
|
||||
elseif($type == 2) { $dtype = "상업 투자"; $atype = "를"; $btype = "는"; $stype = "comm"; }
|
||||
@@ -297,9 +295,7 @@ function process_3(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select startyear,year,month,develcost from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['startyear', 'year', 'month', 'develcost']);
|
||||
|
||||
$dtype = "기술 연구";
|
||||
|
||||
@@ -398,9 +394,7 @@ function process_4(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select startyear,year,month,develcost from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['startyear', 'year', 'month', 'develcost']);
|
||||
|
||||
$query = "select * from city where city='{$general['city']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
@@ -490,9 +484,7 @@ function process_5(&$general, $type) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select startyear,year,month,develcost from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['startyear', 'year', 'month', 'develcost']);
|
||||
|
||||
if($type == 1) { $dtype = "수비 강화"; $stype = "def"; }
|
||||
elseif($type == 2) { $dtype = "성벽 보수"; $stype = "wall"; }
|
||||
@@ -592,9 +584,7 @@ function process_7(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select startyear,year,month,develcost from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['startyear', 'year', 'month', 'develcost']);
|
||||
|
||||
$query = "select * from city where city='{$general['city']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
@@ -684,9 +674,7 @@ function process_8(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select startyear,year,month,develcost from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['startyear', 'year', 'month', 'develcost']);
|
||||
|
||||
$dtype = "치안"; $stype = "secu";
|
||||
|
||||
@@ -784,9 +772,7 @@ function process_9(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select year,month,develcost from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year', 'month', 'develcost']);
|
||||
|
||||
$query = "select nation,supply from city where city='{$general['city']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
@@ -878,9 +864,7 @@ function process_11(&$general, $type) {
|
||||
if($type == 1) { $defaultatmos = GameConst::$defaultAtmosLow; $defaulttrain = GameConst::$defaultTrainLow; }
|
||||
else { $defaultatmos = GameConst::$defaultAtmosHigh; $defaulttrain = GameConst::$defaultTrainHigh; }
|
||||
|
||||
$query = "select year,month,startyear from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['startyear', 'year', 'month']);
|
||||
|
||||
$query = "select level,tech from nation where nation='{$general['nation']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
@@ -1062,9 +1046,7 @@ function process_13(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select year,month from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year', 'month']);
|
||||
|
||||
$nation = getNationStaticInfo($general['nation']);
|
||||
|
||||
@@ -1132,9 +1114,7 @@ function process_14(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select year,month from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year', 'month']);
|
||||
|
||||
$nation = getNationStaticInfo($general['nation']);
|
||||
|
||||
@@ -1195,9 +1175,7 @@ function process_15(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select year,month from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year', 'month']);
|
||||
|
||||
$query = "select nation,tech from nation where nation='{$general['nation']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
@@ -1269,9 +1247,7 @@ function process_16(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$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);
|
||||
$admin = $gameStor->getValues(['startyear', 'year', 'month']);
|
||||
|
||||
$query = "select nation,war,sabotagelimit,tech from nation where nation='{$general['nation']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
@@ -1363,9 +1339,7 @@ function process_17(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select year,month from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year', 'month']);
|
||||
|
||||
if($general['crew'] == 0) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:병사가 없습니다. 소집해제 실패. <1>$date</>";
|
||||
@@ -1407,7 +1381,7 @@ function process_21(&$general) {
|
||||
|
||||
|
||||
$db = DB::db();
|
||||
$admin = $db->queryFirstRow('SELECT year, month, develcost FROM game limit 1');
|
||||
$admin = $gameStor->getValues(['year', 'month', 'develcost']);
|
||||
$city = CityConst::byID($general['city']);
|
||||
$command = DecodeCommand($general['turn0']);
|
||||
$destination = $command[1];
|
||||
@@ -1469,9 +1443,7 @@ function process_26(&$general) {
|
||||
|
||||
$troop = getTroop($general['troop']);
|
||||
|
||||
$query = "select year,month from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year', 'month']);
|
||||
|
||||
$query = "select nation,name,supply from city where city='{$general['city']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
@@ -1536,9 +1508,7 @@ function process_28(&$general) {
|
||||
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select year,month from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year', 'month']);
|
||||
|
||||
$nation = getNationStaticInfo($general['nation']);
|
||||
|
||||
@@ -1601,9 +1571,7 @@ function process_30(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select year,month,develcost from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year', 'month', 'develcost']);
|
||||
|
||||
$query = "select path from city where city='{$general['city']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
@@ -1671,9 +1639,7 @@ function process_31(&$general) {
|
||||
$date = substr($general['turntime'],11,5);
|
||||
$msg = [];
|
||||
|
||||
$query = "select year,month,develcost from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year', 'month', 'develcost']);
|
||||
|
||||
$dist = searchDistance($general['city'], 2, false);
|
||||
$command = DecodeCommand($general['turn0']);
|
||||
@@ -1812,9 +1778,7 @@ function process_41(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select year,month,develcost from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year', 'month', 'develcost']);
|
||||
|
||||
$ratio = rand() % 100;
|
||||
$exp = $general['crew'] / 400;
|
||||
@@ -1882,9 +1846,7 @@ function process_42(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select year,month from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year', 'month']);
|
||||
|
||||
$type = rand() % 27 + 1;
|
||||
$exp = 30;
|
||||
@@ -2105,9 +2067,7 @@ function process_43(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select year,month from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year', 'month']);
|
||||
|
||||
$command = DecodeCommand($general['turn0']);
|
||||
$what = $command[3];
|
||||
@@ -2196,9 +2156,7 @@ function process_44(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select year,month from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year', 'month']);
|
||||
|
||||
$query = "select name,gold,rice from nation where nation='{$general['nation']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
@@ -2288,9 +2246,7 @@ function process_48(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select year,month from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year', 'month']);
|
||||
|
||||
$city = getCity($general['city']);
|
||||
|
||||
@@ -2398,9 +2354,7 @@ function process_49(&$general) {
|
||||
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select year,month from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year', 'month']);
|
||||
|
||||
$nation = getNationStaticInfo($general['nation']);
|
||||
|
||||
@@ -2535,11 +2489,9 @@ function process_50(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select month from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$month = $gameStor->month;
|
||||
|
||||
$log[] = "<C>●</>{$admin['month']}월:건강 회복을 위해 요양합니다. <1>$date</>";
|
||||
$log[] = "<C>●</>{$month}월:건강 회복을 위해 요양합니다. <1>$date</>";
|
||||
// 경험치 상승 // 공헌도, 명성 상승
|
||||
$exp = 10;
|
||||
$ded = 7;
|
||||
@@ -2563,9 +2515,7 @@ function process_99(&$general) {
|
||||
$history = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$query = "select year,month from game limit 1";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$admin = MYDB_fetch_array($result);
|
||||
$admin = $gameStor->getValues(['year', 'month']);
|
||||
|
||||
$log[] = "<C>●</>{$admin['month']}월:아직 구현되지 않았습니다. <1>$date</>";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user