Jump to content

[dev] Aura Consolidation + Stacking


Recommended Posts

  • 38 years later...

Currently on mangos whenever a new aura is applied to the caster it is applied as a separate aura object. This is not official behavior. Any aura that stacks whether it be an armor debuff such as sunder or devastate or an npc spell such as immolation arrow, they are applied to both casters and npcs many more times than need be. With the dbc column that states the amount of stacks possible for each spell, shouldn't it be possible to consolidate auras and just update m_amount for each application and refresh the duration? This would also fix spells such as lifebloom, wound poison, sunder, lacerate etc. If one aura were to be dispelled of the stack we could just remove one of the stack and update the amount rather than having to reapply/unapply an aura object everytime. I think in the end this would remove a lot of overhead and also fix plenty of spells in the process.

But as a noobie coder I'm at a loss on where to start. I know i need to add an m_stacks variable to the aura class, and to change how each stacking aura is treated. I know i need to simplify Unit::RemoveSingleAuraFromStack. What does the effindex do? One more question is does anyone know how to determine whether a spell is only allowed 1 stack on a person ie sunder vs multiple stacks ie lifebloom.

Any input/knowledge is greatly appreciated :D

-Deaf

Link to comment
Share on other sites

First you may look at Unit::AddAura which checks if there already exists stacking auras. You may add m_stack of the old aura and update modifier and then delete Aur; return false; so the new aura is not added. If multiple stacks from different casters is allowed is also checked there. Now only DoT/HoT is allowed though it is not a correct checking method.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use