From cbbc3a1d4a773cdd522819f6ff0bcea8a22e31ef Mon Sep 17 00:00:00 2001 From: wangwei01 Date: Thu, 20 Jun 2019 13:46:22 +0800 Subject: [PATCH] 1 --- webapp/controller/EquipController.class.php | 2 +- webapp/controller/SkinController.class.php | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/webapp/controller/EquipController.class.php b/webapp/controller/EquipController.class.php index 4948499..b5e60ac 100644 --- a/webapp/controller/EquipController.class.php +++ b/webapp/controller/EquipController.class.php @@ -61,7 +61,7 @@ class EquipController{ phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家'); die(); } - $coin_num = $e['equip_cost'] * $equip_level + $e['cost_int']; + $coin_num = $e['equip_cost'] * ceil($equip_level / 5) + $e['cost_int']; if ($free == 1) { $coin_num = 0; } diff --git a/webapp/controller/SkinController.class.php b/webapp/controller/SkinController.class.php index b1535ce..cac92d7 100644 --- a/webapp/controller/SkinController.class.php +++ b/webapp/controller/SkinController.class.php @@ -187,7 +187,7 @@ class SkinController{ continue; } $skin_id = $rowSkin['skin_id']; - if ($rowSkin['active_time'] != 0 && $rowSkin['skin_experience_type'] == 2) { + if ($rowSkin['active_time'] != 0) { $skin_level = $s['max_lv']; } else { $skin_level = $rowSkin['skin_level']; @@ -378,15 +378,12 @@ class SkinController{ if ($s['skin_type'] == 2) { $time = $s['duration']; } + $ex_level = $s['max_lv']; + $p = $this->getParameter(SKIN_SKILL_TIME); + $time = $p['param_value']; if ($row['skin_status'] <= 1) { - $ex_level = $s['max_lv']; - $p = $this->getParameter(SKIN_SKILL_TIME); - $time = $p['param_value']; $ex_type = 2; } else { - $ex_level = 1; - $p = $this->getParameter(SKIN_TRIAL_TIME); - $time = $p['param_value']; $ex_type = 1; } $ret = $conn->execScript('UPDATE skin SET active_time=:active_time, skin_experience_level=:skin_experience_level, skin_experience_type=:skin_experience_type, modify_time=:modify_time ' . @@ -443,7 +440,7 @@ class SkinController{ phpcommon\sendError(ERR_USER_BASE + 3, '皮肤已到满级'); return; } - $debris_num = $s['cost'] * $row['skin_level'] + $s['cost_int']; + $debris_num = $s['cost'] * ceil($row['skin_level'] / 5) + $s['cost_int']; if ($free == 1) { $debris_num = 0; }