#Is Duration Info mandatory in custom triggers?

15 messages · Page 1 of 1 (latest)

brisk sage
#

Hi, I've created a simple text WA that shows my current spell power value via calling GetSpellBonusDamage(6) function. This was easy if the check was set to update every frame but I realized this was not very efficient so decided to use a custom trigger that would hook on SPELL_POWER_CHANGED event instead, define a custom trigger returning true and leaving everything else default.

The problem I've hit though was that the value was not updating. After a couple of hours of try/error I've got it working by defining a function in Duration Info field that returns bogus, but valid timing info.

Now I've checked the github wiki for custom triggers and it says nothing about Duration Info being a mandatory thing. After all I don't actually need a duration to be passed into the text WA as I only need the value.

So my question here is if the Duration Info function needs always be specified for custom trigger or if there's a better/simpler way of doing a custom trigger firing on an specific event.

ornate fossil
#

It's not. But if you use a custom trigger there is usually no reason to use a custom text.

#

Use one of the dynamic information fields.

#

There is also a default trigger for stats which already should have spellpower included

#

Trigger update means, when the dynamic information of the trigger changes. Just return true over and over again changes nothing

brisk sage
#

Hi @ornate fossil yes, the custom text function is not necessary as name function will do the same. As of stats there are all except spellpower unfortunately, which is sad as SP is probably the only stat missing. I only found a request that was declined https://github.com/WeakAuras/WeakAuras2/issues/4310

ornate fossil
#

Get rid of the custom text, use stacks instead and %s

#

Allows you to use the formatting options of weqkauras and allows you to do fancy condition things

#

The pure number

brisk sage
#

I can confirm moving the GetSpellBonusDamage(6) function to Stack info and using %s works.

#

But i still have to return true in Custom trigger (as in "always active"?) and return proper Duration Info to make it work.

#

I wonder why the duration info is needed.

ornate fossil
#

It isnt

#

The custom trigger is needed but a duration is not, assuming you choose the right type status

brisk sage
#

OK you're absolutely right there. After I moved that function from custom text to stack info, the duration info is indeed no longer needed!