diff --git a/model/gameparam.go b/model/gameparam.go index d834e6b..8e10069 100644 --- a/model/gameparam.go +++ b/model/gameparam.go @@ -89,6 +89,7 @@ type GameParam struct { RankPlayerLevelMaxNum int //等级榜最大人数 CloseChannelSwitch bool //关闭渠道开关功能 BackendTimeLocal int //后台时区 + GameStaticsFightVersion int // 对战场游戏统计数据版本号 } var GameParamPath = "../data/gameparam.json" diff --git a/worldsrv/action_player.go b/worldsrv/action_player.go index dc1f3f6..8ae9704 100644 --- a/worldsrv/action_player.go +++ b/worldsrv/action_player.go @@ -1941,6 +1941,22 @@ func CSPlayerData(s *netlib.Session, packetid int, data interface{}, sid int64) if ls.clog != nil { PlayerSubjectSign.UpdateHeadUrl(p.SnId, ls.clog.HeadUrl) } + + // 重置对战场统计数据重置 + v, ok := p.GDatas[common.GetKeyGameType(2)] + if ok && v != nil { + if int(v.Statics.Version) < model.GameParamData.GameStaticsFightVersion { + v.Statics.Version = int32(model.GameParamData.GameStaticsFightVersion) + v.Statics.TotalIn = 0 + v.Statics.TotalOut = 0 + v.Statics.Tax = 0 + v.Statics.MaxSysOut = 0 + // 个人水池 + p.TotalIn = 0 + p.TotalOut = 0 + p.PlayerTax = 0 + } + } } // 有缓存数据