diff options
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 47bb7307a2b..609aef6df02 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -3809,22 +3809,18 @@ bool Unit::AddAura(Aura *Aur, bool handleEffects) SpellEntry const* aurSpellInfo = Aur->GetSpellProto(); - // passive and persistent auras can stack with themselves any number of times - if (!Aur->IsPassive() && !Aur->IsPersistent()) + // passive and persistent and Incanter's Absorption auras can stack with themselves any number of times + if (!Aur->IsPassive() && !Aur->IsPersistent() && aurSpellInfo->Id != 44413) { // find current aura from spell and change it's stackamount if (Aura * foundAura = GetAura(aurSpellInfo->Id, Aur->GetCasterGUID())) { - // hack for Incanter's Absorption - if (aurSpellInfo->Id != 44413) - { - if(aurSpellInfo->StackAmount && foundAura->GetStackAmount() < aurSpellInfo->StackAmount) - foundAura->SetStackAmount(foundAura->GetStackAmount()+1); - else - foundAura->RefreshAura(); - delete Aur; - return false; - } + uint8 stackAmount = foundAura->GetStackAmount() + 1; + if (stackAmount > aurSpellInfo->StackAmount) + stackAmount = aurSpellInfo->StackAmount; + Aur->SetStackAmount(stackAmount); + RemoveAura(foundAura, AURA_REMOVE_BY_STACK); + return true; } } @@ -3915,10 +3911,6 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur) uint32 i_spellId = i_spellProto->Id; bool sameCaster = Aur->GetCasterGUID() == (*i).second->GetCasterGUID(); - // Incanter's Absorption, has been checked in refresh part - if(i_spellId == spellId && sameCaster) - continue; - if(IsPassiveSpell(i_spellId)) { // passive non-stackable spells not stackable only for same caster |