More fixes to emote channel
This commit is contained in:
parent
865404ffb7
commit
c4075d1ee9
2 changed files with 5 additions and 11 deletions
14
Roll.lua
14
Roll.lua
|
|
@ -26,17 +26,11 @@ local function BuildModifierString(modifiers)
|
|||
return table.concat(parts, " ")
|
||||
end
|
||||
|
||||
-- Send a message to the given channel, handling EMOTE specially
|
||||
-- to avoid the message being redirected to raid chat when in a raid group.
|
||||
-- Send a message to the given channel.
|
||||
-- Note: EMOTE channel uses SendChatMessage like all others. The WoW API
|
||||
-- SendChatMessage(msg, "EMOTE") sends a proper /e emote from any context,
|
||||
-- unlike RunMacroText which is a protected function requiring a hardware event.
|
||||
local function SendToChannel(msg, channel)
|
||||
if channel == "EMOTE" then
|
||||
local editBox = ChatFrame1 and ChatFrame1.editBox or ChatFrame1EditBox
|
||||
if editBox then
|
||||
ChatFrame_OpenChat("/e " .. msg, ChatFrame1)
|
||||
ChatEdit_SendText(editBox)
|
||||
end
|
||||
return
|
||||
end
|
||||
SendChatMessage(msg, channel)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue