修改锦标赛倒计时
This commit is contained in:
parent
d117ad6912
commit
06dd437e3d
@ -84,7 +84,6 @@ func (c *ChampshipMod) BackData(myRank, myPreRank, todayActivityId, yesterdayAct
|
||||
return &msg.ResChampship{
|
||||
Score: int32(c.Score),
|
||||
Reward: int32(c.Reward),
|
||||
EndTime: int32(GoUtil.ZeroTimestamp() + 86400),
|
||||
Period: int32(GoUtil.GetServerOpenDay()),
|
||||
Rank: int32(myRank),
|
||||
RankReward: int32(rankReward),
|
||||
|
||||
@ -3,6 +3,7 @@ package game
|
||||
import (
|
||||
chargeCfg "server/conf/charge"
|
||||
playroomCfg "server/conf/playroom"
|
||||
"server/game/mod/activity"
|
||||
"server/game/mod/item"
|
||||
limitedTimeEvent "server/game/mod/limited_time_event"
|
||||
GoUtil "server/game_util"
|
||||
@ -310,11 +311,16 @@ func (p *Player) BackChampship() {
|
||||
ChampshipMod := p.PlayMod.getChampshipMod()
|
||||
rank, preRank := p.GetChampshipRank()
|
||||
todayActivityId, yesterdayActivityId := p.GetChampshipActivityId()
|
||||
activityInfo := p.GetActivityInfo(activity.ACT_TYPE_CHAMPION)
|
||||
res := ChampshipMod.BackData(rank, preRank, todayActivityId, yesterdayActivityId)
|
||||
cfg := G_GameLogicPtr.ActivityMgr.GetChampshipCfg(todayActivityId)
|
||||
res.EndTime = int32(GoUtil.ZeroTimestamp() + 86400)
|
||||
if cfg != nil && GoUtil.Now()-GoUtil.ZeroTimestamp() >= int64(cfg.ClearTime) {
|
||||
res.Status = 1
|
||||
}
|
||||
if activityInfo != nil {
|
||||
res.EndTime = int32(activityInfo.EndT)
|
||||
}
|
||||
res.Cfg = cfg
|
||||
p.PushClientRes(res)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user