mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 00:00:13 +00:00
feat: fire CHAT_MSG_* events to Lua addons for all chat types
Wire chat messages to the addon event system via AddonChatCallback. Every chat message now fires the corresponding WoW event: - CHAT_MSG_SAY, CHAT_MSG_YELL, CHAT_MSG_WHISPER - CHAT_MSG_PARTY, CHAT_MSG_GUILD, CHAT_MSG_OFFICER - CHAT_MSG_RAID, CHAT_MSG_RAID_WARNING, CHAT_MSG_BATTLEGROUND - CHAT_MSG_SYSTEM, CHAT_MSG_CHANNEL, CHAT_MSG_EMOTE Event handlers receive (eventName, message, senderName) arguments. Addons can now filter, react to, or log chat messages in real-time.
This commit is contained in:
parent
510f03fa32
commit
0a0ddbfd9f
3 changed files with 31 additions and 0 deletions
|
|
@ -14521,6 +14521,7 @@ void GameHandler::addLocalChatMessage(const MessageChatData& msg) {
|
|||
if (chatHistory.size() > maxChatHistory) {
|
||||
chatHistory.pop_front();
|
||||
}
|
||||
if (addonChatCallback_) addonChatCallback_(msg);
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue