[TBC] Merge multiple event triggers into one notification? (Paladin's taunt))
I enjoy learning to write simple addons as I come across things in-game that I would like to add notifications for. I have a problem that I'm not sure how to solve and would really appreciate the input from more experienced authors.
In TBC, Paladins have the Righteous Defense spell, which applies an aura to up to 3 enemies. I'd like to track which targets are affected and print the names of those targets in a single message. The single message part is where I'm not sure how to proceed.
I've figured out how to detect and print which targets are taunted:
Which prints up to 3 lines of target names. I'd like to combine that into a single message, so my next thought was to add them to a table:
I know that I can output the table of targets with table.concat, but my hurdle is that I'm not sure when I can actually call that and get the final list of targets.
Potential ideas I've had:
Hopefully I described things clearly enough. Thanks for reading this far!
Edit: I thought I ought to add a summary since the majority of the post just explained my thought process. I want to print a single message with the name of every target that has an aura applied as a result of a specific spell. So, as an example:
Righteous Defense: Scarlet Protector, Scarlet Defender, Scarlet Monk
Frost Nova: Scarlet Protector, Scarlet Defender, Scarlet Monk
I'm a little bit stuck because I'm not sure how to best take the multiple SPELL_AURA_APPLIED events that fire and combine them into a single message that captures the entire list of targets.
PS. I'm not sure where 'destName' comes from.
That worked perfectly. Thanks for teaching me something new.
|All times are GMT -6. The time now is 09:20 PM.|
vBulletin © 2022, Jelsoft Enterprises Ltd
© 2004 - 2021 MMOUI