modify 允许游戏中顶号
This commit is contained in:
parent
fe3f0a185d
commit
70f8ef26e0
|
@ -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
|
||||
// 账号冻结
|
||||
|
|
Loading…
Reference in New Issue