Skip to content

Commit

Permalink
Chat Message trigger: leader events were not added if a chatType was …
Browse files Browse the repository at this point in the history
…selected

fixes WeakAuras#5088
  • Loading branch information
mrbuds committed May 20, 2024
1 parent 0949256 commit 5f19af5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 5 additions & 1 deletion WeakAuras/Prototypes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7491,7 +7491,11 @@ Private.event_prototypes = {
type = "event",
events = function(trigger)
if trigger.use_messageType and trigger.messageType and Private.chat_message_types[trigger.messageType] then
return { ["events"] = {trigger.messageType} }
local events = {trigger.messageType}
if Private.chat_message_leader_event[trigger.messageType] then
table.insert(events, Private.chat_message_leader_event[trigger.messageType])
end
return { events = events }
end
return {
["events"] = {
Expand Down
7 changes: 7 additions & 0 deletions WeakAuras/Types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2935,6 +2935,13 @@ Private.chat_message_types = {
CHAT_MSG_LOOT = L["Loot"],
}

---@type table<string, string>
Private.chat_message_leader_event = {
CHAT_MSG_INSTANCE_CHAT = "CHAT_MSG_INSTANCE_CHAT_LEADER",
CHAT_MSG_PARTY = "CHAT_MSG_PARTY_LEADER",
CHAT_MSG_RAID = "CHAT_MSG_RAID_LEADER"
}

---@type table<string, string>
Private.send_chat_message_types = {
WHISPER = L["Whisper"],
Expand Down

0 comments on commit 5f19af5

Please sign in to comment.