Created
May 14, 2013 16:06
-
-
Save SymbolixDEV/5577167 to your computer and use it in GitHub Desktop.
Seduction glyph FiX- Warlock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 6358 - Seduction (Glyph of Succubus) | |
class spell_warl_seduction : public SpellScriptLoader | |
{ | |
public: | |
spell_warl_seduction() : SpellScriptLoader("spell_warl_seduction") { } | |
class spell_warl_seduction_SpellScript : public SpellScript | |
{ | |
PrepareSpellScript(spell_warl_seduction_SpellScript); | |
void HandleScriptEffect(SpellEffIndex /*effIndex*/) | |
{ | |
Unit* caster = GetCaster(); | |
if (Unit* target = GetHitUnit()) | |
{ | |
if (caster->GetOwner() && caster->GetOwner()->HasAura(SPELL_WARLOCK_GLYPH_OF_SUCCUBUS)) | |
{ | |
target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE, 0, target->GetAura(SPELL_PRIEST_SHADOW_WORD_DEATH)); // SW:D shall not be removed. | |
target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT); | |
target->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH); | |
} | |
} | |
} | |
void Register() | |
{ | |
OnEffectHitTarget += SpellEffectFn(spell_warl_seduction_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA); | |
} | |
}; | |
SpellScript* GetSpellScript() const | |
{ | |
return new spell_warl_seduction_SpellScript(); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment