fix(Scripts/Spells): add script to GM spell CooldownAll (#22383)
This commit is contained in:
parent
f4e049f227
commit
3b13fe6207
2 changed files with 20 additions and 0 deletions
|
|
@ -5431,6 +5431,22 @@ private:
|
|||
uint32 _spellId;
|
||||
};
|
||||
|
||||
class spell_gen_cooldown_all : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_cooldown_all);
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Player* player = GetHitPlayer())
|
||||
player->RemoveAllSpellCooldown();
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_gen_cooldown_all::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_silithyst);
|
||||
|
|
@ -5593,4 +5609,5 @@ void AddSC_generic_spell_scripts()
|
|||
RegisterSpellScript(spell_gen_proc_on_victim);
|
||||
RegisterSpellScriptWithArgs(spell_gen_translocate, "spell_gen_translocate_down", SPELL_TRANSLOCATION_DOWN);
|
||||
RegisterSpellScriptWithArgs(spell_gen_translocate, "spell_gen_translocate_up", SPELL_TRANSLOCATION_UP);
|
||||
RegisterSpellScript(spell_gen_cooldown_all);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue