This commit is contained in:
aozhiwei 2022-06-13 15:29:07 +08:00
parent dc3c40a98d
commit 9c9d7d007a

View File

@ -231,7 +231,7 @@ class HeroController extends BaseAuthedController {
$heroUniId = getReqVal('hero_uniid', 0);
$slotId = getReqVal('slot_id', 0);
$heroDb = Hero::find($heroUniId);
if (!in_array($slotId, array(0, 1))) {
if (!in_array($slotId, array(0, kMaxHeroUpLevelNum - 1))) {
$this->_rspErr(1, 'slot_id parameter error');
return;
}
@ -332,6 +332,7 @@ class HeroController extends BaseAuthedController {
{
$costItemId = getReqVal('cost_item_id', 0);
$heroUniId = getReqVal('hero_uniid', 0);
$slotId = getReqVal('slot_id', 0);
$heroDb = Hero::find($heroUniId);
if (!$heroDb) {
$this->_rspErr(1, 'hero does not exist');
@ -421,7 +422,7 @@ class HeroController extends BaseAuthedController {
Hero::update($heroUniId,
array(
'hero_lv' => $heroDb['hero_lv'],
'lock_type' => Gun::QUALITY_LOCK,
'lock_type' => Hero::QUALITY_LOCK,
'unlock_time' => $this->_getNowTime() + $currQualityMeta['time'],
)
);