mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Scripts/BWD: make Magmaw's Lava Parasites fall from above on summon
This commit is contained in:
6
sql/updates/world/custom/custom_2019_05_08_00_world.sql
Normal file
6
sql/updates/world/custom/custom_2019_05_08_00_world.sql
Normal file
@@ -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');
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user