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 최대 기술 레벨 */