Core/Spells: Moved Glacial Strike removal to spell script, thanks Destalker for pointing it out

This commit is contained in:
Shauren
2011-01-31 20:06:47 +01:00
parent c006f1b904
commit 8d7a6cd611
4 changed files with 35 additions and 1 deletions
@@ -1286,7 +1286,6 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
{
case 43093: case 31956: case 38801: // Grievous Wound
case 35321: case 38363: case 39215: // Gushing Wound
case 70292: // Glacial Strike
if (target->IsFullHealth())
{
target->RemoveAurasDueToSpell(GetId());
@@ -275,10 +275,41 @@ class mob_geist_ambusher : public CreatureScript
}
};
class spell_trash_mob_glacial_strike : public SpellScriptLoader
{
public:
spell_trash_mob_glacial_strike() : SpellScriptLoader("spell_trash_mob_glacial_strike") { }
class spell_trash_mob_glacial_strike_AuraScript : public AuraScript
{
PrepareAuraScript(spell_trash_mob_glacial_strike_AuraScript);
void PeriodicTick(AuraEffect const* aurEff)
{
if (GetTarget()->IsFullHealth())
{
GetTarget()->RemoveAura(GetId(), AURA_REMOVE_BY_ENEMY_SPELL);
PreventDefaultAction();
}
}
void Register()
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_trash_mob_glacial_strike_AuraScript::PeriodicTick, EFFECT_2, SPELL_AURA_PERIODIC_DAMAGE_PERCENT);
}
};
AuraScript* GetAuraScript() const
{
return new spell_trash_mob_glacial_strike_AuraScript();
}
};
void AddSC_pit_of_saron()
{
new mob_ymirjar_flamebearer();
new mob_wrathbone_laborer();
new mob_iceborn_protodrake();
new mob_geist_ambusher();
new spell_trash_mob_glacial_strike();
}