-
-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extendBuff( aura, duration ) function for cleaner code #4114
base: thewarwithin
Are you sure you want to change the base?
Conversation
Review notes implemented, thanks @johnnylam88 108 ish references (some might not be duration changes) where this function could be used |
I'm open to something like this, though the name might be different (i.e., not Additionally, I'm curious about whether this should accomplish any of the following:
|
Sounds smart to me, cleaner code in the class files. Should we do the same for stuff like
Agree, but to clarify, "asking"
Either way would make sense to me, I was going to ask about debuffs after completing this one. Will do some revising today. |
Did a pass over the function @Hekili @johnnylam88.
|
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 ]
?