Thread Tools Display Modes
04-10-13, 02:54 PM   #1
pelf
Sentient Plasmoid
 
pelf's Avatar
Premium Member
Join Date: May 2008
Posts: 133
MSBT trigger question

I posted this in the comment thread and as an issue, but it's been a while and no response from Mik, so...

For Aura Application events, should the Amount condition be comparing against the 16th parameter of the associated SPELL_AURA_APPLIED combat log event?

I have a trigger set up as:
Classes: Priest
Event: Aura Application { Source = You, Skill ID = 17, Amount > 1 }
Exception: Unavailable Skill = Divine Aegis

If I remove the Amount, it works.
It seems like that should work. I don't really want to look into the code for the whole trigger system and find out what it's doing :|.
  Reply With Quote
04-10-13, 03:31 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Are you sure SPELL_AURA_APPLIED provides an amount value for Power Word: Shield?

Do you get any error messages, or just nothing appears?
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
04-10-13, 04:55 PM   #3
humfras
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2009
Posts: 131
I can confirm that the 16. argument of SPELL_AURA_APPLIED with Power Word: Shield is the absorb amount. (e.g. 67429.0703125)
__________________
Author of VuhDo CursorCastBar OptiTaunt Poisoner RaidMobMarker
  Reply With Quote
04-10-13, 05:40 PM   #4
pelf
Sentient Plasmoid
 
pelf's Avatar
Premium Member
Join Date: May 2008
Posts: 133
Definitely has amount. The trigger does not fire with the amount condition in place. Without the amount portion (only that part removed), the trigger does fire.

I can only imagine that either it's not connected to that amount or it was and something happened.
  Reply With Quote
04-13-13, 04:18 AM   #5
pelf
Sentient Plasmoid
 
pelf's Avatar
Premium Member
Join Date: May 2008
Posts: 133
Yeah, yeah. "I want you guys to look for me." I know.

So, each event type has a "capture function". The function for SPELL_AURA_APPLIED is:

SPELL_AURA_APPLIED = function (p, ...) p.eventType, p.amount, p.skillID, p.skillName, p.skillSchool, p.auraType = "aura", 1, ... end
This is followed by the function for SPELL_AURA_APPLIED_DOSE:

SPELL_AURA_APPLIED_DOSE = function (p, ...) p.eventType, p.skillID, p.skillName, p.skillSchool, p.auraType, p.amount = "aura", ... end
So, that one pulls amount from the right place. I followed the code through trigger evaluation and it does not reach back into the vararg to get the actual amount after the fact.

Can anyone think of why SPELL_AURA_APPLIED's amount is set explicitly to 1?

Last edited by pelf : 04-13-13 at 04:30 AM.
  Reply With Quote
04-13-13, 01:35 PM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Either it's a copypasta mistake, or at the time it was written, SPELL_AURA_APPLIED didn't provide actual amount information. Your best bet is to just patch your local copy (change "1" to something like "p.amount or 1" so it won't die on auras that don't provide an amount) and get in touch with the author to get the update included in the official version.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
04-13-13, 03:05 PM   #7
pelf
Sentient Plasmoid
 
pelf's Avatar
Premium Member
Join Date: May 2008
Posts: 133
Well, the problem is, as it turns out, that amount contains aura stack count for _DOSE-type events. Later on, the code is checking to see if amount > 1 to determine if the aura is stacking. I'm going to have to add another flag to that event info table to indicate whether it was a _DOSE-type event rather than relying on amount being 1 for non-_DOSE-type events. Let's see if this works...

Yep, that did it. Stacking auras still function and now non-stack aura amount values can be read.

Last edited by pelf : 04-13-13 at 03:09 PM.
  Reply With Quote
04-15-13, 09:00 AM   #8
Mikord
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 61
Thanks for looking into it. Phanx is correct that at the time the code was written, SPELL_AURA_APPLIED didn't provide amount information, so I hard coded it to 1. And, as you pointed at, the code later checks for amounts >1 to determine stacks, since that was true at the time the code was written. I'll apply the patch to account for the changes.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » MSBT trigger question


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