diff --git a/webapp/controller/EquipController.class.php b/webapp/controller/EquipController.class.php index bd5688f..2f0f295 100644 --- a/webapp/controller/EquipController.class.php +++ b/webapp/controller/EquipController.class.php @@ -934,14 +934,23 @@ class EquipController{ } $arr2 = array(); $flag = 0; - for ($a = 0; $a < count($arr); $a++) { - $str = $arr[$a][0]; + $valexp = 0; + if ($lv == 0) { + $str = $arr[$lv][0]; $estr = explode(';', $str); - if ($estr[1][0] > $row['exp']) { - phpcommon\sendError(ERR_USER_BASE + 4, '未达到进阶需求'); - return; - } + $valexp = $estr[1]; + } else { + $str1 = $arr[$lv][0]; + $estr1 = explode(';', $str1); + $str = $arr[$lv - 1][0]; + $estr = explode(';', $str); + $valexp = $estr1[1] - $estr[1]; } + if ($valexp > $row['exp']) { + phpcommon\sendError(ERR_USER_BASE + 4, '未达到进阶需求'); + return; + } + if ($lv >= $e['max_level']) { phpcommon\sendError(ERR_USER_BASE + 5, '达到最大等级'); return;