修改锦标赛倒计时

This commit is contained in:
hahwu 2026-04-13 18:18:45 +08:00
parent d117ad6912
commit 06dd437e3d
2 changed files with 6 additions and 1 deletions

View File

@ -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),

View File

@ -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)
}