1
This commit is contained in:
parent
3b6d00e639
commit
11100a4d51
@ -451,6 +451,35 @@ class UserController extends BaseAuthedController {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getBattleInfo()
|
||||||
|
{
|
||||||
|
$userDb = SqlHelper::ormSelectOne
|
||||||
|
(myself()->_getSelfMysql(),
|
||||||
|
't_user',
|
||||||
|
array(
|
||||||
|
'account_id' => myself()->_getAccountId()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
if (!$userDb) {
|
||||||
|
$this->_rspErr(1, 'Account does not exist');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$userInfo = User::Info($userDb);
|
||||||
|
$heroDb = Hero::findByAccountId(myself()->_getAccountId(), $userDb['hero_uniid']);
|
||||||
|
if (!$heroDb) {
|
||||||
|
$this->_rspErr(1, 'Hero does not exist');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$heroInfo = Hero::toDto($heroDb);
|
||||||
|
$heroInfo['avatar_info'] = Hero::avatarInfo($heroDb);
|
||||||
|
myself()->_rspData(array(
|
||||||
|
'info' => array(
|
||||||
|
'user_info' => $userInfo,
|
||||||
|
'hero_info' => $heroInfo
|
||||||
|
)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
public function query()
|
public function query()
|
||||||
{
|
{
|
||||||
$name = getReqVal('name', '');
|
$name = getReqVal('name', '');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user