From 4d3439b02414649f638285616fcae896e51664ce Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 9 Jan 2022 13:43:45 +0100 Subject: [PATCH] Scripts/Spells: Fixed shaman Healing Rain target limit --- .../world/master/2022_01_09_00_world.sql | 3 +++ src/server/scripts/Spells/spell_shaman.cpp | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 sql/updates/world/master/2022_01_09_00_world.sql diff --git a/sql/updates/world/master/2022_01_09_00_world.sql b/sql/updates/world/master/2022_01_09_00_world.sql new file mode 100644 index 00000000000..1b6dcf65c16 --- /dev/null +++ b/sql/updates/world/master/2022_01_09_00_world.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_sha_healing_rain_target_limit'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(73921,'spell_sha_healing_rain_target_limit'); diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 4f720e74af9..87193cc47f3 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -608,6 +608,22 @@ class spell_sha_healing_rain : public SpellScript } }; +// 73921 - Healing Rain +class spell_sha_healing_rain_target_limit : public SpellScript +{ + PrepareSpellScript(spell_sha_healing_rain_target_limit); + + void SelectTargets(std::list& targets) + { + Trinity::SelectRandomInjuredTargets(targets, 6, true); + } + + void Register() override + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sha_healing_rain_target_limit::SelectTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ALLY); + } +}; + // 52042 - Healing Stream Totem class spell_sha_healing_stream_totem_heal : public SpellScript { @@ -1389,6 +1405,7 @@ void AddSC_shaman_spell_scripts() RegisterSpellScript(spell_sha_flametongue_weapon); RegisterAuraScript(spell_sha_flametongue_weapon_aura); RegisterSpellAndAuraScriptPair(spell_sha_healing_rain, spell_sha_healing_rain_aura); + RegisterSpellScript(spell_sha_healing_rain_target_limit); RegisterSpellScript(spell_sha_healing_stream_totem_heal); RegisterSpellScript(spell_sha_heroism); RegisterAuraScript(spell_sha_item_lightning_shield);