From 74d96cee1b7492ba380ddea240597f6d418a1351 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 14 Jun 2022 15:47:04 +0800 Subject: [PATCH] 1 --- webapp/controller/HeroController.class.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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;