diff --git a/sql/updates/world/custom/custom_2018_10_12_00_world.sql b/sql/updates/world/custom/custom_2018_10_12_00_world.sql index 9f92f3959d..2281b3de08 100644 --- a/sql/updates/world/custom/custom_2018_10_12_00_world.sql +++ b/sql/updates/world/custom/custom_2018_10_12_00_world.sql @@ -79,7 +79,8 @@ DELETE FROM `spell_script_names` WHERE `ScriptName` IN 'spell_conclave_of_wind_wind_blast_triggered', 'spell_conclave_of_wind_hurricane', 'spell_conclave_of_wind_hurricane_ride_vehicle', -'spell_conclave_of_wind_toxic_spores'); +'spell_conclave_of_wind_toxic_spores', +'spell_conclave_of_wind_sleet_storm'); INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (96508, 'spell_conclave_of_wind_winds_pre_effect_warning'), @@ -101,7 +102,11 @@ INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (85480, 'spell_conclave_of_wind_wind_blast_triggered'), (86498, 'spell_conclave_of_wind_hurricane'), (86481, 'spell_conclave_of_wind_hurricane_ride_vehicle'), -(86290, 'spell_conclave_of_wind_toxic_spores'); +(86290, 'spell_conclave_of_wind_toxic_spores'), +(86367, 'spell_conclave_of_wind_sleet_storm'), +(93135, 'spell_conclave_of_wind_sleet_storm'), +(93136, 'spell_conclave_of_wind_sleet_storm'), +(93137, 'spell_conclave_of_wind_sleet_storm'); DELETE FROM `conditions` WHERE `SourceEntry` IN (89844, 89843, 89898, 86481, 90262, 86290) AND `SourceTypeOrReferenceId`= 13; INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ScriptName`, `Comment`) VALUES diff --git a/src/server/scripts/Kalimdor/ThroneOfTheFourWinds/boss_conclave_of_wind.cpp b/src/server/scripts/Kalimdor/ThroneOfTheFourWinds/boss_conclave_of_wind.cpp index d97ef29eb1..750467690c 100644 --- a/src/server/scripts/Kalimdor/ThroneOfTheFourWinds/boss_conclave_of_wind.cpp +++ b/src/server/scripts/Kalimdor/ThroneOfTheFourWinds/boss_conclave_of_wind.cpp @@ -1222,6 +1222,39 @@ class spell_conclave_of_wind_toxic_spores : public SpellScript } }; +class spell_conclave_of_wind_sleet_storm : public SpellScript +{ + PrepareSpellScript(spell_conclave_of_wind_sleet_storm); + + bool Load() override + { + _targetCount = 0; + return true; + } + + void CountTargets(std::list& targets) + { + _targetCount = targets.size(); + } + + void SplitDamage() + { + if (!_targetCount) + return; + + SetHitDamage(GetHitDamage() / _targetCount); + } + + void Register() override + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_conclave_of_wind_sleet_storm::CountTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY); + OnHit += SpellHitFn(spell_conclave_of_wind_sleet_storm::SplitDamage); + } + +private: + uint32 _targetCount; +}; + void AddSC_boss_conclave_of_wind() { RegisterThroneOfTheFourWindsCreatureAI(boss_anshal); @@ -1237,4 +1270,5 @@ void AddSC_boss_conclave_of_wind() RegisterSpellScript(spell_conclave_of_wind_hurricane); RegisterSpellScript(spell_conclave_of_wind_hurricane_ride_vehicle); RegisterSpellScript(spell_conclave_of_wind_toxic_spores); + RegisterSpellScript(spell_conclave_of_wind_sleet_storm); }