View Single Post
01-18-13, 06:06 PM   #20
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Originally Posted by gmarco View Post
I don't understand how to write in others players GUILD/OFFICER/RAID channel using the AddMessage.
The default UI access some globals for the chat windows by referencing _G["CHAT_"..type.."_GET"]. These are the message prefixes used.

Code:
CHAT_GUILD_GET = "|Hchannel:GUILD|h[Guild]|h %s:\32";
CHAT_INSTANCE_CHAT_GET = "|Hchannel:INSTANCE_CHAT|h[Instance]|h %s:\32";
CHAT_INSTANCE_CHAT_LEADER_GET = "|Hchannel:INSTANCE_CHAT|h[Instance Leader]|h %s:\32";
CHAT_MONSTER_PARTY_GET = "|Hchannel:PARTY|h[Party]|h %s:\32";
CHAT_OFFICER_GET = "|Hchannel:OFFICER|h[Officer]|h %s:\32";
CHAT_PARTY_GET = "|Hchannel:PARTY|h[Party]|h %s:\32";
CHAT_PARTY_GUIDE_GET = "|Hchannel:PARTY|h[Dungeon Guide]|h %s:\32";
CHAT_PARTY_LEADER_GET = "|Hchannel:PARTY|h[Party Leader]|h %s:\32";
CHAT_PET_BATTLE_COMBAT_LOG_GET = "|Hchannel:PET_BATTLE_COMBAT_LOG|h[Pet Battle]|h:\32";
CHAT_PET_BATTLE_INFO_GET = "|Hchannel:PET_BATTLE_INFO|h[Pet Battle]|h:\32";
CHAT_RAID_GET = "|Hchannel:RAID|h[Raid]|h %s:\32";
CHAT_RAID_LEADER_GET = "|Hchannel:RAID|h[Raid Leader]|h %s:\32";
Additional probing reveals the following:
Numbered channels; |Hchannel:CHANNEL:1|h[1. General - Dalaran]|h.
BNet conversations; |Hchannel:BN_CONVERSATION:1|h[11. Conversation]|h.
Note BNet conversations start with an internal index of 1 instead of their displayed index of MAX_WOW_CHAT_CHANNELS+1.

Note these are the links used to allow the user to click and open a chat message to the respective channel. These only work for chatframe:AddMessage() and will be refused by SendChatMessage().
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 01-18-13 at 06:18 PM.
  Reply With Quote