diff --git a/sql/updates/world/custom/custom_2019_05_08_00_world.sql b/sql/updates/world/custom/custom_2019_05_08_00_world.sql new file mode 100644 index 00000000000..6cf090db7a5 --- /dev/null +++ b/sql/updates/world/custom/custom_2019_05_08_00_world.sql @@ -0,0 +1,6 @@ +-- Spells +DELETE FROM `spell_script_names` WHERE `ScriptName` IN +('spell_magmaw_lava_parasite_summon'); + +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(77969, 'spell_magmaw_lava_parasite_summon'); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_magmaw.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_magmaw.cpp index f4013be442f..43d84612186 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_magmaw.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_magmaw.cpp @@ -18,6 +18,7 @@ #include "ObjectMgr.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "Spell.h" #include "SpellScript.h" #include "SpellAuraEffects.h" #include "Player.h" @@ -1181,6 +1182,21 @@ class spell_magmaw_shadow_breath_targeting : public SpellScript } }; +class spell_magmaw_lava_parasite_summon : public SpellScript +{ + PrepareSpellScript(spell_magmaw_lava_parasite_summon); + + void SetDest(SpellDestination& dest) + { + dest.RelocateOffset({ 0.0f, 0.0f, frand(13.0f, 15.0f), 0.0f }); + } + + void Register() + { + OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_magmaw_lava_parasite_summon::SetDest, EFFECT_0, TARGET_DEST_DEST_RANDOM); + } +}; + class achievement_parasite_evening : public AchievementCriteriaScript { public: @@ -1213,6 +1229,7 @@ void AddSC_boss_magmaw() RegisterSpellScript(spell_magmaw_eject_passenger_1); RegisterSpellScript(spell_magmaw_eject_passenger_3); RegisterAuraScript(spell_magmaw_lava_parasite); + RegisterSpellScript(spell_magmaw_lava_parasite_summon); RegisterSpellScript(spell_magmaw_blazing_inferno_targeting); RegisterSpellScript(spell_magmaw_shadow_breath_targeting); new achievement_parasite_evening();