This commit is contained in:
aozhiwei 2020-08-15 03:21:37 +08:00
parent 2318cb2393
commit cca891ef93

View File

@ -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;