Thread Tools Display Modes
Prev Previous Post   Next Post Next
05-14-21, 06:53 AM   #1
MinguasBeef
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: May 2019
Posts: 51
Issue with CHAT_MSG_ADDON

On the TBC beta, it seems like sending addon messages isn't working properly.

I might be just doing something wrong.

When I am sending the addon chat msg, I am triggering my event. When my party member sends it, the event is not triggered.

Here is the code for my frame.
Code:
local function CHAT_MSG_ADDON_CALLBACK(prefix, msg, type, sender)
    print("Chat message addon callback triggered!")
    print("prefix: " .. prefix)
    print("msg: " .. msg)
    print("type: " .. type)
    print("sender: " .. sender)
end

local function FrameEventCallback(event, ...)
    if (event == "CHAT_MSG_ADDON") then
        CHAT_MSG_ADDON_CALLBACK(...)
    end
end

local f = CreateFrame("Frame")
f:SetScript("OnEvent", 
function(self, event, ...)
    FrameEventCallback(event, ...)
end)

f:RegisterEvent("CHAT_MSG_ADDON")
Here is the code being used to trigger the event.
Code:
/run C_ChatInfo.SendAddonMessage("TEST EVENT", "Some Value")
When I run it, I see the message in chat just like i'd expect. When my party member runs it, I see nothing.

Any ideas?
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Issue with CHAT_MSG_ADDON


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off