From 5df66ede365af1f494c6a0f37676b2cb1f919596 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 6 Oct 2019 02:02:31 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=A5=EC=88=98=20=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/_admin7.php | 25 ++++++++++++------------ hwe/a_genList.php | 2 +- hwe/func.php | 4 ++-- hwe/sammo/ActionSpecialDomestic/None.php | 2 +- hwe/sammo/ActionSpecialWar/None.php | 2 +- hwe/sammo/General.php | 2 +- 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/hwe/_admin7.php b/hwe/_admin7.php index 16150bc6..765bc713 100644 --- a/hwe/_admin7.php +++ b/hwe/_admin7.php @@ -74,28 +74,29 @@ $sel[$type] = "selected"; @@ -109,7 +110,7 @@ for($i=0; $i < $gencount; $i++) { - +   diff --git a/hwe/a_genList.php b/hwe/a_genList.php index fa5b3617..7181eb01 100644 --- a/hwe/a_genList.php +++ b/hwe/a_genList.php @@ -129,7 +129,7 @@ echo" foreach($generalList as $general){ $nation = $nationname[$general['nation']]; - $lbonus = calcLeadershipBonus($general['level'], $nationlevel[$general['nation']]); + $lbonus = calcLeadershipBonus($general['level'], $nationlevel[$general['nation']]??0); if ($lbonus > 0) { $lbonusText = "+{$lbonus}"; } else { diff --git a/hwe/func.php b/hwe/func.php index 1a6d36c0..bf6d8cd6 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -729,8 +729,8 @@ function generalInfo(General $generalObj) { function generalInfo2(General $generalObj) { $general = $generalObj->getRaw(); - $general['winrate'] = round($general['winrate'], 2); - $general['killrate'] = round($general['killrate'], 2); + $general['winrate'] = round($general['killnum']/max($general['warnum'],1), 2); + $general['killrate'] = round($general['killcrew']/max($general['deathcrew'],1), 2); $experienceBonus = $generalObj->onCalcStat($generalObj, 'experience', 10000) - 10000; if($experienceBonus > 0){ diff --git a/hwe/sammo/ActionSpecialDomestic/None.php b/hwe/sammo/ActionSpecialDomestic/None.php index c7e85e26..85e16f80 100644 --- a/hwe/sammo/ActionSpecialDomestic/None.php +++ b/hwe/sammo/ActionSpecialDomestic/None.php @@ -9,7 +9,7 @@ class None implements iAction{ protected $id = 0; protected $name = '-'; - protected $info = null; + protected $info = ''; static $selectWeightType = SpecialityConst::WEIGHT_NORM; static $selectWeight = 0; diff --git a/hwe/sammo/ActionSpecialWar/None.php b/hwe/sammo/ActionSpecialWar/None.php index ea8f9c57..303cabd6 100644 --- a/hwe/sammo/ActionSpecialWar/None.php +++ b/hwe/sammo/ActionSpecialWar/None.php @@ -9,7 +9,7 @@ class None implements iAction{ protected $id = 0; protected $name = '-'; - protected $info = null; + protected $info = ''; static $selectWeightType = SpecialityConst::WEIGHT_NORM; static $selectWeight = 0; diff --git a/hwe/sammo/General.php b/hwe/sammo/General.php index d75bf679..c1e301f9 100644 --- a/hwe/sammo/General.php +++ b/hwe/sammo/General.php @@ -650,7 +650,7 @@ class General implements iAction{ 'makelimit', 'killturn', 'block', 'dedlevel', 'explevel', 'age', 'startage', 'belong', 'personal', 'special', 'special2', 'defence_train', 'tnmt', 'npc', 'npc_org', 'deadyear', 'npcmsg', 'dex0', 'dex10', 'dex20', 'dex30', 'dex40', - 'warnum', 'killnum', 'deathnum', 'killcrew', 'deathcrew', 'recwar', 'last_turn', 'myset', + 'warnum', 'firenum', 'killnum', 'deathnum', 'killcrew', 'deathcrew', 'recwar', 'last_turn', 'myset', 'specage', 'specage2', 'con', 'connect' ];