1
This commit is contained in:
parent
3445871a1d
commit
0f9b9a604b
@ -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()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user