From 2c98777b9f9559029db5b7ea3019b1c92627a503 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Tue, 23 Oct 2018 23:33:12 +0900 Subject: [PATCH] =?UTF-8?q?=EB=93=B1=EC=9A=A9=EC=9E=A5=20=EB=AC=B4?= =?UTF-8?q?=ED=9A=A8=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func.php | 7 +++++-- hwe/func_process_personnel.php | 7 +++++-- hwe/process_war.php | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/hwe/func.php b/hwe/func.php index bd075c42..1648b249 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -437,7 +437,7 @@ function commandTable() { $connect=$db->get(); $userID = Session::getUserID(); - $admin = $gameStor->getValues(['startyear', 'year', 'month', 'develcost', 'scenario']); + $admin = $gameStor->getValues(['startyear', 'year', 'month', 'develcost', 'scenario', 'join_mode']); $query = "select no,npc,troop,city,nation,level,crew,makelimit,special from general where owner='{$userID}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -554,7 +554,10 @@ function commandTable() { addCommand("인재탐색(랜덤경험, 자금$develcost)", 29, 0); } - if($me['level'] >= 1 && $city['supply'] != 0) { + if($admin['join_mode'] == 'onlyRandom'){ + //do Nothing + } + else if($me['level'] >= 1 && $city['supply'] != 0) { addCommand("등용(자금{$develcost5}+장수가치)", 22); } else { addCommand("등용(자금{$develcost5}+장수가치)", 22, 0); diff --git a/hwe/func_process_personnel.php b/hwe/func_process_personnel.php index 16a216a4..bc21653b 100644 --- a/hwe/func_process_personnel.php +++ b/hwe/func_process_personnel.php @@ -11,7 +11,7 @@ function process_22(&$general) { $history = []; $date = substr($general['turntime'],11,5); - $admin = $gameStor->getValues(['startyear','year','month','develcost']); + $admin = $gameStor->getValues(['startyear','year','month','develcost','join_mode']); $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -26,7 +26,10 @@ function process_22(&$general) { $cost = Util::round($admin['develcost'] + ($you['experience'] + $you['dedication'])/1000) * 10; - if(!$you) { + if($admin['join_mode'] == 'onlyRandom'){ + $log[] = "●{$admin['month']}월:랜덤 임관만 가능합니다. 등용 실패. <1>$date"; + } + else if(!$you) { $log[] = "●{$admin['month']}월:없는 장수입니다. 등용 실패. <1>$date"; } elseif($admin['year'] < $admin['startyear']+3) { $log[] = "●{$admin['month']}월:초반 제한중입니다. 등용 실패. <1>$date"; diff --git a/hwe/process_war.php b/hwe/process_war.php index 18b211b3..5f43e536 100644 --- a/hwe/process_war.php +++ b/hwe/process_war.php @@ -561,7 +561,7 @@ function ConquerCity($admin, $general, $city, $nation, $destnation) { $loseGeneralRice += $loseRice; //모두 등용장 발부 - if(Util::randBool(0.5)) { + if($admin['join_mode'] != 'onlyRandom' && Util::randBool(0.5)) { $msg = ScoutMessage::buildScoutMessage($general['no'], $gen['no']); if($msg){ $msg->send(true);