aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Outland/BlackTemple/black_temple.cpp40
-rw-r--r--src/server/scripts/Outland/BlackTemple/black_temple.h17
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp16
-rw-r--r--src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp29
5 files changed, 89 insertions, 15 deletions
diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.cpp b/src/server/scripts/Outland/BlackTemple/black_temple.cpp
index 69f99a69e95..96c3f517989 100644
--- a/src/server/scripts/Outland/BlackTemple/black_temple.cpp
+++ b/src/server/scripts/Outland/BlackTemple/black_temple.cpp
@@ -31,7 +31,10 @@ enum Spells
// Angered Soul Fragment
SPELL_GREATER_INVISIBILITY = 41253,
- SPELL_ANGER = 41986
+ SPELL_ANGER = 41986,
+
+ // Illidari Nightlord
+ SPELL_SHADOW_INFERNO_DAMAGE = 39646
};
enum Creatures
@@ -284,9 +287,44 @@ class spell_soul_fragment_anger : public SpellScriptLoader
}
};
+// 39645 - Shadow Inferno
+class spell_illidari_nightlord_shadow_inferno : public SpellScriptLoader
+{
+ public:
+ spell_illidari_nightlord_shadow_inferno() : SpellScriptLoader("spell_illidari_nightlord_shadow_inferno") { }
+
+ class spell_illidari_nightlord_shadow_inferno_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_illidari_nightlord_shadow_inferno_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_SHADOW_INFERNO_DAMAGE });
+ }
+
+ void OnPeriodic(AuraEffect const* aurEffect)
+ {
+ PreventDefaultAction();
+ int32 bp = aurEffect->GetTickNumber() * aurEffect->GetAmount();
+ GetUnitOwner()->CastCustomSpell(SPELL_SHADOW_INFERNO_DAMAGE, SPELLVALUE_BASE_POINT0, bp, GetUnitOwner(), true);
+ }
+
+ void Register() override
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_illidari_nightlord_shadow_inferno_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_illidari_nightlord_shadow_inferno_AuraScript();
+ }
+};
+
void AddSC_black_temple()
{
new npc_wrathbone_flayer();
new npc_angered_soul_fragment();
new spell_soul_fragment_anger();
+ new spell_illidari_nightlord_shadow_inferno();
}
diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.h b/src/server/scripts/Outland/BlackTemple/black_temple.h
index 05bd99e61df..91351c6203a 100644
--- a/src/server/scripts/Outland/BlackTemple/black_temple.h
+++ b/src/server/scripts/Outland/BlackTemple/black_temple.h
@@ -27,7 +27,7 @@ uint32 const EncounterCount = 9;
enum BTDataTypes
{
- // Encounter States/Boss GUIDs
+ // Encounter States
DATA_HIGH_WARLORD_NAJENTUS = 0,
DATA_SUPREMUS = 1,
DATA_SHADE_OF_AKAMA = 2,
@@ -88,7 +88,14 @@ enum BTCreatureIds
NPC_SUPREMUS_VOLCANO = 23085,
NPC_BLACK_TEMPLE_TRIGGER = 22984,
NPC_RELIQUARY_WORLD_TRIGGER = 23472,
- NPC_ENSLAVED_SOUL = 23469
+ NPC_ENSLAVED_SOUL = 23469,
+ NPC_ASHTONGUE_STALKER = 23374,
+ NPC_ASHTONGUE_BATTLELORD = 22844,
+ NPC_ASHTONGUE_MYSTIC = 22845,
+ NPC_ASHTONGUE_PRIMALIST = 22847,
+ NPC_ASHTONGUE_STORMCALLER = 22846,
+ NPC_ASHTONGUE_FERAL_SPIRIT = 22849,
+ NPC_STORM_FURY = 22848
};
enum BTGameObjectIds
@@ -109,6 +116,12 @@ enum BTGameObjectIds
GO_ILLIDAN_DOOR_L = 186262
};
+enum BlackTempleFactions
+{
+ ASHTONGUE_FACTION_FRIEND = 1820,
+ AKAMA_FACTION_COMBAT = 1868
+};
+
template<typename AI>
inline AI* GetBlackTempleAI(Creature* creature)
{
diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
index 83db662e738..a909af1cbd4 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
@@ -127,7 +127,7 @@ Position const DespawnPoint = { 497.4939f, 183.2081f, 94.53341f };
class EnslavedSoulEvent : public BasicEvent
{
- public: explicit EnslavedSoulEvent(Creature* owner) : _owner(owner) { }
+ public: EnslavedSoulEvent(Creature* owner) : _owner(owner) { }
bool Execute(uint64 /*time*/, uint32 /*diff*/) override
{
diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
index b64c5c8a7a0..3d2a1dbdedf 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
@@ -87,12 +87,6 @@ enum Creatures
NPC_CREATURE_SPAWNER_AKAMA = 23210
};
-enum Factions
-{
- FACTION_FRIENDLY = 1820,
- FACTION_COMBAT = 1868
-};
-
enum Actions
{
ACTION_START_SPAWNING = 0,
@@ -390,7 +384,7 @@ public:
void Reset() override
{
Initialize();
- me->setFaction(FACTION_FRIENDLY);
+ me->setFaction(ASHTONGUE_FACTION_FRIEND);
DoCastSelf(SPELL_STEALTH);
if (_instance->GetBossState(DATA_SHADE_OF_AKAMA) != DONE)
@@ -436,7 +430,7 @@ public:
{
_isInCombat = false;
me->CombatStop(true);
- me->setFaction(FACTION_FRIENDLY);
+ me->setFaction(ASHTONGUE_FACTION_FRIEND);
me->SetWalk(true);
_events.Reset();
me->GetMotionMaster()->MovePoint(AKAMA_INTRO_WAYPOINT, AkamaWP[1]);
@@ -490,7 +484,7 @@ public:
case EVENT_SHADE_CHANNEL:
me->SetFacingTo(FACE_THE_PLATFORM);
DoCastSelf(SPELL_AKAMA_SOUL_CHANNEL);
- me->setFaction(FACTION_COMBAT);
+ me->setFaction(AKAMA_FACTION_COMBAT);
_events.ScheduleEvent(EVENT_FIXATE, Seconds(5));
break;
case EVENT_FIXATE:
@@ -538,7 +532,7 @@ public:
}
}
- if (me->getFaction() == FACTION_COMBAT)
+ if (me->getFaction() == AKAMA_FACTION_COMBAT)
{
if (!UpdateVictim())
return;
@@ -1176,7 +1170,7 @@ public:
Talk(SAY_BROKEN_SPECIAL);
break;
case ACTION_BROKEN_HAIL:
- me->setFaction(FACTION_FRIENDLY);
+ me->setFaction(ASHTONGUE_FACTION_FRIEND);
Talk(SAY_BROKEN_HAIL);
break;
case ACTION_BROKEN_EMOTE:
diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
index 4d4bc26cecd..64e294533e3 100644
--- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
+++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
@@ -110,6 +110,28 @@ class instance_black_temple : public InstanceMapScript
HandleGameObject(ObjectGuid::Empty, true, go);
}
+ void OnCreatureCreate(Creature* creature) override
+ {
+ InstanceScript::OnCreatureCreate(creature);
+
+ switch (creature->GetEntry())
+ {
+ case NPC_ASHTONGUE_STALKER:
+ case NPC_ASHTONGUE_BATTLELORD:
+ case NPC_ASHTONGUE_MYSTIC:
+ case NPC_ASHTONGUE_PRIMALIST:
+ case NPC_ASHTONGUE_STORMCALLER:
+ case NPC_ASHTONGUE_FERAL_SPIRIT:
+ case NPC_STORM_FURY:
+ AshtongueGUIDs.emplace_back(creature->GetGUID());
+ if (GetBossState(DATA_SHADE_OF_AKAMA) == DONE)
+ creature->setFaction(ASHTONGUE_FACTION_FRIEND);
+ break;
+ default:
+ break;
+ }
+ }
+
bool SetBossState(uint32 type, EncounterState state) override
{
if (!InstanceScript::SetBossState(type, state))
@@ -123,6 +145,11 @@ class instance_black_temple : public InstanceMapScript
trigger->AI()->Talk(EMOTE_HIGH_WARLORD_NAJENTUS_DIED);
break;
case DATA_SHADE_OF_AKAMA:
+ if (state == DONE)
+ for (ObjectGuid ashtongueGuid : AshtongueGUIDs)
+ if (Creature* ashtongue = instance->GetCreature(ashtongueGuid))
+ ashtongue->setFaction(ASHTONGUE_FACTION_FRIEND);
+ // no break
case DATA_TERON_GOREFIEND:
case DATA_GURTOGG_BLOODBOIL:
case DATA_RELIQUARY_OF_SOULS:
@@ -149,6 +176,8 @@ class instance_black_temple : public InstanceMapScript
return false;
return true;
}
+ protected:
+ GuidVector AshtongueGUIDs;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const override