From da8f73020fc4382222a605a70952f65b8907435c Mon Sep 17 00:00:00 2001 From: hahwu <31872165+hahwu@users.noreply.github.com> Date: Wed, 30 Jul 2025 11:48:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=81=E7=94=A8GM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/game/Gm.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/game/Gm.go b/src/server/game/Gm.go index 88757f9d..b14f1bae 100644 --- a/src/server/game/Gm.go +++ b/src/server/game/Gm.go @@ -32,9 +32,6 @@ import ( ) func ReqGmCommand(player *Player, buf []byte) error { - // if conf.Server.GameName != "pet_home" && conf.Server.GameName != "merge_pet_sdk" { - // return fmt.Errorf("Player %d ReqGmCommand not support in game %s", player.M_DwUin, conf.Server.GameName) - // } detail := &msg.ReqGmCommand{} proto.Unmarshal(buf, detail) return ReqGmCommand_(player, detail.Command) @@ -45,6 +42,9 @@ func ReqGmCommand_(player *Player, Command string) error { // log.Error("ReqGmCommand panic: %v", err) // } // }() + if conf.Server.GameName != "pet_home" && conf.Server.GameName != "merge_pet_sdk" { + return fmt.Errorf("Player %d ReqGmCommand not support in game %s, command %s", player.M_DwUin, conf.Server.GameName, Command) + } player.TeLog("gm", map[string]interface{}{ "command": Command, })