Core/Spells: Moved Glacial Strike removal to spell script, thanks Destalker for pointing it out
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user