优化登录、离线、服务器重启等会话连接问题

This commit is contained in:
huangxiaolei
2022-12-21 14:25:14 +08:00
parent a288892f26
commit bfff798470
14 changed files with 348 additions and 307 deletions
+6
View File
@@ -18,6 +18,9 @@ func DoForward[IET model.InvokeEntryType](player *model.Player, req pb.Message,
}
cmdId := cmdProtoMap.GetCmdIdByProtoObj(req)
world := WORLD_MANAGER.GetWorldByID(player.WorldId)
if world == nil {
return
}
if invokeHandler.AllLen() == 0 && invokeHandler.AllExceptCurLen() == 0 && invokeHandler.HostLen() == 0 {
ntf := cmdProtoMap.GetProtoObjByCmdId(cmdId)
for _, fieldName := range copyFieldList {
@@ -90,6 +93,9 @@ func (g *GameManager) CombatInvocationsNotify(player *model.Player, payloadMsg p
return
}
world := WORLD_MANAGER.GetWorldByID(player.WorldId)
if world == nil {
return
}
scene := world.GetSceneById(player.SceneId)
for _, entry := range req.InvokeList {
switch entry.ArgumentType {