1
This commit is contained in:
parent
936232e510
commit
dc12d512e1
@ -412,7 +412,7 @@ class HeroController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$found) {
|
if (!$found) {
|
||||||
$this->_rspErr(1, 'hero already upgrade');
|
$this->_rspErr(1, 'hero already upgrading');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -408,4 +408,32 @@ class Hero extends BaseModel {
|
|||||||
return $finalyAddGold;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user