*Try to fix an aura bug that cause server freeze

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-23 10:04:12 -05:00
parent 37aa9c3cbf
commit bfac33f24f
+3 -1
View File
@@ -3814,13 +3814,15 @@ 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()))
{
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;
}
}