Hello,
I've poked around via searches looking for an answer, but have turned up empty handed so far. I'm modifying a mod (AnnounceTarget) for my own purposes as a MA Announce mod to let everyone know what target I am currently on.
The Ultimate Goal is to output a string of text to Raid Chat along the lines of:
Code:
ATTACK NOW!
TARGET: Wild Crag Boar (Lvl 7)
MARK: yellow four-point star
I run into problems when I try to color the mark text string with the appropriate color (e.g. yellow for the star, orange for the circle, etc.).
I include the pared down code. The function
GetRaidTargetIndex returns an integer which I reference to an array of strings for the right icon name. I then use
SendChatMessage to broadcast the information. There is more code (checks to make sure there is, in fact, an icon, etc. that all works fine, save for the disconnection problem on the yellow star.
Code:
-- determine raid icon
local ANN_RAIDICONS = {
" |cFF00FFFFyellow four-point star|r",
" orange circle",
" purple diamond",
" green triangle",
" white crescent moon",
" blue square",
" red cross",
" white skull",
};
local iconNumber = GetRaidTargetIndex("target");
RaidIconString = ANN_RAIDICONS[iconNumber];
msgLine2 = "MARK:"..RaidIconString;
SendChatMessage(msgLine2,ANT_CHANNEL);
Where
ANT_CHANNEL is equal to the string "RAID" or "PARTY", etc.
In this example, when the target icon is the star, I will be disconnected from the server. If it is any other icon (without the color string), the mod works fine.
I recall a few patches ago where trying to spoof item links in trade channels would result in a disconnect. Is this simply a side-effect of that? Or is there, perhaps, a way around that I just haven't been able to find?
I appreciate the help in advance.