mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-05 08:28:57 +01:00
Core/Spells: Blaze of Life triggered by Eye of Blazing Power will now only target the most injured raid or party member instead of all
This commit is contained in:
4
sql/updates/world/4.3.4/2022_06_02_00_world.sql
Normal file
4
sql/updates/world/4.3.4/2022_06_02_00_world.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_item_blaze_of_light';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(96966, 'spell_item_blaze_of_light'),
|
||||
(97136, 'spell_item_blaze_of_light');
|
||||
@@ -5085,6 +5085,24 @@ class spell_item_herbouflage : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 96966, 97136 - Blaze of Life
|
||||
class spell_item_blaze_of_light : public SpellScript
|
||||
{
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
if (targets.size() < 2)
|
||||
return;
|
||||
|
||||
targets.sort(Trinity::HealthPctOrderPred());
|
||||
targets.resize(1);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect.Register(&spell_item_blaze_of_light::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ALLY);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_item_spell_scripts()
|
||||
{
|
||||
// 23074 Arcanite Dragonling
|
||||
@@ -5220,4 +5238,5 @@ void AddSC_item_spell_scripts()
|
||||
RegisterSpellScript(spell_item_world_queller_focus);
|
||||
RegisterSpellScript(spell_item_jom_gabbar);
|
||||
RegisterSpellScript(spell_item_satisfied);
|
||||
RegisterSpellScript(spell_item_blaze_of_light);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user