This commit is contained in:
aozhiwei 2023-09-15 22:54:38 +08:00
parent 90ecb4feee
commit 50d788aab7
2 changed files with 3 additions and 3 deletions

View File

@ -42,8 +42,8 @@ func (this *room) init(roomId string, roomIdx int64,
this.roomIdx = roomIdx
this.entry.Init(this)
this.config.mapId = msg.GetMapId()
this.config.zoneId = owner.GetZoneId()
this.config.nodeId = owner.GetNodeId()
this.config.zoneId = msg.GetZoneId()
this.config.nodeId = msg.GetNodeId()
this.config.passwd = msg.GetPasswd()
this.config.maxTeamNum = constant.ROOM_MAX_TEAM_NUM
this.owner = newMember(this, owner)

View File

@ -72,7 +72,7 @@ func (this *roomMgr) CMCreateRoom(hdr *f5.MsgHdr, msg *cs.CMCreateRoom) {
func (this *roomMgr) CMJoinRoom(hdr *f5.MsgHdr, msg *cs.CMJoinRoom) {
hum := hdr.Context.(common.Player)
rspMsg := cs.SMJoinRoom{}
if hum.GetRoom() != nil {
if hum.GetRoom() != nil && hum.GetRoom().GetRoomState() == ROOM_INIT_STATE {
rspMsg.Errcode = proto.Int32(1)
rspMsg.Errmsg = proto.String("already room")
hum.SendMsg(&rspMsg)