bug修复
This commit is contained in:
parent
f5c457f6d3
commit
a10d4b9e43
@ -104,6 +104,18 @@ func (c *ChampshipMgr) Init() {
|
|||||||
c.mDispatr.AfterFunc(time.Duration(GoUtil.NextZeroTimestampDuration())*time.Second, func() {
|
c.mDispatr.AfterFunc(time.Duration(GoUtil.NextZeroTimestampDuration())*time.Second, func() {
|
||||||
c.ZeroUpdate()
|
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) {
|
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)
|
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) {
|
func GetRankCache(Uid int) (int, int, int, int) {
|
||||||
key := fmt.Sprintf("champship_rank_cache_%d", Uid)
|
key := fmt.Sprintf("champship_rank_cache_%d", Uid)
|
||||||
data, err := db.RedisGetKey(key)
|
data, err := db.RedisGetKey(key)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user