This commit is contained in:
aozhiwei 2022-06-14 18:55:26 +08:00
parent 0f104c0b37
commit c6a52107ba

View File

@ -215,7 +215,9 @@ class HeroController extends BaseAuthedController {
$this->_rspErr(1, 'hero does not exist'); $this->_rspErr(1, 'hero does not exist');
return; 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, $idx, 0);
$this->_setV(TN_HERO_QUALITY_UP, (int)$idx * 100, 0);
$propertyChgService = new services\PropertyChgService(); $propertyChgService = new services\PropertyChgService();
$propertyChgService->addHeroChg(); $propertyChgService->addHeroChg();
$propertyChgService->addBagChg(); $propertyChgService->addBagChg();
@ -227,6 +229,12 @@ class HeroController extends BaseAuthedController {
if ($nextQualityMeta) { if ($nextQualityMeta) {
$rnd = rand(1, 100); $rnd = rand(1, 100);
if ($rnd > $nextQualityMeta['success_rate']) { if ($rnd > $nextQualityMeta['success_rate']) {
Hero::update($costHeroUniId,
array(
'lock_type' => 0,
'unlock_time' => 0,
)
);
Hero::update($heroUniId, Hero::update($heroUniId,
array( array(
'advanced_count' => $heroDb['advanced_count'] + 1, 'advanced_count' => $heroDb['advanced_count'] + 1,
@ -249,6 +257,13 @@ class HeroController extends BaseAuthedController {
'unlock_time' => 0, 'unlock_time' => 0,
) )
); );
Hero::update($costHeroUniId,
array(
'account_id' => myself()->_getAccountId() . '!!!',
'lock_type' => 0,
'unlock_time' => 0,
)
);
$newHeroDb = Hero::find($heroUniId); $newHeroDb = Hero::find($heroUniId);
$newHero = Hero::toDto($newHeroDb); $newHero = Hero::toDto($newHeroDb);
$rankActivityService = new services\RankActivityService(); $rankActivityService = new services\RankActivityService();