1
This commit is contained in:
parent
3445871a1d
commit
0f9b9a604b
@ -36,24 +36,24 @@ use services\LogService;
|
|||||||
|
|
||||||
class HeroController extends BaseAuthedController {
|
class HeroController extends BaseAuthedController {
|
||||||
|
|
||||||
public function test(){
|
// public function test(){
|
||||||
$heroUniId = getReqVal('hero_uniid', 0);
|
// $heroUniId = getReqVal('hero_uniid', 0);
|
||||||
$heroDb = Hero::find($heroUniId);
|
// $heroDb = Hero::find($heroUniId);
|
||||||
if (!$heroDb) {
|
// if (!$heroDb) {
|
||||||
$this->_rspErr(100, 'param error or null');
|
// $this->_rspErr(100, 'param error or null');
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
if ($heroDb['hero_lv'] == 15){
|
// if ($heroDb['hero_lv'] == 15){
|
||||||
$this->_rspErr(100, 'param error or null');
|
// $this->_rspErr(100, 'param error or null');
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
$attrs = Hero::LvUpAddAttr($heroDb);
|
// $attrs = Hero::LvUpAddAttr($heroDb);
|
||||||
Hero::update($heroUniId, array(
|
// Hero::update($heroUniId, array(
|
||||||
'hero_lv' => $heroDb['hero_lv'] + 1,
|
// 'hero_lv' => $heroDb['hero_lv'] + 1,
|
||||||
'rand_attr' => json_encode($attrs['rand_attr']),
|
// 'rand_attr' => json_encode($attrs['rand_attr']),
|
||||||
'base_attr' => json_encode($attrs['base_attr']),
|
// 'base_attr' => json_encode($attrs['base_attr']),
|
||||||
));
|
// ));
|
||||||
}
|
// }
|
||||||
|
|
||||||
public function heroList()
|
public function heroList()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user