From 6206b38a78a281399a0fb117fa2608d12ca4f770 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 11 Nov 2018 23:30:39 +0900 Subject: [PATCH] =?UTF-8?q?=ED=95=B4=EC=82=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_process_personnel.php | 54 -------------------------- hwe/sammo/Command/General/che_해산.php | 17 ++++---- 2 files changed, 9 insertions(+), 62 deletions(-) diff --git a/hwe/func_process_personnel.php b/hwe/func_process_personnel.php index 5d272b40..7f3b2bb5 100644 --- a/hwe/func_process_personnel.php +++ b/hwe/func_process_personnel.php @@ -74,60 +74,6 @@ function process_47(&$general) { pushGenLog($general, $log); } -function process_56(&$general) { - $db = DB::db(); - $gameStor = KVStorage::getStorage($db, 'game_env'); - $connect=$db->get(); - - $log = []; - $alllog = []; - $history = []; - $date = substr($general['turntime'],11,5); - - $admin = $gameStor->getValues(['year','month']); - - $nation = getNationStaticInfo($general['nation']); - - $query = "select city from city where nation='{$general['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $citycount = MYDB_num_rows($result); - - if($general['level'] != 12) { - $log[] = "●{$admin['month']}월:군주가 아닙니다. <1>$date"; - } elseif($citycount != 0) { - $log[] = "●{$admin['month']}월:방랑군이 아닙니다. <1>$date"; - } else { - $josaYi = JosaUtil::pick($general['name'], '이'); - $log[] = "●{$admin['month']}월:세력을 해산했습니다. <1>$date"; - $alllog[] = "●{$admin['month']}월:{$general['name']}{$josaYi} 세력을 해산했습니다."; - $josaUl = JosaUtil::pick($nation['name'], '을'); - pushGeneralHistory($general, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}{$josaUl} 해산"); - - $query = "select no from general where nation='{$general['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($result); - - // 수동 해산인 국가 페널티, 자금, 군량 - if($genCount > 1) { - $query = "update general set resturn='SUCCESS' where no='{$general['no']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set gold=1000 where nation='{$general['nation']}' and gold>1000"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set rice=1000 where nation='{$general['nation']}' and rice>1000"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - //분쟁기록 모두 지움 - DeleteConflict($general['nation']); - deleteNation($general); - - refreshNationStaticInfo(); - } - pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']); - pushGenLog($general, $log); -} - - function process_57(&$general) { $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); diff --git a/hwe/sammo/Command/General/che_해산.php b/hwe/sammo/Command/General/che_해산.php index ca13dd9a..2554e2f1 100644 --- a/hwe/sammo/Command/General/che_해산.php +++ b/hwe/sammo/Command/General/che_해산.php @@ -82,14 +82,15 @@ class che_해산 extends Command\GeneralCommand{ $nationName = $nation['name']; $josaUl = JosaUtil::pick($nationName, '을'); - if($nation['gennum'] > 1){ - $db->update('general', [ - 'gold'=>GameConst::$defaultGold - ], 'nation=%i AND gold>%i', $nationID, GameConst::$defaultGold); - $db->update('general', [ - 'rice'=>GameConst::$defaultRice - ], 'nation=%i AND gold>%i', $nationID, GameConst::$defaultRice); - } + $db->update('general', [ + 'gold'=>GameConst::$defaultGold + ], 'nation=%i AND gold>%i', $nationID, GameConst::$defaultGold); + $db->update('general', [ + 'rice'=>GameConst::$defaultRice + ], 'nation=%i AND gold>%i', $nationID, GameConst::$defaultRice); + + $general->increaseVarWithLimit('gold', 0, 0, GameConst::$defaultGold); + $general->increaseVarWithLimit('rice', 0, 0, GameConst::$defaultRice); DeleteConflict($nationID); deleteNation($general);