1
This commit is contained in:
commit
97799c70f9
@ -192,6 +192,8 @@ class UserDetailInfo(object):
|
|||||||
['hero_id', 0, '当前使用的英雄ID'],
|
['hero_id', 0, '当前使用的英雄ID'],
|
||||||
['current_rank', 0, '当前段位'],
|
['current_rank', 0, '当前段位'],
|
||||||
['history_best_rank', 0, '历史最高段位'],
|
['history_best_rank', 0, '历史最高段位'],
|
||||||
|
['current_rank_score', 0, '当前赛季排位分'],
|
||||||
|
['history_best_rank_score', 0, '历史最高赛季排位分'],
|
||||||
['like_count', 0, '点赞次数'],
|
['like_count', 0, '点赞次数'],
|
||||||
['!history_seasons', [UserHisSeason()], '历史打过的赛季列表'],
|
['!history_seasons', [UserHisSeason()], '历史打过的赛季列表'],
|
||||||
]
|
]
|
||||||
|
@ -2,4 +2,4 @@ function init() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
expors.init = init;
|
exports.init = init;
|
||||||
|
@ -39,6 +39,7 @@ CREATE TABLE `t_user` (
|
|||||||
`rank` int(11) NOT NULL DEFAULT '0' COMMENT '段位',
|
`rank` int(11) NOT NULL DEFAULT '0' COMMENT '段位',
|
||||||
`history_best_rank` int(11) NOT NULL DEFAULT '0' COMMENT '历史最高段位',
|
`history_best_rank` int(11) NOT NULL DEFAULT '0' COMMENT '历史最高段位',
|
||||||
`score` int(11) NOT NULL DEFAULT '0' COMMENT '积分',
|
`score` int(11) NOT NULL DEFAULT '0' COMMENT '积分',
|
||||||
|
`history_best_score` int(11) NOT NULL DEFAULT '0' COMMENT '历史最高积分',
|
||||||
`gold` bigint NOT NULL DEFAULT '0' COMMENT '金币',
|
`gold` bigint NOT NULL DEFAULT '0' COMMENT '金币',
|
||||||
`diamond` bigint NOT NULL DEFAULT '0' COMMENT '钻石',
|
`diamond` bigint NOT NULL DEFAULT '0' COMMENT '钻石',
|
||||||
`hero_id` int(11) NOT NULL DEFAULT '0' COMMENT '当前上阵英雄id',
|
`hero_id` int(11) NOT NULL DEFAULT '0' COMMENT '当前上阵英雄id',
|
||||||
|
@ -38,11 +38,10 @@ class BattleController extends BaseAuthedController {
|
|||||||
'modifytime' => $this->_getNowTime(),
|
'modifytime' => $this->_getNowTime(),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$this->_rspData($battleDataService->getReward());
|
error_log(json_encode($battleDataService->getReward()));
|
||||||
}
|
$this->_rspData(array(
|
||||||
|
'reward' => $battleDataService->getReward()
|
||||||
public function battleReportNew()
|
));
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBattleData()
|
public function getBattleData()
|
||||||
|
@ -212,6 +212,7 @@ class UserController extends BaseAuthedController {
|
|||||||
'rank' => $initRankMeta ? $initRankMeta['rank'] : 1,
|
'rank' => $initRankMeta ? $initRankMeta['rank'] : 1,
|
||||||
'history_best_rank' => $initRankMeta ? $initRankMeta['rank'] : 1,
|
'history_best_rank' => $initRankMeta ? $initRankMeta['rank'] : 1,
|
||||||
'score' => $initRankMeta ? $initRankMeta['min_score'] : 0,
|
'score' => $initRankMeta ? $initRankMeta['min_score'] : 0,
|
||||||
|
'history_best_score' => $initRankMeta ? $initRankMeta['min_score'] : 0,
|
||||||
'head_id' => $headId,
|
'head_id' => $headId,
|
||||||
'hero_id' => $heroId,
|
'hero_id' => $heroId,
|
||||||
'last_season_id' => $currSeasonMeta ? $currSeasonMeta['id'] : 0,
|
'last_season_id' => $currSeasonMeta ? $currSeasonMeta['id'] : 0,
|
||||||
@ -472,6 +473,8 @@ class UserController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
$userDto = User::info($userDb);
|
$userDto = User::info($userDb);
|
||||||
$userDto['current_rank'] = $userDb['rank'];
|
$userDto['current_rank'] = $userDb['rank'];
|
||||||
|
$userDto['current_rank_score'] = $userDb['score'];
|
||||||
|
$userDto['history_best_rank_score'] = $userDb['history_best_score'];
|
||||||
$userDto['history_seasons'] = array();
|
$userDto['history_seasons'] = array();
|
||||||
$seasonDbs = Season::getHistorySeasons($targetId);
|
$seasonDbs = Season::getHistorySeasons($targetId);
|
||||||
foreach ($seasonDbs as $seasonDb) {
|
foreach ($seasonDbs as $seasonDb) {
|
||||||
|
@ -38,6 +38,7 @@ class User extends BaseModel {
|
|||||||
'rank' => $row['rank'],
|
'rank' => $row['rank'],
|
||||||
'history_best_rank' => $row['history_best_rank'],
|
'history_best_rank' => $row['history_best_rank'],
|
||||||
'score' => $row['score'],
|
'score' => $row['score'],
|
||||||
|
'history_best_score' => $row['history_best_score'],
|
||||||
'gold' => $row['gold'],
|
'gold' => $row['gold'],
|
||||||
'diamond' => $row['diamond'],
|
'diamond' => $row['diamond'],
|
||||||
'hero_id' => $row['hero_id'],
|
'hero_id' => $row['hero_id'],
|
||||||
@ -66,6 +67,7 @@ class User extends BaseModel {
|
|||||||
'rank' => $row['rank'],
|
'rank' => $row['rank'],
|
||||||
'history_best_rank' => $row['history_best_rank'],
|
'history_best_rank' => $row['history_best_rank'],
|
||||||
'score' => $row['score'],
|
'score' => $row['score'],
|
||||||
|
'history_best_score' => $row['history_best_score'],
|
||||||
'gold' => $row['gold'],
|
'gold' => $row['gold'],
|
||||||
'diamond' => $row['diamond'],
|
'diamond' => $row['diamond'],
|
||||||
'hero_id' => $row['hero_id'],
|
'hero_id' => $row['hero_id'],
|
||||||
|
@ -70,6 +70,7 @@ class BattleDataService extends BaseService {
|
|||||||
'ceg_uplimit' => 0,
|
'ceg_uplimit' => 0,
|
||||||
'obtain_ceg' => 0,
|
'obtain_ceg' => 0,
|
||||||
),
|
),
|
||||||
|
'total_ceg' => 0,
|
||||||
'items' => array()
|
'items' => array()
|
||||||
);
|
);
|
||||||
private $rankActivityService = null;
|
private $rankActivityService = null;
|
||||||
@ -335,6 +336,7 @@ class BattleDataService extends BaseService {
|
|||||||
'rank' => $newRank,
|
'rank' => $newRank,
|
||||||
'score' => $newScore,
|
'score' => $newScore,
|
||||||
'history_best_rank' => max($userInfo['rank'], $newRank),
|
'history_best_rank' => max($userInfo['rank'], $newRank),
|
||||||
|
'history_best_score' => max($userInfo['score'], $newScore),
|
||||||
'score_modifytime' => myself()->_getNowTime(),
|
'score_modifytime' => myself()->_getNowTime(),
|
||||||
'best_rank_modifytime' => $newRank > $userInfo['rank'] ?
|
'best_rank_modifytime' => $newRank > $userInfo['rank'] ?
|
||||||
myself()->_getNowTime() : $userInfo['best_rank_modifytime'],
|
myself()->_getNowTime() : $userInfo['best_rank_modifytime'],
|
||||||
@ -620,14 +622,17 @@ class BattleDataService extends BaseService {
|
|||||||
if ($heroPvpCeg > 0) {
|
if ($heroPvpCeg > 0) {
|
||||||
$heroPvpCeg = Hero::gainGoldPvp($this->heroDto, $heroPvpCeg);
|
$heroPvpCeg = Hero::gainGoldPvp($this->heroDto, $heroPvpCeg);
|
||||||
$this->reward['hero']['obtain_ceg'] = $this->heroDto['current_pvp_get_ceg'] + $heroPvpCeg;
|
$this->reward['hero']['obtain_ceg'] = $this->heroDto['current_pvp_get_ceg'] + $heroPvpCeg;
|
||||||
|
$this->reward['total_ceg'] += $heroPvpCeg;
|
||||||
}
|
}
|
||||||
if ($weaponPvpCeg1 > 0) {
|
if ($weaponPvpCeg1 > 0) {
|
||||||
$weaponPvpCeg1 = Gun::gainGoldPvp($this->weapon1Dto, $weaponPvpCeg1);
|
$weaponPvpCeg1 = Gun::gainGoldPvp($this->weapon1Dto, $weaponPvpCeg1);
|
||||||
$this->reward['weapon1']['obtain_ceg'] = $this->weapon1Dto['current_pvp_get_ceg'] + $weaponPvpCeg1;
|
$this->reward['weapon1']['obtain_ceg'] = $this->weapon1Dto['current_pvp_get_ceg'] + $weaponPvpCeg1;
|
||||||
|
$this->reward['total_ceg'] += $weaponPvpCeg1;
|
||||||
}
|
}
|
||||||
if ($weaponPvpCeg2 > 0) {
|
if ($weaponPvpCeg2 > 0) {
|
||||||
$weaponPvpCeg2 = Gun::gainGoldPvp($this->weapon1Dto, $weaponPvpCeg2);
|
$weaponPvpCeg2 = Gun::gainGoldPvp($this->weapon1Dto, $weaponPvpCeg2);
|
||||||
$this->reward['weapon2']['obtain_ceg'] = $this->weapon2Dto['current_pvp_get_ceg'] + $weaponPvpCeg2;
|
$this->reward['weapon2']['obtain_ceg'] = $this->weapon2Dto['current_pvp_get_ceg'] + $weaponPvpCeg2;
|
||||||
|
$this->reward['total_ceg'] += $weaponPvpCeg2;
|
||||||
}
|
}
|
||||||
error_log(json_encode(array(
|
error_log(json_encode(array(
|
||||||
'new_heroPvpCeg' => $heroPvpCeg,
|
'new_heroPvpCeg' => $heroPvpCeg,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user