aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp30
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp27
3 files changed, 82 insertions, 3 deletions
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
index ce27b13e9e3..7ee741d72db 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
@@ -37,6 +37,7 @@ EndContentData */
#include "Player.h"
#include "ScriptedEscortAI.h"
#include "ScriptedGossip.h"
+#include "SpellScript.h"
#include "TemporarySummon.h"
enum Spells
@@ -619,8 +620,35 @@ public:
};
};
+enum KarazhanCharge
+{
+ SPELL_FEAR = 29321
+};
+
+// 29320 - Charge
+class spell_karazhan_charge : public SpellScript
+{
+ PrepareSpellScript(spell_karazhan_charge);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_FEAR });
+ }
+
+ void HandleAfterHit()
+ {
+ GetCaster()->CastSpell(GetCaster(), SPELL_FEAR);
+ }
+
+ void Register() override
+ {
+ AfterHit += SpellHitFn(spell_karazhan_charge::HandleAfterHit);
+ }
+};
+
void AddSC_karazhan()
{
new npc_barnes();
new npc_image_of_medivh();
+ RegisterSpellScript(spell_karazhan_charge);
}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
index ef93b2d9dad..17842585a0f 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "ObjectAccessor.h"
#include "ScriptedCreature.h"
#include "SpellInfo.h"
+#include "SpellScript.h"
#include "sunwell_plateau.h"
#include "TemporarySummon.h"
@@ -52,8 +53,6 @@ enum Spells
SPELL_CORROSION = 45866,
SPELL_GAS_NOVA = 45855,
SPELL_ENCAPSULATE_CHANNEL = 45661,
- // SPELL_ENCAPSULATE_EFFECT = 45665,
- // SPELL_ENCAPSULATE_AOE = 45662,
//Flight phase
SPELL_VAPOR_SELECT = 45391, // fel to player, force cast 45392, 50000y selete target
@@ -82,7 +81,10 @@ enum Spells
//Other
SPELL_BERSERK = 45078,
SPELL_CLOUD_VISUAL = 45212,
- SPELL_CLOUD_SUMMON = 45884
+ SPELL_CLOUD_SUMMON = 45884,
+
+ // Scripts
+ SPELL_ENCAPSULATE_EFFECT = 45665
};
enum PhaseFelmyst
@@ -544,9 +546,31 @@ struct npc_felmyst_trail : public ScriptedAI
void UpdateAI(uint32 /*diff*/) override { }
};
+// 45661 - Encapsulate
+class spell_felmyst_encapsulate : public SpellScript
+{
+ PrepareSpellScript(spell_felmyst_encapsulate);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_ENCAPSULATE_EFFECT });
+ }
+
+ void HandleAfterHit()
+ {
+ GetHitUnit()->CastSpell(GetHitUnit(), SPELL_ENCAPSULATE_EFFECT, true);
+ }
+
+ void Register() override
+ {
+ AfterHit += SpellHitFn(spell_felmyst_encapsulate::HandleAfterHit);
+ }
+};
+
void AddSC_boss_felmyst()
{
RegisterSunwellPlateauCreatureAI(boss_felmyst);
RegisterSunwellPlateauCreatureAI(npc_felmyst_vapor);
RegisterSunwellPlateauCreatureAI(npc_felmyst_trail);
+ RegisterSpellScript(spell_felmyst_encapsulate);
}
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp
index 940e7981c1d..87e6e4c46b1 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp
@@ -102,8 +102,35 @@ class spell_zulgurub_poisonous_blood : public SpellScript
}
};
+enum AxeFlurry
+{
+ SPELL_AXE_FLURRY = 24020
+};
+
+// 24019 - Axe Flurry
+class spell_zulgurub_axe_flurry : public SpellScript
+{
+ PrepareSpellScript(spell_zulgurub_axe_flurry);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_AXE_FLURRY });
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->CastSpell(GetHitUnit(), SPELL_AXE_FLURRY, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_zulgurub_axe_flurry::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+};
+
void AddSC_zulgurub()
{
new go_brazier_of_madness();
RegisterSpellScript(spell_zulgurub_poisonous_blood);
+ RegisterSpellScript(spell_zulgurub_axe_flurry);
}