|
@@ -315,6 +315,7 @@ class PVPProc {
|
|
|
$uid = $req->uid; # 快速访问UID
|
|
|
$zoneid = $req->zoneid; # 快速访问zoneid
|
|
|
$pvp = new UserPVPModel($req->userInfo->game->pvp); # 设计玩家pvp数据结构
|
|
|
+ $pvp->refreshDailyData(); # 刷新免费挑战次数
|
|
|
$seasonId = self::GetCurSeasonID(); # 当前赛季ID
|
|
|
$key = MemKey_GameRun::Game_PVPScoreByZoneSeason_zset($zoneid, $seasonId); # 积分总榜
|
|
|
|
|
@@ -440,9 +441,8 @@ class PVPProc {
|
|
|
public static function pvp_setTeam($req) {
|
|
|
$heros = $req->paras[0]; # para: 新阵容
|
|
|
$pvp = new UserPVPModel($req->userInfo->game->pvp);
|
|
|
- if (is_array($heros)) { # 更新阵容
|
|
|
- $pvp->defTeam->heros = $heros;
|
|
|
- }
|
|
|
+ my_Assert(is_array($heros), ErrCode::paras_err); # 参数检查
|
|
|
+ $pvp->defTeam = $heros; # 更新阵容
|
|
|
$req->userInfo->game->pvp = $pvp;
|
|
|
UserProc::updateUserInfo(); # 回存数据
|
|
|
return Resp::ok($pvp->defTeam); # 返回
|