From 5ecc1063ad202ec40a148b479e40b51e534c82eb Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sat, 16 Sep 2023 10:11:24 +0800 Subject: [PATCH] 1 --- server/hallserver/room/room.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/hallserver/room/room.go b/server/hallserver/room/room.go index ac44f3f4..20c9b11c 100644 --- a/server/hallserver/room/room.go +++ b/server/hallserver/room/room.go @@ -185,6 +185,14 @@ func (this *room) CMLeaveRoom(hdr *f5.MsgHdr, msg *cs.CMLeaveRoom) { func (this *room) CMModifyRoom(hdr *f5.MsgHdr, msg *cs.CMModifyRoom) { hum := hdr.Context.(common.Player) rspMsg := cs.SMModifyRoom{} + if this.isOwner(hum) { + if msg.MapId != nil { + this.config.mapId = msg.GetMapId() + } + if msg.Passwd != nil { + this.config.passwd = msg.GetPasswd() + } + } hum.SendMsg(&rspMsg) }