bug修复

This commit is contained in:
hahwu 2026-02-14 16:39:54 +08:00
parent f5c457f6d3
commit a10d4b9e43

View File

@ -104,6 +104,18 @@ func (c *ChampshipMgr) Init() {
c.mDispatr.AfterFunc(time.Duration(GoUtil.NextZeroTimestampDuration())*time.Second, func() {
c.ZeroUpdate()
})
c.fix()
}
func (c *ChampshipMgr) fix() {
ChampshipData := c.getData()
for _, v := range ChampshipData.Rank {
for _, r := range v {
if r.Type != RANK_PLAYER_ROBOT {
c.SetRankCache(r.Uid)
}
}
}
}
func (c *ChampshipMgr) NotifyAll() (interface{}, error) {
@ -854,6 +866,7 @@ func (c *ChampshipMgr) SetRankCache(Uid int) {
db.RedisSetKey(key, fmt.Sprintf("%d_%d_%d_%d", PreRank, Rank, PreGroupId, GroupId), time.Second*172800)
}
// champship_rank_cache_105372
func GetRankCache(Uid int) (int, int, int, int) {
key := fmt.Sprintf("champship_rank_cache_%d", Uid)
data, err := db.RedisGetKey(key)