Scripts/Scholomance: Added missing dungeon encounter ids

This commit is contained in:
Shauren
2023-09-18 00:09:04 +02:00
parent 7a9fba436c
commit 39b06b2e46
5 changed files with 45 additions and 40 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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
};