1
This commit is contained in:
commit
c4a4b8b3a5
@ -11,6 +11,8 @@ require_once('models/Battle.php');
|
||||
require_once('models/SignLog.php');
|
||||
require_once('models/UserHonor.php');
|
||||
require_once('models/GlobalData.php');
|
||||
require_once('models/HeroPreset.php');
|
||||
|
||||
|
||||
require_once('mt/Parameter.php');
|
||||
require_once('mt/Drop.php');
|
||||
@ -40,6 +42,8 @@ use models\Battle;
|
||||
use models\SignLog;
|
||||
use models\UserHonor;
|
||||
use models\GlobalData;
|
||||
use models\HeroPreset;
|
||||
|
||||
|
||||
class UserController extends BaseAuthedController {
|
||||
private $init_rank = 'rank_init_rank';
|
||||
@ -60,9 +64,6 @@ class UserController extends BaseAuthedController {
|
||||
$userInfo = $this->_getOrmUserInfo();
|
||||
// $this->_setBattleHero($userInfo);
|
||||
// $this->_setV(TN_RANK_STATUS, 0, 1);
|
||||
//初始化芯片页
|
||||
$chipPageObj = new services\ChipPageService();
|
||||
$chipPageObj->init();
|
||||
}
|
||||
//elo score 衰减
|
||||
$this->dampingElo($userInfo);
|
||||
@ -467,13 +468,52 @@ class UserController extends BaseAuthedController {
|
||||
return;
|
||||
}
|
||||
$userInfo = User::Info($userDb);
|
||||
$heroDb = Hero::findByAccountId(myself()->_getAccountId(), $userDb['hero_uniid']);
|
||||
$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()
|
||||
{
|
||||
$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(
|
||||
'info' => array(
|
||||
'user_info' => $userInfo,
|
||||
|
Loading…
x
Reference in New Issue
Block a user