锦标赛标题优化
This commit is contained in:
parent
adc9988dad
commit
12efd965e9
@ -199,6 +199,7 @@ func (r *ActivityMgr) GetChampshipCfg(id int) *protoMsg.ChampionshipCfg {
|
|||||||
for _, v := range data.List {
|
for _, v := range data.List {
|
||||||
if v.Type == activity.ACT_TYPE_CHAMPION && v.Id == id {
|
if v.Type == activity.ACT_TYPE_CHAMPION && v.Id == id {
|
||||||
if cfg, ok := v.cfg.(*protoMsg.ChampionshipCfg); ok {
|
if cfg, ok := v.cfg.(*protoMsg.ChampionshipCfg); ok {
|
||||||
|
cfg.Title = v.Title
|
||||||
return cfg
|
return cfg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -317,10 +317,14 @@ func (p *Player) BackChampship() {
|
|||||||
res.EndTime = int32(GoUtil.ZeroTimestamp() + 86400)
|
res.EndTime = int32(GoUtil.ZeroTimestamp() + 86400)
|
||||||
if cfg != nil && GoUtil.Now()-GoUtil.ZeroTimestamp() >= int64(cfg.ClearTime) {
|
if cfg != nil && GoUtil.Now()-GoUtil.ZeroTimestamp() >= int64(cfg.ClearTime) {
|
||||||
res.Status = 1
|
res.Status = 1
|
||||||
|
} else {
|
||||||
|
cfg = G_GameLogicPtr.ActivityMgr.GetChampshipCfg(yesterdayActivityId)
|
||||||
|
}
|
||||||
|
if cfg != nil {
|
||||||
|
res.Title = cfg.Title
|
||||||
}
|
}
|
||||||
if activityInfo != nil {
|
if activityInfo != nil {
|
||||||
res.EndTime = int32(activityInfo.EndT)
|
res.EndTime = int32(activityInfo.EndT)
|
||||||
res.Title = activityInfo.Title
|
|
||||||
}
|
}
|
||||||
res.Cfg = cfg
|
res.Cfg = cfg
|
||||||
p.PushClientRes(res)
|
p.PushClientRes(res)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user