diff options
author | offl <11556157+offl@users.noreply.github.com> | 2022-06-22 22:37:52 +0300 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-09-05 19:26:59 +0200 |
commit | 6fb332d935ebe84b5728d5496173c8b7109e08db (patch) | |
tree | 992101910d7e8ae2c072d7159372e86a30fb62e2 /src/server/scripts/Outland | |
parent | c8d56b8c6741b237ebf6c7f8f023c4b5ebd0d0ca (diff) |
Scripts/Spells: Get rid of several DB spell scripts (#28048)
(cherry picked from commit 3808e614d9760a2588fec0c1b0b4c30feda36dcc)
Diffstat (limited to 'src/server/scripts/Outland')
-rw-r--r-- | src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp index d70b9ecb6ed..f7d921875f9 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "MotionMaster.h" #include "ObjectAccessor.h" #include "ScriptedCreature.h" +#include "SpellScript.h" #include "serpent_shrine.h" #include "TemporarySummon.h" @@ -69,7 +70,7 @@ enum FathomlordKarathress //Caribdis Spells SPELL_WATER_BOLT_VOLLEY = 38335, SPELL_TIDAL_SURGE = 38358, - SPELL_TIDAL_SURGE_FREEZE = 38357, + SPELL_TIDAL_SURGE_EFFECT = 38353, SPELL_HEAL = 38330, SPELL_SUMMON_CYCLONE = 38337, SPELL_CYCLONE_CYCLONE = 29538, @@ -648,10 +649,7 @@ public: //TidalSurge_Timer if (TidalSurge_Timer <= diff) { - DoCastVictim(SPELL_TIDAL_SURGE); - // Hacky way to do it - won't trigger elseways - if (me->GetVictim()) - me->EnsureVictim()->CastSpell(me->GetVictim(), SPELL_TIDAL_SURGE_FREEZE, true); + DoCastSelf(SPELL_TIDAL_SURGE); TidalSurge_Timer = 15000 + rand32() % 5000; } else TidalSurge_Timer -= diff; @@ -714,10 +712,32 @@ public: }; }; +// 38358 - Tidal Surge +class spell_fathomlord_karathress_tidal_surge : public SpellScript +{ + PrepareSpellScript(spell_fathomlord_karathress_tidal_surge); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_TIDAL_SURGE_EFFECT }); + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + GetHitUnit()->CastSpell(GetHitUnit(), SPELL_TIDAL_SURGE_EFFECT, true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_fathomlord_karathress_tidal_surge::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + void AddSC_boss_fathomlord_karathress() { new boss_fathomlord_karathress(); new boss_fathomguard_sharkkis(); new boss_fathomguard_tidalvess(); new boss_fathomguard_caribdis(); + RegisterSpellScript(spell_fathomlord_karathress_tidal_surge); } |