修改message

This commit is contained in:
hahwu 2026-02-25 12:03:22 +08:00
parent 468e65e8da
commit 623baec632
3 changed files with 10 additions and 6 deletions

View File

@ -877,9 +877,10 @@ func (ad *GameLogic) GetStartTime() int64 {
} }
func NotifyPlayer(Uid int, m *MsgMod.Msg) { func NotifyPlayer(Uid int, m *MsgMod.Msg) {
m.To = Uid clone := *m
m.HandleType = MsgMod.HANDLE_MOD_PLAYER_MSG clone.To = Uid
NotifyPlayerMsgAsync(m) clone.HandleType = MsgMod.HANDLE_MOD_PLAYER_MSG
NotifyPlayerMsgAsync(&clone)
} }
func Destroy() { func Destroy() {

View File

@ -226,11 +226,11 @@ func NotifyAllPlayerMsg(m *msg.Msg) {
playerListCopy[k] = v playerListCopy[k] = v
} }
messageMgrData.mu.Unlock() messageMgrData.mu.Unlock()
// 在锁外发送消息 // 在锁外发送消息
for PlayerId, node := range playerListCopy { for PlayerId, node := range playerListCopy {
m.To = int(PlayerId) copym := m.Clone()
SendMsgToNodeAsync(m, node) copym.To = int(PlayerId)
SendMsgToNodeAsync(copym, node)
} }
} }

View File

@ -17,6 +17,9 @@ const (
// AAqFpbuPhFSEx // AAqFpbuPhFSEx
func SendFeishuFatal(PlayerId int, FuncName string, msg string) error { func SendFeishuFatal(PlayerId int, FuncName string, msg string) error {
if conf.Server.GameName == "pet_home_local" {
return nil
}
// 创建请求体 // 创建请求体
stack := make([]byte, 1024) stack := make([]byte, 1024)
length := runtime.Stack(stack, false) length := runtime.Stack(stack, false)