diff --git a/webapp/controller/HeroController.class.php b/webapp/controller/HeroController.class.php index 8006398d..bdbf61e1 100644 --- a/webapp/controller/HeroController.class.php +++ b/webapp/controller/HeroController.class.php @@ -113,8 +113,20 @@ class HeroController extends BaseAuthedController { public function getUpgradeQualityList() { $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( 'infos' => $infos @@ -157,7 +169,7 @@ class HeroController extends BaseAuthedController { $propertyChgService->addHeroChg(); $propertyChgService->addBagChg(); $propertyChgService->addUserChg(); - $rankActivityService = new service\RankActivityService(); + $rankActivityService = new services\RankActivityService(); $rankActivityService->heroUpgradeLevel($heroDb['hero_lv'] + 1); $this->_rspData(array( 'property_chg' => $propertyChgService->toDto(), @@ -437,7 +449,7 @@ class HeroController extends BaseAuthedController { '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->addHeroChg(); $propertyChgService->addBagChg();