This commit is contained in:
aozhiwei 2024-03-19 19:24:37 +08:00
parent 8c0b66f891
commit 1f58f81f28

View File

@ -74,6 +74,14 @@ func (this *playerMgr) CMLogin(hdr *f5.MsgHdr, msg *cs.CMLogin) {
return return
} }
if msg.GetZoneId() < 1 || msg.GetZoneId() > 100 ||
msg.GetNodeId() < 1 || msg.GetNodeId() > 10 {
rspMsg := cs.SMLogin{}
rspMsg.Errcode = proto.Int32(3)
rspMsg.Errmsg = proto.String("zone_id or node_id error")
GetWspListener().SendProxyMsg(hdr.Conn, hdr.SocketHandle, &rspMsg)
return
}
} }
{ {
oldHum := this.internalGetPlayerBySocket(hdr.GetSocket()) oldHum := this.internalGetPlayerBySocket(hdr.GetSocket())