diff --git a/webapp/controller/HeroController.class.php b/webapp/controller/HeroController.class.php index c7482cf6..85a68ca2 100644 --- a/webapp/controller/HeroController.class.php +++ b/webapp/controller/HeroController.class.php @@ -84,4 +84,36 @@ class HeroController extends BaseAuthedController { $this->_rspOk(); } + public function upgradeLevel() + { + $heroUniId = getReqVal('hero_uniid', 0); + $heroDb = Hero::find($heroUniId); + if (!$heroDb) { + $this->_rspErr(1, '英雄不存在'); + return; + } + if ($heroDb['state'] == Hero::GETED_STATE) { + $this->_rspErr(3, '试用英雄不能操作'); + return; + } + if ($heroDb['unlock_time'] > $this->_getNowTime()) { + $this->_rspErr(2, '锁定期间不能操作'); + return; + } + if ($heroDb['unlock_trade_time'] > $this->_getNowTime()) { + $this->_rspErr(2, '锁定期间不能操作'); + return; + } + $heroMeta = mt\Hero::get($heroDb['hero_id']); + if (!$heroMeta) { + $this->_rspErr(100, '服务器内部错误'); + return; + } + } + + public function upgradeQuality() + { + $heroUniId = getReqVal('hero_uniid', 0); + } + } diff --git a/webapp/mt/HeroLevel.php b/webapp/mt/HeroLevel.php new file mode 100644 index 00000000..1bd5806e --- /dev/null +++ b/webapp/mt/HeroLevel.php @@ -0,0 +1,41 @@ +