修复AOI的BUG问题

This commit is contained in:
flswld
2023-04-14 13:34:47 +08:00
parent e7c5723f98
commit ae5f2809bf
9 changed files with 74 additions and 83 deletions
+12
View File
@@ -491,10 +491,21 @@ func (g *Game) ReLoginPlayer(userId uint32, isQuitMp bool) {
g.SendMsg(cmd.ClientReconnectNotify, userId, 0, &proto.ClientReconnectNotify{
Reason: reason,
})
player := USER_MANAGER.GetOnlineUser(userId)
if player == nil {
return
}
player.NetFreeze = true
}
func (g *Game) LogoutPlayer(userId uint32) {
g.SendMsg(cmd.PlayerLogoutNotify, userId, 0, &proto.PlayerLogoutNotify{})
player := USER_MANAGER.GetOnlineUser(userId)
if player == nil {
return
}
// 冻结掉服务器对该玩家的下行 避免大量发包对整个系统造成压力
player.NetFreeze = true
}
func (g *Game) KickPlayer(userId uint32, reason uint32) {
@@ -510,4 +521,5 @@ func (g *Game) KickPlayer(userId uint32, reason uint32) {
KickReason: reason,
},
})
player.NetFreeze = true
}