*Try to fix an aura bug that cause server freeze
--HG-- branch : trunk
This commit is contained in:
+3
-1
@@ -3814,13 +3814,15 @@ bool Unit::AddAura(Aura *Aur, bool handleEffects)
|
|||||||
{
|
{
|
||||||
// find current aura from spell and change it's stackamount
|
// find current aura from spell and change it's stackamount
|
||||||
if (Aura * foundAura = GetAura(aurSpellInfo->Id, Aur->GetCasterGUID()))
|
if (Aura * foundAura = GetAura(aurSpellInfo->Id, Aur->GetCasterGUID()))
|
||||||
|
{
|
||||||
|
if(foundAura->aurSpellInfo->StackAmount)
|
||||||
{
|
{
|
||||||
uint8 stackAmount = foundAura->GetStackAmount() + 1;
|
uint8 stackAmount = foundAura->GetStackAmount() + 1;
|
||||||
if (stackAmount > aurSpellInfo->StackAmount)
|
if (stackAmount > aurSpellInfo->StackAmount)
|
||||||
stackAmount = aurSpellInfo->StackAmount;
|
stackAmount = aurSpellInfo->StackAmount;
|
||||||
Aur->SetStackAmount(stackAmount, false);
|
Aur->SetStackAmount(stackAmount, false);
|
||||||
|
}
|
||||||
RemoveAura(foundAura, AURA_REMOVE_BY_STACK);
|
RemoveAura(foundAura, AURA_REMOVE_BY_STACK);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user