From 93b33ba383023524726c73c634b6309af1c91438 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 21 Apr 2019 02:30:12 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B2=9C=ED=86=B5=EC=8B=9C=20=EC=B5=9C?= =?UTF-8?q?=EC=86=8C=20=EB=AA=85=EC=A0=84=20=EB=93=B1=EB=A1=9D=20=EA=B0=80?= =?UTF-8?q?=EB=8A=A5=20=EC=97=B0=EB=8F=84=EB=A5=BC=20GameConst=EB=A1=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_gamerule.php | 9 ++------- hwe/sammo/GameConstBase.php | 2 ++ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/hwe/func_gamerule.php b/hwe/func_gamerule.php index 412cfa08..e4693500 100644 --- a/hwe/func_gamerule.php +++ b/hwe/func_gamerule.php @@ -1363,13 +1363,8 @@ function checkEmperior() { $gameStor->isunited = 2; $gameStor->conlimit = $gameStor->conlimit*100; - $query = "select no from general where npc<2 and age>=40"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - for($i=0; $i < $count; $i++) { - $general = MYDB_fetch_array($result); - CheckHall($general['no']); + foreach($db->queryFirstColumn('SELECT no FROM general WHERE npc<2 AND age>=%i', GameConst::$minPushHallAge) as $hallGeneralNo){ + CheckHall($hallGeneralNo); } $query = "select nation,name,type,color,gold,rice,power,gennum from nation where nation='{$nation['nation']}'"; diff --git a/hwe/sammo/GameConstBase.php b/hwe/sammo/GameConstBase.php index d0766d65..3bbb27d7 100644 --- a/hwe/sammo/GameConstBase.php +++ b/hwe/sammo/GameConstBase.php @@ -71,6 +71,8 @@ class GameConstBase public static $exchangeFee = 0.01; /** @var float 성인 연령 */ public static $adultAge = 14; + /** @var float 명전 등록 가능 연령 */ + public static $minPushHallAge = 40; /** @var int 최대 계급 */ public static $maxDedLevel = 30; /** @var int 최대 기술 레벨 */