This commit is contained in:
aozhiwei 2023-09-16 10:11:24 +08:00
parent cd47d92256
commit 5ecc1063ad

View File

@ -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)
}