From 1e7e01b6b0aed9a341bd023568a3157332abeb81 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 5 Oct 2019 02:45:20 +0900 Subject: [PATCH] gen123 => officer432 --- hwe/b_currentCity.php | 23 +- hwe/b_myBossInfo.php | 38 +-- hwe/b_myCityInfo.php | 38 ++- hwe/b_myPage.php | 4 +- hwe/c_myBossInfo.php | 43 +-- hwe/func.php | 341 ++++----------------- hwe/func_gamerule.php | 12 +- hwe/func_process_chief.php | 6 +- hwe/func_time_event.php | 12 +- hwe/index.php | 4 +- hwe/j_simulate_battle.php | 10 +- hwe/js/battle_simulator.js | 18 +- hwe/process_war.php | 16 +- hwe/sammo/CityConstBase.php | 6 +- hwe/sammo/Command/General/che_귀환.php | 16 +- hwe/sammo/Command/General/che_모반시도.php | 19 +- hwe/sammo/Command/General/che_방랑.php | 6 +- hwe/sammo/Command/General/che_선양.php | 15 +- hwe/sammo/Engine/Personnel.php | 10 +- hwe/sammo/Event/Action/RaiseInvader.php | 24 +- hwe/sammo/General.php | 19 +- hwe/sammo/GeneralAI.php | 10 +- hwe/sammo/TriggerGeneralLevel.php | 16 +- hwe/sammo/WarUnitGeneral.php | 8 +- hwe/schema.sql.orig | 12 +- hwe/sql/schema.sql | 12 +- hwe/templates/mainCityInfo.php | 47 +++ 27 files changed, 299 insertions(+), 486 deletions(-) create mode 100644 hwe/templates/mainCityInfo.php diff --git a/hwe/b_currentCity.php b/hwe/b_currentCity.php index 6681d8ac..81a5a08f 100644 --- a/hwe/b_currentCity.php +++ b/hwe/b_currentCity.php @@ -180,9 +180,20 @@ $city = $db->queryFirstRow('SELECT * FROM city WHERE city=%i', $citylist); $cityNation = getNationStaticInfo($city['nation']); //태수, 군사, 종사 -$gen1 = $db->queryFirstRow('SELECT `name`, npc FROM general WHERE `no`=%i', $city['gen1']); -$gen2 = $db->queryFirstRow('SELECT `name`, npc FROM general WHERE `no`=%i', $city['gen2']); -$gen3 = $db->queryFirstRow('SELECT `name`, npc FROM general WHERE `no`=%i', $city['gen3']); +$officer = [ + 4=>['name'=>'-', 'npc'=>0], + 3=>['name'=>'-', 'npc'=>0], + 2=>['name'=>'-', 'npc'=>0] +]; +$officerQuery = []; +if($city['officer4']){ $officerQuery[] = $city['officer4']; } +if($city['officer3']){ $officerQuery[] = $city['officer3']; } +if($city['officer2']){ $officerQuery[] = $city['officer2']; } +if($officerQuery){ + foreach($db->query('SELECT `name`, npc, `level` FROM general WHERE `no` IN %li', $city['officer4']) as $officerInfo){ + $officer[$officerInfo['level']] = $officerInfo; + } +} if($city['trade'] === null) { $city['trade'] = "- "; @@ -433,11 +444,11 @@ foreach($generalsFormat as $general){ 인구 % 태수 - + 군사 - + 종사 - + 도시명 diff --git a/hwe/b_myBossInfo.php b/hwe/b_myBossInfo.php index eca284df..68951c7d 100644 --- a/hwe/b_myBossInfo.php +++ b/hwe/b_myBossInfo.php @@ -364,7 +364,7 @@ if($meLevel >= 5) { "; - $query = "select city,name,region from city where nation='{$nation['nation']}' and gen2set=0 order by region,level desc,binary(name)"; // 도시 이름 목록 + $query = "select city,name,region from city where nation='{$nation['nation']}' and officer3set=0 order by region,level desc,binary(name)"; // 도시 이름 목록 $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($result); @@ -472,7 +472,7 @@ if($meLevel >= 5) {