Skip to content

Instantly share code, notes, and snippets.

@SymbolixDEV
Created May 14, 2013 16:06
Show Gist options
  • Save SymbolixDEV/5577167 to your computer and use it in GitHub Desktop.
Save SymbolixDEV/5577167 to your computer and use it in GitHub Desktop.
Seduction glyph FiX- Warlock
// 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