hekili icon indicating copy to clipboard operation
hekili copied to clipboard

extendBuff( aura, duration ) function for cleaner code

Open syrifgit opened this issue 4 months ago • 2 comments

Instead of writing buff.metamorphosis.expires = buff.metamorphosis.expires + 8

You'd write extendBuff( "metamorphosis", 8 )

Works with negative numbers, a check for the buff being removed if negative extension is greater than remaining duration, breaks out on 0.

Thoughts? What else am I missing to polish this up if you're interested in having it?

I copied it from addstack, unsure if I actually need the local a = class.auras[ aura ]?

syrifgit avatar Oct 30 '24 05:10 syrifgit