Core/Spells: Removed a faulty aura handler

Closes #17590
This commit is contained in:
Krudor
2016-10-15 16:17:55 +02:00
committed by Shauren
parent 26de86177e
commit ad16014c7d
6 changed files with 330 additions and 27 deletions

View File

@@ -4386,6 +4386,80 @@ class spell_gen_azgalor_rain_of_fire_hellfire_citadel : public SpellScriptLoader
}
};
enum AuraProcRemoveSpells
{
SPELL_FACE_RAGE = 99947,
SPELL_IMPATIENT_MIND = 187213
};
// 99947 - Face Rage
class spell_gen_face_rage : public SpellScriptLoader
{
public:
spell_gen_face_rage() : SpellScriptLoader("spell_gen_face_rage") { }
class spell_gen_face_rage_AuraScript : public AuraScript
{
PrepareAuraScript(spell_gen_face_rage_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_FACE_RAGE))
return false;
return true;
}
void OnRemove(AuraEffect const* /*effect*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveAurasDueToSpell(GetSpellInfo()->GetEffect(EFFECT_2)->TriggerSpell);
}
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_gen_face_rage_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_MOD_STUN, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_gen_face_rage_AuraScript();
}
};
// 187213 - Impatient Mind
class spell_gen_impatient_mind : public SpellScriptLoader
{
public:
spell_gen_impatient_mind() : SpellScriptLoader("spell_gen_impatient_mind") { }
class spell_gen_impatient_mind_AuraScript : public AuraScript
{
PrepareAuraScript(spell_gen_impatient_mind_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_IMPATIENT_MIND))
return false;
return true;
}
void OnRemove(AuraEffect const* effect, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveAurasDueToSpell(effect->GetSpellEffectInfo()->TriggerSpell);
}
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_gen_impatient_mind_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_gen_impatient_mind_AuraScript();
}
};
void AddSC_generic_spell_scripts()
{
new spell_gen_absorb0_hitlimit1();
@@ -4480,4 +4554,6 @@ void AddSC_generic_spell_scripts()
new spell_gen_anetheron_summon_towering_infernal();
new spell_gen_mark_of_kazrogal_hellfire();
new spell_gen_azgalor_rain_of_fire_hellfire_citadel();
new spell_gen_face_rage();
new spell_gen_impatient_mind();
}

View File

@@ -2802,6 +2802,240 @@ public:
}
};
enum AuraProcRemoveSpells
{
SPELL_TALISMAN_OF_ASCENDANCE = 28200,
SPELL_JOM_GABBAR = 29602,
SPELL_BATTLE_TRANCE = 45040,
SPELL_WORLD_QUELLER_FOCUS = 90900,
SPELL_AZURE_WATER_STRIDER = 118089,
SPELL_CRIMSON_WATER_STRIDER = 127271,
SPELL_ORANGE_WATER_STRIDER = 127272,
SPELL_JADE_WATER_STRIDER = 127274,
SPELL_GOLDEN_WATER_STRIDER = 127278,
SPELL_BRUTAL_KINSHIP_1 = 144671,
SPELL_BRUTAL_KINSHIP_2 = 145738
};
// 28200 - Ascendance
class spell_item_talisman_of_ascendance : public SpellScriptLoader
{
public:
spell_item_talisman_of_ascendance() : SpellScriptLoader("spell_item_talisman_of_ascendance") { }
class spell_item_talisman_of_ascendance_AuraScript : public AuraScript
{
PrepareAuraScript(spell_item_talisman_of_ascendance_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_TALISMAN_OF_ASCENDANCE))
return false;
return true;
}
void OnRemove(AuraEffect const* effect, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveAurasDueToSpell(effect->GetSpellEffectInfo()->TriggerSpell);
}
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_item_talisman_of_ascendance_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_item_talisman_of_ascendance_AuraScript();
}
};
// 29602 - Jom Gabbar
class spell_item_jom_gabbar : public SpellScriptLoader
{
public:
spell_item_jom_gabbar() : SpellScriptLoader("spell_item_jom_gabbar") { }
class spell_item_jom_gabbar_AuraScript : public AuraScript
{
PrepareAuraScript(spell_item_jom_gabbar_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_JOM_GABBAR))
return false;
return true;
}
void OnRemove(AuraEffect const* effect, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveAurasDueToSpell(effect->GetSpellEffectInfo()->TriggerSpell);
}
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_item_jom_gabbar_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_item_jom_gabbar_AuraScript();
}
};
// 45040 - Battle Trance
class spell_item_battle_trance : public SpellScriptLoader
{
public:
spell_item_battle_trance() : SpellScriptLoader("spell_item_battle_trance") { }
class spell_item_battle_trance_AuraScript : public AuraScript
{
PrepareAuraScript(spell_item_battle_trance_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_BATTLE_TRANCE))
return false;
return true;
}
void OnRemove(AuraEffect const* effect, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveAurasDueToSpell(effect->GetSpellEffectInfo()->TriggerSpell);
}
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_item_battle_trance_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_item_battle_trance_AuraScript();
}
};
// 90900 - World-Queller Focus
class spell_item_world_queller_focus : public SpellScriptLoader
{
public:
spell_item_world_queller_focus() : SpellScriptLoader("spell_item_world_queller_focus") { }
class spell_item_world_queller_focus_AuraScript : public AuraScript
{
PrepareAuraScript(spell_item_world_queller_focus_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_WORLD_QUELLER_FOCUS))
return false;
return true;
}
void OnRemove(AuraEffect const* effect, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveAurasDueToSpell(effect->GetSpellEffectInfo()->TriggerSpell);
}
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_item_world_queller_focus_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_item_world_queller_focus_AuraScript();
}
};
// 118089 - Azure Water Strider
// 127271 - Crimson Water Strider
// 127272 - Orange Water Strider
// 127274 - Jade Water Strider
// 127278 - Golden Water Strider
class spell_item_water_strider : public SpellScriptLoader
{
public:
spell_item_water_strider() : SpellScriptLoader("spell_item_water_strider") { }
class spell_item_water_strider_AuraScript : public AuraScript
{
PrepareAuraScript(spell_item_water_strider_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_AZURE_WATER_STRIDER))
return false;
if (!sSpellMgr->GetSpellInfo(SPELL_CRIMSON_WATER_STRIDER))
return false;
if (!sSpellMgr->GetSpellInfo(SPELL_ORANGE_WATER_STRIDER))
return false;
if (!sSpellMgr->GetSpellInfo(SPELL_JADE_WATER_STRIDER))
return false;
if (!sSpellMgr->GetSpellInfo(SPELL_GOLDEN_WATER_STRIDER))
return false;
return true;
}
void OnRemove(AuraEffect const* /*effect*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveAurasDueToSpell(GetSpellInfo()->GetEffect(EFFECT_1)->TriggerSpell);
}
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_item_water_strider_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_MOUNTED, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_item_water_strider_AuraScript();
}
};
// 144671 - Brutal Kinship
// 145738 - Brutal Kinship
class spell_item_brutal_kinship : public SpellScriptLoader
{
public:
spell_item_brutal_kinship() : SpellScriptLoader("spell_item_brutal_kinship") { }
class spell_item_brutal_kinship_AuraScript : public AuraScript
{
PrepareAuraScript(spell_item_brutal_kinship_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_BRUTAL_KINSHIP_1))
return false;
if (!sSpellMgr->GetSpellInfo(SPELL_BRUTAL_KINSHIP_2))
return false;
return true;
}
void OnRemove(AuraEffect const* effect, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveAurasDueToSpell(effect->GetSpellEffectInfo()->TriggerSpell);
}
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_item_brutal_kinship_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_item_brutal_kinship_AuraScript();
}
};
void AddSC_item_spell_scripts()
{
// 23074 Arcanite Dragonling
@@ -2874,4 +3108,9 @@ void AddSC_item_spell_scripts()
new spell_item_toy_train_set_pulse();
new spell_item_artifical_stamina();
new spell_item_artifical_damage();
new spell_item_talisman_of_ascendance();
new spell_item_battle_trance();
new spell_item_world_queller_focus();
new spell_item_water_strider();
new spell_item_brutal_kinship();
}