增加GM指令

This commit is contained in:
hahwu 2026-03-20 17:02:56 +08:00
parent 72ccca583b
commit ef03eb4581
3 changed files with 13 additions and 4 deletions

View File

@ -653,6 +653,15 @@ func ReqGmCommand_(player *Player, Command string) error {
Id, _ := strconv.Atoi(arg[1]) Id, _ := strconv.Atoi(arg[1])
player.PlayMod.getInviteMod().AddInvite(Id) player.PlayMod.getInviteMod().AddInvite(Id)
player.PushClientRes(player.PlayMod.getInviteMod().NotifySuccess()) player.PushClientRes(player.PlayMod.getInviteMod().NotifySuccess())
case "championshipResult":
uid, _ := strconv.Atoi(arg[1])
FriendMgrSend(&MsgMod.Msg{
Type: MsgMod.HANDLE_TYPE_CHAMPSHIP_RESULT,
SendT: GoUtil.ZeroTimestamp(),
To: int(player.M_DwUin),
From: uid,
Extra: []int{2, 145},
})
case "debugLogoutMsg": case "debugLogoutMsg":
ToUid, _ := strconv.Atoi(arg[1]) ToUid, _ := strconv.Atoi(arg[1])
uidList, err := db.GetDebugPlayer(ToUid) uidList, err := db.GetDebugPlayer(ToUid)

View File

@ -472,7 +472,7 @@ func (m *MessageMgr) Handle(msg *msg.Msg) (interface{}, error) {
if fun, ok := m.handler[msg.Type]; ok { if fun, ok := m.handler[msg.Type]; ok {
return fun(msg) return fun(msg)
} }
log.Error("server mod key:%s handle not exist handle type:%d", m.key, msg.Type) log.Error("server mod key:%s handle not exist handle msg %v", m.key, msg)
return nil, fmt.Errorf("server mod handler err") return nil, fmt.Errorf("server mod handler err")
} }
@ -510,7 +510,7 @@ func (m *MessageMgr) MessageHandleAsync(message *msg.Msg) error {
return nil return nil
} }
log.Error("server mod key:%s handle not exist handle type:%d", m.key, message.Type) log.Error("server mod key:%s handle not exist handle msg %v", m.key, message)
return fmt.Errorf("server mod handler err") return fmt.Errorf("server mod handler err")
} }

View File

@ -26,8 +26,8 @@
"GameConfPath": "D:/Github/pet_home_server/src/server/gamedata/config/", "GameConfPath": "D:/Github/pet_home_server/src/server/gamedata/config/",
"ListenAddr":":9001", "ListenAddr":":9001",
"CenterAddr": "pethome.bywaystudios.com:9000", "CenterAddr": "127.0.0.1:9000",
"RemoteAddr":"host.docker.internal:9001", "RemoteAddr":":9001",
"RedisAddr":"127.0.0.1", "RedisAddr":"127.0.0.1",
"RedisPort" :"6379", "RedisPort" :"6379",