This commit is contained in:
aozhiwei 2022-06-14 16:23:09 +08:00
parent 936232e510
commit dc12d512e1
2 changed files with 29 additions and 1 deletions

View File

@ -412,7 +412,7 @@ class HeroController extends BaseAuthedController {
}
}
if (!$found) {
$this->_rspErr(1, 'hero already upgrade');
$this->_rspErr(1, 'hero already upgrading');
return;
}
}

View File

@ -408,4 +408,32 @@ class Hero extends BaseModel {
return $finalyAddGold;
}
public static function heroLocking($heroDto)
{
$locking = false;
{
$idx = 0;
for ($i = 0; $i < kMaxHeroUpQualityNum; ++$i) {
$upHeroUniId = $this->_getV(TN_HERO_QUALITY_UP, $i);
if ($upHeroUniId == $heroUniId) {
$idx = $i;
$locking = true;
break;
}
}
}
if (!$locking) {
$idx = 0;
for ($i = 0; $i < kMaxHeroUpLevelNum; ++$i) {
$upHeroUniId = $this->_getV(TN_HERO_LEVEL_UP, $i);
if ($upHeroUniId == $heroUniId) {
$idx = $i;
$locking = true;
break;
}
}
}
return $locking;
}
}