This commit is contained in:
wangwei01 2019-06-20 13:46:22 +08:00
parent 0e8b5cec84
commit cbbc3a1d4a
2 changed files with 6 additions and 9 deletions

View File

@ -61,7 +61,7 @@ class EquipController{
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家'); phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
die(); 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) { if ($free == 1) {
$coin_num = 0; $coin_num = 0;
} }

View File

@ -187,7 +187,7 @@ class SkinController{
continue; continue;
} }
$skin_id = $rowSkin['skin_id']; $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']; $skin_level = $s['max_lv'];
} else { } else {
$skin_level = $rowSkin['skin_level']; $skin_level = $rowSkin['skin_level'];
@ -378,15 +378,12 @@ class SkinController{
if ($s['skin_type'] == 2) { if ($s['skin_type'] == 2) {
$time = $s['duration']; $time = $s['duration'];
} }
if ($row['skin_status'] <= 1) {
$ex_level = $s['max_lv']; $ex_level = $s['max_lv'];
$p = $this->getParameter(SKIN_SKILL_TIME); $p = $this->getParameter(SKIN_SKILL_TIME);
$time = $p['param_value']; $time = $p['param_value'];
if ($row['skin_status'] <= 1) {
$ex_type = 2; $ex_type = 2;
} else { } else {
$ex_level = 1;
$p = $this->getParameter(SKIN_TRIAL_TIME);
$time = $p['param_value'];
$ex_type = 1; $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 ' . $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, '皮肤已到满级'); phpcommon\sendError(ERR_USER_BASE + 3, '皮肤已到满级');
return; 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) { if ($free == 1) {
$debris_num = 0; $debris_num = 0;
} }