WoW:API SendAddonMessage: Difference between revisions
Jump to navigation
Jump to search
(Updated the info regarding the new BATTLEGROUND type tag) |
(Reformat) |
||
Line 1: | Line 1: | ||
{{wowapi}} | |||
Sends a message to hidden AddOn channels. ('''new with patch 1.12''') | Sends a message to hidden AddOn channels. ('''new with patch 1.12''') | ||
SendAddonMessage("prefix", "text", "PARTY|RAID|GUILD|BATTLEGROUND") | SendAddonMessage("prefix", "text", "PARTY|RAID|GUILD|BATTLEGROUND") | ||
== Example == | |||
SendAddonMessage("CTRA", "User Data: XYZ", "RAID"); | |||
SendAddonMessage("CTRA", "User Data: XYZ", "RAID"); | |||
== Notes == | |||
: Fires the Event [[Events_C_%28Cancel%2C_Character%2C_Chat%2C_Cinematic%2C_Clear%2C_Close%2C_Confirm%2C_Corpse%2C_Craft%2C_Current%2C_Cursor%2C_CVar%29#CHAT_MSG_ADDON|CHAT_MSG_ADDON]] | : Fires the Event [[Events_C_%28Cancel%2C_Character%2C_Chat%2C_Cinematic%2C_Clear%2C_Close%2C_Confirm%2C_Corpse%2C_Craft%2C_Current%2C_Cursor%2C_CVar%29#CHAT_MSG_ADDON|CHAT_MSG_ADDON]] | ||
Line 17: | Line 15: | ||
: The combined length of message plus prefix can be at most 254 characters. | : The combined length of message plus prefix can be at most 254 characters. | ||
: The message will be unaffected by inebriation. | : The message will be unaffected by inebriation. | ||
: (From | : (From [[Slouken]]) | ||
: The prefix cannot include a tab character ("\t") as it's used as a delimiter between the prefix and the text when the message is sent from the client. When the message is recieved by other clients, it's broken back in to two peices in the client and the sent to lua. Using a tab character in the text may be acceptable, but is unadvised. | : The prefix cannot include a tab character ("\t") as it's used as a delimiter between the prefix and the text when the message is sent from the client. When the message is recieved by other clients, it's broken back in to two peices in the client and the sent to lua. Using a tab character in the text may be acceptable, but is unadvised. | ||
Line 23: | Line 21: | ||
: The actual function name may end up being SendAddOnMessage() to be consistent with existing function names. | : The actual function name may end up being SendAddOnMessage() to be consistent with existing function names. | ||
: You will now be able to use "RAID" or "PARTY" | : You will now be able to use "RAID" or "PARTY". For auto created battleground groups, you will have to use the "BATTLEGROUND" type instead. | ||
Revision as of 20:24, 28 July 2006
Sends a message to hidden AddOn channels. (new with patch 1.12)
SendAddonMessage("prefix", "text", "PARTY|RAID|GUILD|BATTLEGROUND")
Example
SendAddonMessage("CTRA", "User Data: XYZ", "RAID");
Notes
- Fires the Event CHAT_MSG_ADDON
- The combined length of message plus prefix can be at most 254 characters.
- The message will be unaffected by inebriation.
- (From Slouken)
- The prefix cannot include a tab character ("\t") as it's used as a delimiter between the prefix and the text when the message is sent from the client. When the message is recieved by other clients, it's broken back in to two peices in the client and the sent to lua. Using a tab character in the text may be acceptable, but is unadvised.
- The actual function name may end up being SendAddOnMessage() to be consistent with existing function names.
- You will now be able to use "RAID" or "PARTY". For auto created battleground groups, you will have to use the "BATTLEGROUND" type instead.