From 70f8ef26e0b0ddec133f8dcf65f703d90834c10d Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Wed, 25 Dec 2024 09:51:18 +0800 Subject: [PATCH] =?UTF-8?q?modify=20=E5=85=81=E8=AE=B8=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=E4=B8=AD=E9=A1=B6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/action_login.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/worldsrv/action_login.go b/worldsrv/action_login.go index ac3a013..2ac86b9 100644 --- a/worldsrv/action_login.go +++ b/worldsrv/action_login.go @@ -207,21 +207,21 @@ func (this *CSLoginHandler) Process(s *netlib.Session, packetid int, data interf } // 玩家已经登录完成并且在游戏中,断开当前连接 - ls := LoginStateMgrSington.GetLoginStateByName(UserKey(csl.GetUsername(), csl.GetPlatform(), tagkey)) - if ls != nil && ls.acc != nil { - // lss 其它连接 - lss := LoginStateMgrSington.LoginFinish(csl.GetUsername(), csl.GetPlatform(), sid, ls.acc, tagkey) - player := PlayerMgrSington.GetPlayerBySnId(ls.acc.SnId) - waitMatch := false - if player != nil { - waitMatch, _ = TournamentMgr.IsMatchWaiting(player.Platform, player.SnId) - } - if len(lss) > 0 && (player != nil && (player.scene != nil || player.thrscene != 0 || waitMatch || TournamentMgr.IsGaming(player.SnId))) { - sendSCLogin(login_proto.OpResultCode_OPRC_LoginOtherPlace) - sendSCDisconnect(common.KickReason_Logining) - return nil - } - } + //ls := LoginStateMgrSington.GetLoginStateByName(UserKey(csl.GetUsername(), csl.GetPlatform(), tagkey)) + //if ls != nil && ls.acc != nil { + // // lss 其它连接 + // lss := LoginStateMgrSington.LoginFinish(csl.GetUsername(), csl.GetPlatform(), sid, ls.acc, tagkey) + // player := PlayerMgrSington.GetPlayerBySnId(ls.acc.SnId) + // waitMatch := false + // if player != nil { + // waitMatch, _ = TournamentMgr.IsMatchWaiting(player.Platform, player.SnId) + // } + // if len(lss) > 0 && (player != nil && (player.scene != nil || player.thrscene != 0 || waitMatch || TournamentMgr.IsGaming(player.SnId))) { + // sendSCLogin(login_proto.OpResultCode_OPRC_LoginOtherPlace) + // sendSCDisconnect(common.KickReason_Logining) + // return nil + // } + //} clog := &model.ClientLoginInfo{ LoginType: csl.GetLoginType(), @@ -250,7 +250,7 @@ func (this *CSLoginHandler) Process(s *netlib.Session, packetid int, data interf // 用缓存信息做登录,有account // 根据StartLogin代码,这里ls.acc一定不为nil - ls = LoginStateMgrSington.GetLoginStateByName(UserKey(csl.GetUsername(), csl.GetPlatform(), tagkey)) + ls := LoginStateMgrSington.GetLoginStateByName(UserKey(csl.GetUsername(), csl.GetPlatform(), tagkey)) if ls != nil { acc := ls.acc // 账号冻结