1
This commit is contained in:
parent
fbbafeac58
commit
123e74b51d
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user