aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Outland
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/Outland')
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp30
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 59a081f8fea..a66efc8c552 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 "ScriptedEscortAI.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,
@@ -643,10 +644,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;
@@ -709,10 +707,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);
}