[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

@ -735,7 +735,7 @@ enum SpellEffects
SPELL_EFFECT_TALENT_SPEC_COUNT = 161,
SPELL_EFFECT_TALENT_SPEC_SELECT = 162,
SPELL_EFFECT_163 = 163,
SPELL_EFFECT_164 = 164,
SPELL_EFFECT_CANCEL_AURA = 164,
TOTAL_SPELL_EFFECTS = 165
};

View file

@ -346,6 +346,7 @@ class Spell
void EffectPlayMusic(SpellEffectIndex eff_idx);
void EffectSpecCount(SpellEffectIndex eff_idx);
void EffectActivateSpec(SpellEffectIndex eff_idx);
void EffectCancelAura(SpellEffectIndex eff_idx);
Spell(Unit* caster, SpellEntry const *info, bool triggered, ObjectGuid originalCasterGUID = ObjectGuid(), SpellEntry const* triggeredBy = NULL);
~Spell();

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);
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11300"
#define REVISION_NR "11301"
#endif // __REVISION_NR_H__