This commit is contained in:
hahwu 2025-03-28 12:30:27 +08:00
parent cb66894d3f
commit 4e0023ec85

View File

@ -121,7 +121,7 @@ func sendToPlayer(m *msg.Msg) error {
if p == nil || p.stop {
return fmt.Errorf("player %d not online", m.To)
}
p.Send(m)
p.Send(m.Clone())
return nil
}
@ -147,12 +147,12 @@ func ClusterFriendSync(m *msg.Msg) error {
log.Debug("ClusterFriendSync")
if v, ok := G_GameLogicPtr.FriendMgr.getData().ClusterMsg[m.To]; ok {
for _, msg := range v {
mergeCluster.SendServerMsg(msg, m.To)
mergeCluster.SendServerMsg(msg.Clone(), m.To)
}
}
return nil
}
func FriendMgrCall(m *msg.Msg) interface{} {
return G_GameLogicPtr.FriendMgrCall(m)
return G_GameLogicPtr.FriendMgrCall(m.Clone())
}