diff --git a/webapp/controller/HeroController.class.php b/webapp/controller/HeroController.class.php index 5e391028..cc6d9491 100644 --- a/webapp/controller/HeroController.class.php +++ b/webapp/controller/HeroController.class.php @@ -394,6 +394,22 @@ class HeroController extends BaseAuthedController { return; } } + { + $idx = 0; + $found = false; + for ($i = 0; $i < kMaxHeroUpQualityNum; ++$i) { + $upHeroUniId = $this->_getV(TN_HERO_QUALITY_UP, $i); + if ($upHeroUniId == $heroUniId) { + $idx = $i; + $found = true; + break; + } + } + if (!$found) { + $this->_rspErr(1, 'hero already upgrade'); + return; + } + } if (!$heroDb) { $this->_rspErr(1, 'hero does not exist'); return;