From 0f9b9a604bca18863ec8f99f4d941648806f334a Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Sun, 16 Jul 2023 11:20:50 +0800 Subject: [PATCH] 1 --- webapp/controller/HeroController.class.php | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/webapp/controller/HeroController.class.php b/webapp/controller/HeroController.class.php index dbb56b03..6a188351 100644 --- a/webapp/controller/HeroController.class.php +++ b/webapp/controller/HeroController.class.php @@ -36,24 +36,24 @@ use services\LogService; class HeroController extends BaseAuthedController { - public function test(){ - $heroUniId = getReqVal('hero_uniid', 0); - $heroDb = Hero::find($heroUniId); - if (!$heroDb) { - $this->_rspErr(100, 'param error or null'); - return; - } - if ($heroDb['hero_lv'] == 15){ - $this->_rspErr(100, 'param error or null'); - return; - } - $attrs = Hero::LvUpAddAttr($heroDb); - Hero::update($heroUniId, array( - 'hero_lv' => $heroDb['hero_lv'] + 1, - 'rand_attr' => json_encode($attrs['rand_attr']), - 'base_attr' => json_encode($attrs['base_attr']), - )); - } +// public function test(){ +// $heroUniId = getReqVal('hero_uniid', 0); +// $heroDb = Hero::find($heroUniId); +// if (!$heroDb) { +// $this->_rspErr(100, 'param error or null'); +// return; +// } +// if ($heroDb['hero_lv'] == 15){ +// $this->_rspErr(100, 'param error or null'); +// return; +// } +// $attrs = Hero::LvUpAddAttr($heroDb); +// Hero::update($heroUniId, array( +// 'hero_lv' => $heroDb['hero_lv'] + 1, +// 'rand_attr' => json_encode($attrs['rand_attr']), +// 'base_attr' => json_encode($attrs['base_attr']), +// )); +// } public function heroList() {