[11301] Implement SPELL_EFFECT_CANCEL_AURA

This commit is contained in:
zergtmn 2011-03-31 13:24:27 +06:00
parent d2d3c22b77
commit 4d262b593d
4 changed files with 21 additions and 4 deletions

View file

@ -223,8 +223,8 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
&Spell::EffectNULL, //160 SPELL_EFFECT_160 single spell: Nerub'ar Web Random Unit
&Spell::EffectSpecCount, //161 SPELL_EFFECT_TALENT_SPEC_COUNT second talent spec (learn/revert)
&Spell::EffectActivateSpec, //162 SPELL_EFFECT_TALENT_SPEC_SELECT activate primary/secondary spec
&Spell::EffectNULL, //163
&Spell::EffectNULL, //164 cancel's some aura...
&Spell::EffectUnused, //163 unused in 3.3.5a
&Spell::EffectCancelAura, //164 SPELL_EFFECT_CANCEL_AURA
};
void Spell::EffectEmpty(SpellEffectIndex /*eff_idx*/)
@ -8805,3 +8805,19 @@ void Spell::EffectTeachTaxiNode( SpellEffectIndex eff_idx )
player->SendDirectMessage( &data );
}
}
void Spell::EffectCancelAura(SpellEffectIndex eff_idx)
{
if (!unitTarget)
return;
uint32 spellId = m_spellInfo->EffectTriggerSpell[eff_idx];
if (!sSpellStore.LookupEntry(spellId))
{
sLog.outError("Spell::EffectCancelAura: spell %u doesn't exist", spellId);
return;
}
unitTarget->RemoveAurasDueToSpell(spellId);
}