feat(Spell/Scripts): Move Spell gen remove impairing auras to spell scripts (#11104)
This commit is contained in:
parent
cb5c045a24
commit
c93a84e821
3 changed files with 24 additions and 7 deletions
|
|
@ -0,0 +1,6 @@
|
|||
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1647924387634998766');
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_gen_remove_impairing_auras');
|
||||
INSERT INTO `spell_script_names` VALUES
|
||||
(20589, 'spell_gen_remove_impairing_auras'),
|
||||
(30918, 'spell_gen_remove_impairing_auras');
|
||||
|
|
@ -3808,13 +3808,6 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
|||
m_caster->CastSpell(unitTarget, 22682, true);
|
||||
return;
|
||||
}
|
||||
case 20589: // Escape artist
|
||||
case 30918: // Improved Sprint
|
||||
{
|
||||
// Removes snares and roots.
|
||||
unitTarget->RemoveMovementImpairingAuras(true);
|
||||
break;
|
||||
}
|
||||
// Plant Warmaul Ogre Banner
|
||||
case 32307:
|
||||
if (Player* caster = m_caster->ToPlayer())
|
||||
|
|
|
|||
|
|
@ -4389,6 +4389,23 @@ class spell_gen_arcane_charge : public SpellScript
|
|||
}
|
||||
};
|
||||
|
||||
// 20589 - Escape artist
|
||||
// 30918 - Improved Sprint
|
||||
class spell_gen_remove_impairing_auras : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_remove_impairing_auras);
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex /* effIndex */)
|
||||
{
|
||||
GetHitUnit()->RemoveMovementImpairingAuras(true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_gen_remove_impairing_auras::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_silithyst);
|
||||
|
|
@ -4522,4 +4539,5 @@ void AddSC_generic_spell_scripts()
|
|||
RegisterSpellScript(spell_contagion_of_rot);
|
||||
RegisterSpellScript(spell_gen_holiday_buff_food);
|
||||
RegisterSpellScript(spell_gen_arcane_charge);
|
||||
RegisterSpellScript(spell_gen_remove_impairing_auras);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue