This commit is contained in:
aozhiwei 2022-06-14 10:12:12 +08:00
parent 6bce4811b2
commit 156a5453c4

View File

@ -147,6 +147,8 @@ class HeroController extends BaseAuthedController {
$this->_rspErr(1, 'Countdown is not over');
return;
}
$oldHero = $heroDto;
$newHero = $heroDto;
switch ($type) {
case 1:
{
@ -178,16 +180,21 @@ class HeroController extends BaseAuthedController {
Hero::update($heroUniId,
array(
'hero_lv' => $heroDb['hero_lv'] + 1,
'rand_attr' => json_encode($attrs),
'lock_type' => 0,
'unlock_time' => 0,
)
);
$newHero['hero_lv'] += 1;
$newHero['attr'] = $attrs;
$rankActivityService = new services\RankActivityService();
$rankActivityService->heroUpgradeLevel($heroDb['hero_lv'] + 1);
}
}
$this->_rspData(array(
'property_chg' => $propertyChgService->toDto(),
'old_hero' => $oldHero,
'new_hero' => $newHero,
));
}
break;
@ -223,12 +230,15 @@ class HeroController extends BaseAuthedController {
'unlock_time' => 0,
)
);
$newHero['quality'] += 1;
$rankActivityService = new services\RankActivityService();
$rankActivityService->heroUpgradeLevel($heroDb['quality'] + 1);
}
}
$this->_rspData(array(
'property_chg' => $propertyChgService->toDto(),
'old_hero' => $oldHero,
'new_hero' => $newHero,
));
}
break;