aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellAuras.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-05-23 11:26:08 +0200
committerQAston <none@none>2009-05-23 11:26:08 +0200
commit73faabbc491e72c4189f15c62546cdecf0f6bd39 (patch)
treec3fbfd448ba1a17b9697b381962209282201d9fb /src/game/SpellAuras.cpp
parent4d9bce3270c52d654a9f43da585f138c696d4053 (diff)
*Fix a crash.
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r--src/game/SpellAuras.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index c0c64bd8181..e0c6184d695 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -848,7 +848,7 @@ void AuraEffect::ApplyModifier(bool apply, bool Real, bool changeAmount)
(*this.*AuraHandler [m_auraName])(apply,Real, changeAmount);
}
-void AuraEffect::RecalculateAmount()
+void AuraEffect::RecalculateAmount(bool applied)
{
Unit *caster = GetParentAura()->GetCaster();
int32 amount = GetParentAura()->GetStackAmount() * caster->CalculateSpellDamage(m_spellProto, GetEffIndex(), GetBasePoints(), m_target);
@@ -856,9 +856,11 @@ void AuraEffect::RecalculateAmount()
if (amount!=GetAmount())
{
// Auras which are applying spellmod should have removed spellmods for real
- ApplyModifier(false,false,true);
+ if (applied)
+ ApplyModifier(false,false,true);
SetAmount(amount);
- ApplyModifier(true,false,true);
+ if (applied)
+ ApplyModifier(true,false,true);
}
}
@@ -1195,7 +1197,7 @@ void Aura::_RemoveAura()
}
}
-void Aura::SetStackAmount(uint8 stackAmount)
+void Aura::SetStackAmount(uint8 stackAmount, bool applied)
{
if (stackAmount != m_stackAmount)
{
@@ -1204,7 +1206,7 @@ void Aura::SetStackAmount(uint8 stackAmount)
{
if (AuraEffect * part = GetPartAura(i))
{
- part->RecalculateAmount();
+ part->RecalculateAmount(applied);
}
}
}