*Do not trigger linked spells when aura is removed by stack.
--HG-- branch : trunk
This commit is contained in:
+15
-12
@@ -4655,18 +4655,7 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(-(int32)Aur->GetSpellProto()->Id))
|
sLog.outDebug("Aura %u (%u) now is remove mode %d", Aur->GetId(), Aur->GetModifier()->m_auraname, mode);
|
||||||
{
|
|
||||||
for(std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
|
|
||||||
{
|
|
||||||
if(spell_triggered < 0)
|
|
||||||
RemoveAurasDueToSpell(-(*itr));
|
|
||||||
else if(Unit* caster = Aur->GetCaster())
|
|
||||||
CastSpell(this, *itr, true, 0, 0, caster->GetGUID());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sLog.outDebug("Aura %u now is remove mode %d",Aur->GetModifier()->m_auraname, mode);
|
|
||||||
assert(!Aur->IsInUse());
|
assert(!Aur->IsInUse());
|
||||||
Aur->ApplyModifier(false,true);
|
Aur->ApplyModifier(false,true);
|
||||||
|
|
||||||
@@ -4681,6 +4670,20 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
|
|||||||
if(statue)
|
if(statue)
|
||||||
statue->UnSummon();
|
statue->UnSummon();
|
||||||
|
|
||||||
|
if(mode != AURA_REMOVE_BY_STACK)
|
||||||
|
{
|
||||||
|
if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(-(int32)Aur->GetSpellProto()->Id))
|
||||||
|
{
|
||||||
|
for(std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
|
||||||
|
{
|
||||||
|
if(spell_triggered < 0)
|
||||||
|
RemoveAurasDueToSpell(-(*itr));
|
||||||
|
else if(Unit* caster = Aur->GetCaster())
|
||||||
|
CastSpell(this, *itr, true, 0, 0, caster->GetGUID());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// only way correctly remove all auras from list
|
// only way correctly remove all auras from list
|
||||||
if( m_Auras.empty() )
|
if( m_Auras.empty() )
|
||||||
i = m_Auras.end();
|
i = m_Auras.end();
|
||||||
|
|||||||
Reference in New Issue
Block a user