aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellAuras.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-05-23 10:57:05 +0200
committerQAston <none@none>2009-05-23 10:57:05 +0200
commit9af492483e8be747cd097bf11a4e68c41f9f2d96 (patch)
tree2e1274e132380dcd0ae2b0ecf278cabba8377859 /src/game/SpellAuras.cpp
parent028ed64e1091b9664babe132386a7530876f2ccf (diff)
*always remove old aura instead of recalculating new one in same id stack case-this prevents some problem with spelleffects execution problems
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r--src/game/SpellAuras.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 18abbd4c2e8..c0c64bd8181 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1145,7 +1145,7 @@ void Aura::_RemoveAura()
}
uint32 id = GetId();
// Remove Linked Auras
- if(spellmgr.GetSpellCustomAttr(id) & SPELL_ATTR_CU_LINK_REMOVE)
+ if(m_removeMode!=AURA_REMOVE_BY_STACK && m_removeMode!=AURA_REMOVE_BY_DEATH && spellmgr.GetSpellCustomAttr(id) & SPELL_ATTR_CU_LINK_REMOVE)
{
if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(-(int32)id))
for(std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
@@ -1153,11 +1153,11 @@ void Aura::_RemoveAura()
if(*itr < 0)
m_target->RemoveAurasDueToSpell(-(*itr));
else if(Unit* caster = GetCaster())
- if (m_removeMode!=AURA_REMOVE_BY_DEFAULT && m_removeMode!=AURA_REMOVE_BY_DEATH)
+ if (m_removeMode!=AURA_REMOVE_BY_DEFAULT)
m_target->CastSpell(m_target, *itr, true, 0, 0, caster->GetGUID());
}
}
- if(spellmgr.GetSpellCustomAttr(id) & SPELL_ATTR_CU_LINK_AURA)
+ if(m_removeMode!=AURA_REMOVE_BY_STACK && m_removeMode!=AURA_REMOVE_BY_DEATH && spellmgr.GetSpellCustomAttr(id) & SPELL_ATTR_CU_LINK_AURA)
{
if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(id + SPELL_LINK_AURA))
for(std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)