diff --git a/worldsrv/action_login.go b/worldsrv/action_login.go index dc0c58b..cd7ff1d 100644 --- a/worldsrv/action_login.go +++ b/worldsrv/action_login.go @@ -227,21 +227,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(), @@ -270,7 +270,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 // 账号冻结