1
This commit is contained in:
parent
1dda2e7789
commit
0316c98d0b
@ -10,6 +10,7 @@ require_once('models/Chip.php');
|
|||||||
require_once('models/Battle.php');
|
require_once('models/Battle.php');
|
||||||
require_once('models/SignLog.php');
|
require_once('models/SignLog.php');
|
||||||
require_once('models/UserHonor.php');
|
require_once('models/UserHonor.php');
|
||||||
|
require_once('models/HeroPreset.php');
|
||||||
|
|
||||||
require_once('mt/Parameter.php');
|
require_once('mt/Parameter.php');
|
||||||
require_once('mt/Drop.php');
|
require_once('mt/Drop.php');
|
||||||
@ -38,6 +39,7 @@ use models\UserSeasonRing;
|
|||||||
use models\Battle;
|
use models\Battle;
|
||||||
use models\SignLog;
|
use models\SignLog;
|
||||||
use models\UserHonor;
|
use models\UserHonor;
|
||||||
|
use models\HeroPreset;
|
||||||
|
|
||||||
class UserController extends BaseAuthedController {
|
class UserController extends BaseAuthedController {
|
||||||
private $init_rank = 'rank_init_rank';
|
private $init_rank = 'rank_init_rank';
|
||||||
@ -472,6 +474,45 @@ class UserController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
$heroInfo = Hero::toDto($heroDb);
|
$heroInfo = Hero::toDto($heroDb);
|
||||||
$heroInfo['avatar_info'] = Hero::avatarInfo($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()
|
||||||
|
{
|
||||||
|
$specSkill = getReqVal("skill_id", "");
|
||||||
|
$heroUniId = getReqVal("hero_uniid", "");
|
||||||
|
$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(), $heroUniId);
|
||||||
|
if (!$heroDb) {
|
||||||
|
$this->_rspErr(1, 'Hero does not exist');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$heroInfo = Hero::toDto($heroDb);
|
||||||
|
$heroInfo['avatar_info'] = Hero::avatarInfo($heroDb);
|
||||||
|
{
|
||||||
|
$preset = HeroPreset::getHeroPreset($heroUniId);
|
||||||
|
$heroInfo['spec_skill'] = $specSkill;
|
||||||
|
}
|
||||||
myself()->_rspData(array(
|
myself()->_rspData(array(
|
||||||
'info' => array(
|
'info' => array(
|
||||||
'user_info' => $userInfo,
|
'user_info' => $userInfo,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user