From 166eafe4ee129e06e3609679c2d47a60cafb63aa Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 13 May 2018 01:26:44 +0900 Subject: [PATCH] =?UTF-8?q?game=20=ED=85=8C=EC=9D=B4=EB=B8=94=EC=9D=84=20K?= =?UTF-8?q?VStorage=EB=A1=9C=20=EC=9D=BC=EB=B6=80=20=EB=8C=80=EC=B2=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/a_history.php | 2 +- hwe/b_betting.php | 8 +-- hwe/b_chiefcenter.php | 4 -- hwe/b_dipcenter.php | 4 -- hwe/b_genList.php | 4 -- hwe/b_tournament.php | 4 +- hwe/func.php | 104 ++++++++++++++++-------------------- hwe/func_gamerule.php | 4 +- hwe/func_history.php | 4 +- hwe/index.php | 6 +-- hwe/j_server_basic_info.php | 16 +++--- hwe/join.php | 4 +- src/sammo/KVStorage.php | 1 + 13 files changed, 67 insertions(+), 98 deletions(-) diff --git a/hwe/a_history.php b/hwe/a_history.php index dc2fb21d..9eb80df3 100644 --- a/hwe/a_history.php +++ b/hwe/a_history.php @@ -18,7 +18,7 @@ $connect=$db->get(); increaseRefresh("연감", 2); -$admin = $gameStor->getValues(['startyear','year','month','conlimit']); +$admin = $gameStor->getValues(['startyear','year','month']); $query = "select con,turntime from general where owner='{$userID}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); diff --git a/hwe/b_betting.php b/hwe/b_betting.php index c8a7f23d..5e17c32b 100644 --- a/hwe/b_betting.php +++ b/hwe/b_betting.php @@ -18,9 +18,11 @@ $query = "select no,tournament,con,turntime,bet0+bet1+bet2+bet3+bet4+bet5+bet6+b $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); $me = MYDB_fetch_array($result); -$query = "select conlimit,tournament,phase,tnmt_type,develcost,bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from game limit 1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); -$admin = MYDB_fetch_array($result); +$admin = $gameStor->getValues(['tournament','phase','tnmt_type','develcost','bet0','bet1','bet2','bet3','bet4','bet5','bet6','bet7','bet8','bet9','bet10','bet11','bet12','bet13','bet14','bet15']); +$admin['bet'] = + $admin['bet0'] + $admin['bet1'] + $admin['bet2'] + $admin['bet3'] + $admin['bet4'] + + $admin['bet5'] + $admin['bet6'] + $admin['bet7'] + $admin['bet8'] + $admin['bet9'] + + $admin['bet10'] + $admin['bet11'] + $admin['bet12'] + $admin['bet13'] + $admin['bet14'] + $admin['bet15']; $con = checkLimit($me['con']); if ($con >= 2) { diff --git a/hwe/b_chiefcenter.php b/hwe/b_chiefcenter.php index 7d27af4a..fcaa6017 100644 --- a/hwe/b_chiefcenter.php +++ b/hwe/b_chiefcenter.php @@ -13,10 +13,6 @@ $connect=$db->get(); increaseRefresh("사령부", 1); -$query = "select conlimit from game limit 1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$admin = MYDB_fetch_array($result); - $query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/hwe/b_dipcenter.php b/hwe/b_dipcenter.php index 13f514db..0076211f 100644 --- a/hwe/b_dipcenter.php +++ b/hwe/b_dipcenter.php @@ -13,10 +13,6 @@ $connect=$db->get(); increaseRefresh("내무부", 1); -$query = "select conlimit from game limit 1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); -$admin = MYDB_fetch_array($result); - $query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); $me = MYDB_fetch_array($result); diff --git a/hwe/b_genList.php b/hwe/b_genList.php index 5e963d5f..35a4fc84 100644 --- a/hwe/b_genList.php +++ b/hwe/b_genList.php @@ -21,10 +21,6 @@ $connect=$db->get(); increaseRefresh("암행부", 2); -$query = "select conlimit from game limit 1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); -$admin = MYDB_fetch_array($result); - $query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); $me = MYDB_fetch_array($result); diff --git a/hwe/b_tournament.php b/hwe/b_tournament.php index 129ffe1d..8802dc37 100644 --- a/hwe/b_tournament.php +++ b/hwe/b_tournament.php @@ -18,9 +18,7 @@ $query = "select no,tournament,con,turntime from general where owner='{$userID}' $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); $me = MYDB_fetch_array($result); -$query = "select conlimit,tournament,phase,tnmt_msg,tnmt_type,develcost,tnmt_trig from game limit 1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); -$admin = MYDB_fetch_array($result); +$admin = $gameStor->getValues(['tournament','phase','tnmt_msg','tnmt_type','develcost','tnmt_trig']); $con = checkLimit($me['con']); if ($con >= 2) { diff --git a/hwe/func.php b/hwe/func.php index 459c2da8..56d7d8eb 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -1088,14 +1088,9 @@ function generalInfo2($no) { function adminMsg() { $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); - $connect=$db->get(); + $msg = $gameStor->msg; - $query = "select msg from game limit 1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - echo "운영자 메세지 : "; - echo $admin['msg'].""; + return "운영자 메세지 : $msg"; } function getOnlineNum() { @@ -1105,17 +1100,12 @@ function getOnlineNum() { function onlinegen() { $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); - $connect=$db->get(); $onlinegen = ""; $generalID = Session::getInstance()->generalID; $nationID = DB::db()->queryFirstField('select `nation` from `general` where `no` = %i', $generalID); if($nationID === null || Util::toInt($nationID) === 0) { - $query = "select onlinegen from game limit 1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $game = MYDB_fetch_array($result); - - $onlinegen = $game['onlinegen']; + $onlinegen = $gameStor->onlinegen; } else { $onlinegen = DB::db()->queryFirstField('select onlinegen from nation where nation=%i',$nationID); } @@ -1125,12 +1115,8 @@ function onlinegen() { function onlineNation() { $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); - $connect=$db->get(); - $query = "select onlinenation from game limit 1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $game = MYDB_fetch_array($result); - return $game['onlinenation']; + return $gameStor->onlinenation; } function nationMsg() { @@ -1344,20 +1330,20 @@ function updateTraffic() { $online = getOnlineNum(); $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); - $game = $gameStor->getValues(['year','month','refresh','maxonline','maxrefresh']); + $game_env = $gameStor->getValues(['year','month','refresh','maxonline','maxrefresh']); //최다갱신자 $user = $db->queryFirstRow('select name,refresh from general order by refresh desc limit 1'); - if($game['maxrefresh'] < $game['refresh']) { - $game['maxrefresh'] = $game['refresh']; + if($game_env['maxrefresh'] < $game_env['refresh']) { + $game_env['maxrefresh'] = $game_env['refresh']; } - if($game['maxonline'] < $online) { - $game['maxonline'] = $online; + if($game_env['maxonline'] < $online) { + $game_env['maxonline'] = $online; } $gameStor->refresh = 0; - $gameStor->maxrefresh = $game['maxrefresh']; - $gameStor->maxonline = $game['maxonline']; + $gameStor->maxrefresh = $game_env['maxrefresh']; + $gameStor->maxonline = $game_env['maxonline']; $db->update('general', ['refresh'=>0], true); @@ -1366,9 +1352,9 @@ function updateTraffic() { file_put_contents(__dir__."/logs/_traffic.txt", Json::encode([ $date, - $game['year'], - $game['month'], - $game['refresh'], + $game_env['year'], + $game_env['month'], + $game_env['refresh'], $online, $user['name']."(".$user['refresh'].")" ])."\n" @@ -1379,12 +1365,12 @@ function CheckOverhead() { //서버정보 $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); - $admin = $db->queryFirstRow('SELECT turnterm, conlimit from game LIMIT 1'); + list($turnterm, $conlimit) = $gameStor->getValuesAsArray(['turnterm', 'conlimit']); - $con = Util::round(pow($admin['turnterm'], 0.6) * 3) * 10; + $con = Util::round(pow($turnterm, 0.6) * 3) * 10; - if($con != $admin['conlimit']){ + if($con != $conlimit){ $db->update('game', [ 'conlimit' => $con ], true); @@ -2187,13 +2173,13 @@ function uniqueItem($general, $log, $vote=0) { $query = "select year,month,scenario from game limit 1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $game = MYDB_fetch_array($result); + $game_env = MYDB_fetch_array($result); $query = "select count(*) as cnt from general where npc<2"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($result); - if($game['scenario'] == 0) { $prob = $gen['cnt'] * 5; } // 5~6개월에 하나씩 등장 + if($game_env['scenario'] == 0) { $prob = $gen['cnt'] * 5; } // 5~6개월에 하나씩 등장 else { $prob = $gen['cnt']; } // 1~2개월에 하나씩 등장 if($vote == 1) { $prob = Util::round($gen['cnt'] * 0.7 / 3); } // 투표율 70%, 투표 한번에 2~3개 등장 @@ -2234,63 +2220,63 @@ function uniqueItem($general, $log, $vote=0) { switch($sel) { case 0: $log[] = "".getWeapName($it)."(을)를 습득했습니다!"; - $alllog[0] = "●{$game['month']}월:{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; - pushGeneralHistory($general, "●{$game['year']}년 {$game['month']}월:".getWeapName($it)."(을)를 습득"); + $alllog[0] = "●{$game_env['month']}월:{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + pushGeneralHistory($general, "●{$game_env['year']}년 {$game_env['month']}월:".getWeapName($it)."(을)를 습득"); if($vote == 0) { - $history[] = "●{$game['year']}년 {$game['month']}월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $history[] = "●{$game_env['year']}년 {$game_env['month']}월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; } elseif($vote == 1) { - $history[] = "●{$game['year']}년 {$game['month']}월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $history[] = "●{$game_env['year']}년 {$game_env['month']}월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; } elseif($vote == 2) { - $history[] = "●{$game['year']}년 {$game['month']}월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $history[] = "●{$game_env['year']}년 {$game_env['month']}월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; } elseif($vote == 3) { - $history[] = "●{$game['year']}년 {$game['month']}월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $history[] = "●{$game_env['year']}년 {$game_env['month']}월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; } break; case 1: $log[] = "".getBookName($it)."(을)를 습득했습니다!"; - $alllog[0] = "●{$game['month']}월:{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; - pushGeneralHistory($general, "●{$game['year']}년 {$game['month']}월:".getBookName($it)."(을)를 습득"); + $alllog[0] = "●{$game_env['month']}월:{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; + pushGeneralHistory($general, "●{$game_env['year']}년 {$game_env['month']}월:".getBookName($it)."(을)를 습득"); if($vote == 0) { - $history[] = "●{$game['year']}년 {$game['month']}월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $history[] = "●{$game_env['year']}년 {$game_env['month']}월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; } elseif($vote == 1) { - $history[] = "●{$game['year']}년 {$game['month']}월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $history[] = "●{$game_env['year']}년 {$game_env['month']}월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; } elseif($vote == 2) { - $history[] = "●{$game['year']}년 {$game['month']}월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $history[] = "●{$game_env['year']}년 {$game_env['month']}월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; } elseif($vote == 3) { - $history[] = "●{$game['year']}년 {$game['month']}월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $history[] = "●{$game_env['year']}년 {$game_env['month']}월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; } break; case 2: $log[] = "".getHorseName($it)."(을)를 습득했습니다!"; - $alllog[0] = "●{$game['month']}월:{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; - pushGeneralHistory($general, "●{$game['year']}년 {$game['month']}월:".getHorseName($it)."(을)를 습득"); + $alllog[0] = "●{$game_env['month']}월:{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + pushGeneralHistory($general, "●{$game_env['year']}년 {$game_env['month']}월:".getHorseName($it)."(을)를 습득"); if($vote == 0) { - $history[] = "●{$game['year']}년 {$game['month']}월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $history[] = "●{$game_env['year']}년 {$game_env['month']}월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; } elseif($vote == 1) { - $history[] = "●{$game['year']}년 {$game['month']}월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $history[] = "●{$game_env['year']}년 {$game_env['month']}월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; } elseif($vote == 2) { - $history[] = "●{$game['year']}년 {$game['month']}월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $history[] = "●{$game_env['year']}년 {$game_env['month']}월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; } elseif($vote == 3) { - $history[] = "●{$game['year']}년 {$game['month']}월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $history[] = "●{$game_env['year']}년 {$game_env['month']}월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; } break; case 3: $log[] = "".getItemName($it)."(을)를 습득했습니다!"; - $alllog[0] = "●{$game['month']}월:{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; - pushGeneralHistory($general, "●{$game['year']}년 {$game['month']}월:".getItemName($it)."(을)를 습득"); + $alllog[0] = "●{$game_env['month']}월:{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; + pushGeneralHistory($general, "●{$game_env['year']}년 {$game_env['month']}월:".getItemName($it)."(을)를 습득"); if($vote == 0) { - $history[] = "●{$game['year']}년 {$game['month']}월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $history[] = "●{$game_env['year']}년 {$game_env['month']}월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; } elseif($vote == 1) { - $history[] = "●{$game['year']}년 {$game['month']}월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $history[] = "●{$game_env['year']}년 {$game_env['month']}월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; } elseif($vote == 2) { - $history[] = "●{$game['year']}년 {$game['month']}월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $history[] = "●{$game_env['year']}년 {$game_env['month']}월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; } elseif($vote == 3) { - $history[] = "●{$game['year']}년 {$game['month']}월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $history[] = "●{$game_env['year']}년 {$game_env['month']}월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; } break; } - pushGeneralPublicRecord($alllog, $game['year'], $game['month']); - pushWorldHistory($history, $game['year'], $game['month']); + pushGeneralPublicRecord($alllog, $game_env['year'], $game_env['month']); + pushWorldHistory($history, $game_env['year'], $game_env['month']); } } return $log; diff --git a/hwe/func_gamerule.php b/hwe/func_gamerule.php index accae1a6..ec518c6a 100644 --- a/hwe/func_gamerule.php +++ b/hwe/func_gamerule.php @@ -1193,8 +1193,8 @@ function checkEmperior() { if($count == $allcount) { pushNationHistory($nation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}(이)가 전토를 통일"); - $query = "update game set isUnited=2,conlimit=conlimit*100"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gameStor->isUnited = 2; + $gameStor->conlimit = $gameStor->conlimit*100; $query = "select no from general where npc<2 and age>=45"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); diff --git a/hwe/func_history.php b/hwe/func_history.php index 30e2374f..fd6386d0 100644 --- a/hwe/func_history.php +++ b/hwe/func_history.php @@ -202,9 +202,7 @@ function pushGeneralPublicRecord(array $history, $year=null, $month=null) { $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); if($year === null || $month === null){ - $game = $db->queryFirstRow('SELECT year, month FROM game LIMIT 1'); - $year = $game['year']; - $month = $game['month']; + list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']); } $request = array_map(function($text) use ($year, $month) { return ['year'=>$year, 'month'=>$month, 'text'=>$text]; diff --git a/hwe/index.php b/hwe/index.php index f9f57162..33ae8d3f 100644 --- a/hwe/index.php +++ b/hwe/index.php @@ -40,9 +40,7 @@ if ($me['newmsg'] == 1 || $me['newvote'] == 1) { ], 'owner=%i', $userID); } -$query = "select develcost,online,conlimit,tournament,tnmt_type,turnterm,scenario,scenario_text,extended_general,fiction,npcmode,vote from game limit 1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); -$admin = MYDB_fetch_array($result); +$admin = $gameStor->getValues(['develcost','online','conlimit','tournament','tnmt_type','turnterm','scenario','scenario_text','extended_general','fiction','npcmode','vote']); $query = "select plock from plock limit 1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); @@ -196,7 +194,7 @@ echo " "; ?> 접속중인 국가: - + 【 국가방침 】 【 접속자 】 getValues(['isUnited', 'npcMode', 'year', 'month', 'scenario', 'scenario_text', 'maxgeneral', 'turnTerm']); -$game['maxUserCnt'] = $game['maxgeneral']; -unset($game['maxgeneral']); +$game_env = $gameStor->getValues(['isUnited', 'npcMode', 'year', 'month', 'scenario', 'scenario_text', 'maxgeneral', 'turnTerm']); +$game_env['maxUserCnt'] = $game_env['maxgeneral']; +unset($game_env['maxgeneral']); $nationCnt = $db->queryFirstField('SELECT count(`nation`) from nation where `level` > 0'); $genCnt = $db->queryFirstField('SELECT count(`no`) from general where `npc` < 2'); $npcCnt = $db->queryFirstField('SELECT count(`no`) from general where `npc` >= 2'); -$game['scenario'] = $game['scenario_text']; -$game['userCnt'] = $genCnt; -$game['npcCnt'] = $npcCnt; -$game['nationCnt'] = $nationCnt; +$game_env['scenario'] = $game_env['scenario_text']; +$game_env['userCnt'] = $genCnt; +$game_env['npcCnt'] = $npcCnt; +$game_env['nationCnt'] = $nationCnt; $me = []; @@ -75,6 +75,6 @@ if($general){ //TODO: 이를 표현하는 방법은 '이전 버전'의 serverListPost.php를 참고할 것. Json::die([ - 'game'=>$game, + 'game'=>$game_env, 'me'=>$me?:null ]); \ No newline at end of file diff --git a/hwe/join.php b/hwe/join.php index 76a45232..87de950c 100644 --- a/hwe/join.php +++ b/hwe/join.php @@ -47,9 +47,7 @@ $connect=$db->get(); getValues(['show_img_level','maxgeneral']); $query = "select no from general where npc<2"; $result = MYDB_query($query, $connect) or Error("join ".MYDB_error($connect), ""); diff --git a/src/sammo/KVStorage.php b/src/sammo/KVStorage.php index 8c19face..43be78db 100644 --- a/src/sammo/KVStorage.php +++ b/src/sammo/KVStorage.php @@ -154,6 +154,7 @@ class KVStorage{ $result = []; $notExists = []; + //TODO: DB Select에서 as를 쓸 수 있으면 좋을 듯. foreach($keys as $key){ if(!key_exists($key, $this->cacheData)){ $notExists[] = $key;