diff --git a/webapp/controller/HeroController.class.php b/webapp/controller/HeroController.class.php index f78cd32a..136d5227 100644 --- a/webapp/controller/HeroController.class.php +++ b/webapp/controller/HeroController.class.php @@ -215,7 +215,9 @@ class HeroController extends BaseAuthedController { $this->_rspErr(1, 'hero does not exist'); return; } + $costHeroUniId = $this->_getV(TN_HERO_QUALITY_UP, (int)$idx * 100); $this->_setV(TN_HERO_QUALITY_UP, $idx, 0); + $this->_setV(TN_HERO_QUALITY_UP, (int)$idx * 100, 0); $propertyChgService = new services\PropertyChgService(); $propertyChgService->addHeroChg(); $propertyChgService->addBagChg(); @@ -227,6 +229,12 @@ class HeroController extends BaseAuthedController { if ($nextQualityMeta) { $rnd = rand(1, 100); if ($rnd > $nextQualityMeta['success_rate']) { + Hero::update($costHeroUniId, + array( + 'lock_type' => 0, + 'unlock_time' => 0, + ) + ); Hero::update($heroUniId, array( 'advanced_count' => $heroDb['advanced_count'] + 1, @@ -249,6 +257,13 @@ class HeroController extends BaseAuthedController { 'unlock_time' => 0, ) ); + Hero::update($costHeroUniId, + array( + 'account_id' => myself()->_getAccountId() . '!!!', + 'lock_type' => 0, + 'unlock_time' => 0, + ) + ); $newHeroDb = Hero::find($heroUniId); $newHero = Hero::toDto($newHeroDb); $rankActivityService = new services\RankActivityService();