1
This commit is contained in:
parent
af53f3ad65
commit
79e3417fb9
@ -531,6 +531,43 @@ class UserController extends BaseAuthedController {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getBattleUser()
|
||||||
|
{
|
||||||
|
$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);
|
||||||
|
{
|
||||||
|
$userInfo['total_lucky'] = Hero::getAccountLucky($userInfo['address']);
|
||||||
|
$userInfo['admission_item_num'] = myself()->_getItemCount(900006, $userInfo);
|
||||||
|
}
|
||||||
|
$heroDb = Hero::findByAccountId(myself()->_getAccountId(), $userInfo['hero_uniid']);
|
||||||
|
if (!$heroDb) {
|
||||||
|
$this->_rspErr(1, 'Hero does not exist');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$heroInfo = Hero::toDto($heroDb);
|
||||||
|
$heroInfo['avatar_info'] = Hero::avatarInfo($heroDb);
|
||||||
|
{
|
||||||
|
$preset = HeroPreset::getHeroPreset($userDb['hero_id']);
|
||||||
|
$heroInfo['spec_skill'] = '' . $preset['skill_id'];
|
||||||
|
}
|
||||||
|
myself()->_rspData(array(
|
||||||
|
'info' => array(
|
||||||
|
'user_info' => $userInfo,
|
||||||
|
'hero_info' => $heroInfo,
|
||||||
|
)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
public function updateBattleInfo()
|
public function updateBattleInfo()
|
||||||
{
|
{
|
||||||
$specSkill = getReqVal("skill_id", "");
|
$specSkill = getReqVal("skill_id", "");
|
||||||
@ -547,6 +584,10 @@ class UserController extends BaseAuthedController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$userInfo = User::Info($userDb);
|
$userInfo = User::Info($userDb);
|
||||||
|
{
|
||||||
|
$userInfo['total_lucky'] = Hero::getAccountLucky($userInfo['address']);
|
||||||
|
$userInfo['admission_item_num'] = myself()->_getItemCount(900006, $userInfo);
|
||||||
|
}
|
||||||
$heroDb = Hero::findByAccountId(myself()->_getAccountId(), $heroUniId);
|
$heroDb = Hero::findByAccountId(myself()->_getAccountId(), $heroUniId);
|
||||||
if (!$heroDb) {
|
if (!$heroDb) {
|
||||||
$this->_rspErr(1, 'Hero does not exist');
|
$this->_rspErr(1, 'Hero does not exist');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user