fix(Scripts/Spells): add script to GM spell CooldownAll (#22383)
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id` = 29313 AND `ScriptName` = 'spell_gen_cooldown_all';
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (29313 , 'spell_gen_cooldown_all');
|
||||||
@@ -5431,6 +5431,22 @@ private:
|
|||||||
uint32 _spellId;
|
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()
|
void AddSC_generic_spell_scripts()
|
||||||
{
|
{
|
||||||
RegisterSpellScript(spell_silithyst);
|
RegisterSpellScript(spell_silithyst);
|
||||||
@@ -5593,4 +5609,5 @@ void AddSC_generic_spell_scripts()
|
|||||||
RegisterSpellScript(spell_gen_proc_on_victim);
|
RegisterSpellScript(spell_gen_proc_on_victim);
|
||||||
RegisterSpellScriptWithArgs(spell_gen_translocate, "spell_gen_translocate_down", SPELL_TRANSLOCATION_DOWN);
|
RegisterSpellScriptWithArgs(spell_gen_translocate, "spell_gen_translocate_down", SPELL_TRANSLOCATION_DOWN);
|
||||||
RegisterSpellScriptWithArgs(spell_gen_translocate, "spell_gen_translocate_up", SPELL_TRANSLOCATION_UP);
|
RegisterSpellScriptWithArgs(spell_gen_translocate, "spell_gen_translocate_up", SPELL_TRANSLOCATION_UP);
|
||||||
|
RegisterSpellScript(spell_gen_cooldown_all);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user