This commit is contained in:
aozhiwei 2022-06-13 16:05:12 +08:00
parent fbbafeac58
commit 123e74b51d

View File

@ -113,8 +113,20 @@ class HeroController extends BaseAuthedController {
public function getUpgradeQualityList() public function getUpgradeQualityList()
{ {
$infos = array(); $infos = array();
for ($i = 0; $i <= 1; ++$i) { for ($i = 0; $i < kMaxHeroUpQualityNum; ++$i) {
$heroUniId = $this->_getV(TN_HERO_QUALITY_UP, $i);
$info = null;
if ($heroUniId) {
$heroDb = Hero::find($heroUniId);
if ($heroDb) {
$heroDto = Hero::toDto($heroDb);
$info = array(
'info' => $heroDto,
'countdown' => $heroDto['unlock_lefttime']
);
}
}
array_push($infos, $info);
} }
$this->_rspData(array( $this->_rspData(array(
'infos' => $infos 'infos' => $infos
@ -157,7 +169,7 @@ class HeroController extends BaseAuthedController {
$propertyChgService->addHeroChg(); $propertyChgService->addHeroChg();
$propertyChgService->addBagChg(); $propertyChgService->addBagChg();
$propertyChgService->addUserChg(); $propertyChgService->addUserChg();
$rankActivityService = new service\RankActivityService(); $rankActivityService = new services\RankActivityService();
$rankActivityService->heroUpgradeLevel($heroDb['hero_lv'] + 1); $rankActivityService->heroUpgradeLevel($heroDb['hero_lv'] + 1);
$this->_rspData(array( $this->_rspData(array(
'property_chg' => $propertyChgService->toDto(), 'property_chg' => $propertyChgService->toDto(),
@ -437,7 +449,7 @@ class HeroController extends BaseAuthedController {
'unlock_time' => $this->_getNowTime() + $currQualityMeta['time'], 'unlock_time' => $this->_getNowTime() + $currQualityMeta['time'],
) )
); );
$this->_setV(TN_HERO_LEVEL_UP, (int)$slotId, (int)$heroDb['idx']); $this->_setV(TN_HERO_QUALITY_UP, (int)$slotId, (int)$heroDb['idx']);
$propertyChgService = new services\PropertyChgService(); $propertyChgService = new services\PropertyChgService();
$propertyChgService->addHeroChg(); $propertyChgService->addHeroChg();
$propertyChgService->addBagChg(); $propertyChgService->addBagChg();