aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-09-18 00:09:04 +0200
committerShauren <shauren.trinity@gmail.com>2023-09-18 00:09:04 +0200
commit39b06b2e46491bd96a7f61d9eca735a6847f87a0 (patch)
tree92466102e6485fb433ff5c832b70aefd88206393
parent7a9fba436cee1541ea912f12ae4690bdbe05833a (diff)
Scripts/Scholomance: Added missing dungeon encounter ids
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp21
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp15
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp24
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/scholomance.h13
5 files changed, 45 insertions, 40 deletions
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
index d7ca8207024..8bf0b8a9311 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
@@ -39,15 +39,9 @@ class boss_jandice_barov : public CreatureScript
public:
boss_jandice_barov() : CreatureScript("boss_jandice_barov") { }
- struct boss_jandicebarovAI : public ScriptedAI
+ struct boss_jandicebarovAI : public BossAI
{
- boss_jandicebarovAI(Creature* creature) : ScriptedAI(creature), Summons(me) { }
-
- void Reset() override
- {
- events.Reset();
- Summons.DespawnAll();
- }
+ boss_jandicebarovAI(Creature* creature) : BossAI(creature, DATA_JANDICE_BAROV) { }
void JustSummoned(Creature* summoned) override
{
@@ -55,18 +49,19 @@ public:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
summoned->AI()->AttackStart(target);
- Summons.Summon(summoned);
+ summons.Summon(summoned);
}
- void JustEngagedWith(Unit* /*who*/) override
+ void JustEngagedWith(Unit* who) override
{
+ _JustEngagedWith(who);
events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, 15s);
events.ScheduleEvent(EVENT_ILLUSION, 30s);
}
void JustDied(Unit* /*killer*/) override
{
- Summons.DespawnAll();
+ _JustDied();
DoCastSelf(SPELL_DROP_JOURNAL, true);
}
@@ -110,10 +105,6 @@ public:
DoMeleeAttackIfReady();
}
-
- private:
- EventMap events;
- SummonList Summons;
};
CreatureAI* GetAI(Creature* creature) const override
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp
index 6aa017d5174..8da1b37206a 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp
@@ -44,18 +44,19 @@ class boss_boss_ras_frostwhisper : public CreatureScript
public:
boss_boss_ras_frostwhisper() : CreatureScript("boss_boss_ras_frostwhisper") { }
- struct boss_rasfrostAI : public ScriptedAI
+ struct boss_rasfrostAI : public BossAI
{
- boss_rasfrostAI(Creature* creature) : ScriptedAI(creature) { }
+ boss_rasfrostAI(Creature* creature) : BossAI(creature, DATA_RAS_FROSTWHISPER) { }
void Reset() override
{
- events.Reset();
+ _Reset();
DoCast(me, SPELL_ICE_ARMOR);
}
- void JustEngagedWith(Unit* /*who*/) override
+ void JustEngagedWith(Unit* who) override
{
+ _JustEngagedWith(who);
events.ScheduleEvent(EVENT_ICE_ARMOR, 2s);
events.ScheduleEvent(EVENT_FROSTBOLT, 8s);
events.ScheduleEvent(EVENT_CHILL_NOVA, 12s);
@@ -112,9 +113,6 @@ public:
DoMeleeAttackIfReady();
}
-
- private:
- EventMap events;
};
CreatureAI* GetAI(Creature* creature) const override
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp
index 6558325f19d..e01f0b9c9eb 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp
@@ -44,17 +44,13 @@ class boss_vectus : public CreatureScript
public:
boss_vectus() : CreatureScript("boss_vectus") { }
- struct boss_vectusAI : public ScriptedAI
+ struct boss_vectusAI : public BossAI
{
- boss_vectusAI(Creature* creature) : ScriptedAI(creature) { }
+ boss_vectusAI(Creature* creature) : BossAI(creature, DATA_VECTUS) { }
- void Reset() override
- {
- events.Reset();
- }
-
- void JustEngagedWith(Unit* /*who*/) override
+ void JustEngagedWith(Unit* who) override
{
+ _JustEngagedWith(who);
events.ScheduleEvent(EVENT_FIRE_SHIELD, 2s);
events.ScheduleEvent(EVENT_BLAST_WAVE, 14s);
}
@@ -106,9 +102,6 @@ public:
DoMeleeAttackIfReady();
}
-
- private:
- EventMap events;
};
CreatureAI* GetAI(Creature* creature) const override
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp
index 6f0698bfb1b..7b4c300f1df 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp
@@ -19,9 +19,10 @@
#include "GameObject.h"
#include "InstanceScript.h"
#include "Map.h"
+#include "Unit.h"
#include "scholomance.h"
-DungeonEncounterData const encounters[] =
+static constexpr DungeonEncounterData Encounters[] =
{
{ DATA_DOCTORTHEOLENKRASTINOV, {{ 458 }} },
{ DATA_INSTRUCTORMALICIA, {{ 457 }} },
@@ -30,7 +31,12 @@ DungeonEncounterData const encounters[] =
{ DATA_LOREKEEPERPOLKELT, {{ 459 }} },
{ DATA_THERAVENIAN, {{ 460 }} },
{ DATA_DARKMASTERGANDLING, {{ 463 }} },
- { DATA_KIRTONOS, {{ 451 }} }
+ { DATA_KIRTONOS, {{ 451 }} },
+ { DATA_JANDICE_BAROV, {{ 452 }} },
+ { DATA_RATTLEGORE, {{ 453 }} },
+ { DATA_MARDUK_BLACKPOOL, {{ 454 }} },
+ { DATA_VECTUS, {{ 455 }} },
+ { DATA_RAS_FROSTWHISPER, {{ 456 }} },
};
Position const GandlingLoc = { 180.7712f, -5.428603f, 75.57024f, 1.291544f };
@@ -50,8 +56,18 @@ class instance_scholomance : public InstanceMapScript
instance_scholomance_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
{
SetHeaders(DataHeader);
- SetBossNumber(EncounterCount);
- LoadDungeonEncounterData(encounters);
+ SetBossNumber(MAX_ENCOUNTER);
+ LoadDungeonEncounterData(Encounters);
+ }
+
+ void OnUnitDeath(Unit* unit) override
+ {
+ switch (unit->GetEntry())
+ {
+ case NPC_RATTLEGORE: SetBossState(DATA_RATTLEGORE, DONE); break;
+ case NPC_MARDUK_BLACKPOOL: SetBossState(DATA_MARDUK_BLACKPOOL, DONE); break;
+ default: break;
+ }
}
void OnGameObjectCreate(GameObject* go) override
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h b/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h
index ca67aba5eb9..04220b2bb29 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h
+++ b/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h
@@ -23,8 +23,6 @@
#define ScholomanceScriptName "instance_scholomance"
#define DataHeader "SC_old"
-uint32 const EncounterCount = 8;
-
enum SCDataTypes
{
DATA_DOCTORTHEOLENKRASTINOV = 0,
@@ -34,12 +32,21 @@ enum SCDataTypes
DATA_LOREKEEPERPOLKELT = 4,
DATA_THERAVENIAN = 5,
DATA_DARKMASTERGANDLING = 6,
- DATA_KIRTONOS = 7
+ DATA_KIRTONOS = 7,
+ DATA_JANDICE_BAROV = 8,
+ DATA_RATTLEGORE = 9,
+ DATA_MARDUK_BLACKPOOL = 10,
+ DATA_VECTUS = 11,
+ DATA_RAS_FROSTWHISPER = 12,
+
+ MAX_ENCOUNTER
};
enum SCCreatureIds
{
NPC_DARKMASTER_GANDLING = 1853,
+ NPC_MARDUK_BLACKPOOL = 10433,
+ NPC_RATTLEGORE = 11622,
NPC_BONE_MINION = 16119
};