diff options
author | megamage <none@none> | 2009-05-23 10:04:12 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-23 10:04:12 -0500 |
commit | bfac33f24f01cc9258f7024b116be6e70a101f25 (patch) | |
tree | 7d9b4a40aa6785604e203bb4620f0e400e938233 | |
parent | 37aa9c3cbf2b68b8a71130dbe71f0a729f068d65 (diff) |
*Try to fix an aura bug that cause server freeze
--HG--
branch : trunk
-rw-r--r-- | src/game/Unit.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index cce161acaae..8c87dc044fa 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -3815,12 +3815,14 @@ bool Unit::AddAura(Aura *Aur, bool handleEffects) // find current aura from spell and change it's stackamount if (Aura * foundAura = GetAura(aurSpellInfo->Id, Aur->GetCasterGUID())) { - uint8 stackAmount = foundAura->GetStackAmount() + 1; - if (stackAmount > aurSpellInfo->StackAmount) - stackAmount = aurSpellInfo->StackAmount; - Aur->SetStackAmount(stackAmount, false); + if(foundAura->aurSpellInfo->StackAmount) + { + uint8 stackAmount = foundAura->GetStackAmount() + 1; + if (stackAmount > aurSpellInfo->StackAmount) + stackAmount = aurSpellInfo->StackAmount; + Aur->SetStackAmount(stackAmount, false); + } RemoveAura(foundAura, AURA_REMOVE_BY_STACK); - return true; } } |