优化数据收取

This commit is contained in:
hahwu 2025-01-24 12:00:12 +08:00
parent 2c3b420743
commit 0e3997eb0b
2 changed files with 2 additions and 1 deletions

View File

@ -90,7 +90,7 @@ func (f *FriendMgr) sendToPlayer(m *msg.Msg) (interface{}, error) {
func (f *FriendMgr) sync(m *msg.Msg) (interface{}, error) {
data := f.getData().List[m.From]
f.getData().List[m.From] = make([]*msg.Msg, 0)
log.Debug("sync friendMgr msg to player success")
log.Debug("sync friendMgr msg to player %d success", m.From)
return data, nil
}

View File

@ -561,6 +561,7 @@ func (ad *GameLogic) ReplaceExistPlayerAndAgent(a gate.Agent, player *Player) er
Timer.Stop()
}
player.LoginBackData()
SyncFriendMsg(player)
log.Debug("player %d 重连", player.M_DwUin)
return nil
}