禁用GM指令

This commit is contained in:
hahwu 2025-07-28 09:59:35 +08:00
parent d42963777e
commit 292bb2de65

View File

@ -32,6 +32,9 @@ import (
) )
func ReqGmCommand(player *Player, buf []byte) error { 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{} detail := &msg.ReqGmCommand{}
proto.Unmarshal(buf, detail) proto.Unmarshal(buf, detail)
return ReqGmCommand_(player, detail.Command) return ReqGmCommand_(player, detail.Command)