This commit is contained in:
aozhiwei 2024-03-11 16:53:31 +08:00
parent a1ff5b9cc8
commit 9886441c14

View File

@ -298,23 +298,35 @@ func (this *playerMgr) SS_WSP_SocketDisconnect(hdr *f5.MsgHdr, msg *ss.SS_WSP_So
}
func (this *playerMgr) CMReconnect(hdr *f5.MsgHdr, msg *cs.CMReconnect) {
/*
hum := this.internalGetPlayerByAccountId(msg.GetAccountId())
hum := this.internalGetPlayerBySocket(hdr.GetSocket())
rspMsg := &cs.SMReconnect{}
if hum == nil {
rspMsg.Errcode = proto.Int32(1)
rspMsg.Errmsg = proto.String("")
if hum != nil {
GetWspListener().SendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg)
return
}
if hum.GetSessionId() != msg.GetSessionId() {
team := GetTeamMgr().GetTeamByUuid(msg.GetTeamUuid())
if team == nil {
rspMsg.Errcode = proto.Int32(1)
rspMsg.Errmsg = proto.String("")
rspMsg.Errmsg = proto.String("team already disband")
GetWspListener().SendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg)
return
}
member := team.GetMemberByAccountId(msg.GetAccountId())
if member == nil {
rspMsg.Errcode = proto.Int32(1)
rspMsg.Errmsg = proto.String("team already disband")
GetWspListener().SendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg)
return
}
hum = member.(*player)
if hum.GetSessionId() != msg.GetSessionId() {
rspMsg.Errcode = proto.Int32(2)
rspMsg.Errmsg = proto.String("invalid session_id")
GetWspListener().SendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg)
return
}
hum.reBind(hdr.GetSocket())
GetWspListener().SendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg)*/
GetWspListener().SendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg)
}
func (this *playerMgr) onSocketClose(conn f5.WspCliConn) {