Originally Posted by gmarco
But frankly I don't understand how to write in others players GUILD/OFFICER/RAID channel using the AddMessage.
|
You can't.
Originally Posted by gmarco
They both can write in my ChatFrames, but I don't understand IF AddMessage can write in other players GUILD/OFFICER/RAID/INSTANCE_CHAT like SendChatMessage does.
|
It can't.
Here's an example of how it works:
1. Someone (maybe you) uses the SendChatMessage function to send a message to the GUILD channel.
2. The server receives the message, and sends it back to every player who is in the same GUILD channel.
3. Your client receives the message, and fires the CHAT_MSG_GUILD event to inform the UI (including addons) that a message was received in the GUILD channel.
4. The default UI processes the CHAT_MSG_GUILD event, formats the mesage with the channel and sender names, and calls the AddMesssage method on each of the default chat frames that are configured to show messages in the GUILD channel.
AddMessage is a
frame method, just like SetAlpha or ClearAllPoints, that all ScrollingMessageFrame type frames have. You can't call AddMessage for a chat frame on someone else's computer any more than you can call SetAlpha on a frame on someone else's computer.