mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-16 00:36:07 +00:00
feat(Core/Misc): implement ObjectGuid class (port from TC) (#4885)
This commit is contained in:
@@ -42,14 +42,14 @@ public:
|
||||
npc_water_elementalAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint32 waterBoltTimer;
|
||||
uint64 balindaGUID;
|
||||
ObjectGuid balindaGUID;
|
||||
uint32 resetTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
waterBoltTimer = 3 * IN_MILLISECONDS;
|
||||
resetTimer = 5 * IN_MILLISECONDS;
|
||||
balindaGUID = 0;
|
||||
balindaGUID.Clear();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
else
|
||||
instance->SetData(TYPE_LYCEUM, IN_PROGRESS);
|
||||
// If used brazier open linked doors (North or South)
|
||||
if (go->GetGUID() == instance->GetData64(DATA_SF_BRAZIER_N))
|
||||
if (go->GetGUID() == instance->GetGuidData(DATA_SF_BRAZIER_N))
|
||||
{
|
||||
if (braziersUsed == 0)
|
||||
{
|
||||
@@ -37,12 +37,12 @@ public:
|
||||
}
|
||||
else if(braziersUsed == 2)
|
||||
{
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GOLEM_DOOR_N), true);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GOLEM_DOOR_S), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GOLEM_DOOR_N), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GOLEM_DOOR_S), true);
|
||||
braziersUsed = 0;
|
||||
}
|
||||
}
|
||||
else if (go->GetGUID() == instance->GetData64(DATA_SF_BRAZIER_S))
|
||||
else if (go->GetGUID() == instance->GetGuidData(DATA_SF_BRAZIER_S))
|
||||
{
|
||||
if (braziersUsed == 0)
|
||||
{
|
||||
@@ -50,8 +50,8 @@ public:
|
||||
}
|
||||
else if (braziersUsed == 1)
|
||||
{
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GOLEM_DOOR_N), true);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GOLEM_DOOR_S), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GOLEM_DOOR_N), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GOLEM_DOOR_S), true);
|
||||
braziersUsed = 0;
|
||||
}
|
||||
}
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
|
||||
void HandleGameObject(uint32 id, bool open)
|
||||
{
|
||||
instance->HandleGameObject(instance->GetData64(id), open);
|
||||
instance->HandleGameObject(instance->GetGuidData(id), open);
|
||||
}
|
||||
|
||||
void SummonBoss()
|
||||
@@ -294,11 +294,11 @@ public:
|
||||
if (theldrenEvent)
|
||||
{
|
||||
if (GameObject* go = me->SummonGameObject(GO_ARENA_SPOILS, 596.48f, -187.91f, -54.14f, 4.9f, 0.0f, 0.0f, 0.0f, 0.0f, 300))
|
||||
go->SetOwnerGUID(0);
|
||||
go->SetOwnerGUID(ObjectGuid::Empty);
|
||||
|
||||
Map::PlayerList const& pl = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
|
||||
itr->GetSource()->KilledMonsterCredit(16166, 0);
|
||||
itr->GetSource()->KilledMonsterCredit(16166);
|
||||
}
|
||||
|
||||
HandleGameObject(DATA_ARENA2, false);
|
||||
@@ -526,7 +526,7 @@ public:
|
||||
|
||||
void DoGo(uint32 id, uint32 state)
|
||||
{
|
||||
if (GameObject* go = instance->instance->GetGameObject(instance->GetData64(id)))
|
||||
if (GameObject* go = instance->instance->GetGameObject(instance->GetGuidData(id)))
|
||||
go->SetGoState((GOState)state);
|
||||
}
|
||||
|
||||
@@ -574,7 +574,7 @@ public:
|
||||
DoGo(DATA_GO_BAR_KEG_TRAP, 0); //doesn't work very well, leaving code here for future
|
||||
//spell by trap has effect61, this indicate the bar go hostile
|
||||
|
||||
if (Unit* tmp = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_PHALANX)))
|
||||
if (Unit* tmp = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_PHALANX)))
|
||||
tmp->setFaction(14);
|
||||
|
||||
//for later, this event(s) has alot more to it.
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (Creature* Moira = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MOIRA)))
|
||||
if (Creature* Moira = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_MOIRA)))
|
||||
{
|
||||
Moira->AI()->EnterEvadeMode();
|
||||
Moira->setFaction(35);
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
if (InstanceScript* instance = killer->GetInstanceScript())
|
||||
instance->HandleGameObject(instance->GetData64(DATA_THRONE_DOOR), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_THRONE_DOOR), true);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
if (InstanceScript* instance = creature->GetInstanceScript())
|
||||
{
|
||||
//are 5 minutes expected? go template may have data to despawn when used at quest
|
||||
instance->DoRespawnGameObject(instance->GetData64(DATA_GO_CHALICE), MINUTE * 5);
|
||||
instance->DoRespawnGameObject(instance->GetGuidData(DATA_GO_CHALICE), MINUTE * 5);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
// Start encounter
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
if (instance)
|
||||
instance->SetData64(DATA_EVENSTARTER, player->GetGUID());
|
||||
instance->SetGuidData(DATA_EVENSTARTER, player->GetGUID());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@@ -175,7 +175,7 @@ public:
|
||||
if (me->IsAlive())
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
me->SetLootRecipient(nullptr);
|
||||
instance->SetData64(DATA_EVENSTARTER, 0);
|
||||
instance->SetGuidData(DATA_EVENSTARTER, ObjectGuid::Empty);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
|
||||
@@ -71,37 +71,37 @@ public:
|
||||
uint32 encounter[MAX_ENCOUNTER];
|
||||
std::string str_data;
|
||||
|
||||
uint64 EmperorGUID;
|
||||
uint64 PhalanxGUID;
|
||||
uint64 MagmusGUID;
|
||||
uint64 MoiraGUID;
|
||||
ObjectGuid EmperorGUID;
|
||||
ObjectGuid PhalanxGUID;
|
||||
ObjectGuid MagmusGUID;
|
||||
ObjectGuid MoiraGUID;
|
||||
|
||||
uint64 GoArena1GUID;
|
||||
uint64 GoArena2GUID;
|
||||
uint64 GoArena3GUID;
|
||||
uint64 GoArena4GUID;
|
||||
uint64 GoShadowLockGUID;
|
||||
uint64 GoShadowMechGUID;
|
||||
uint64 GoShadowGiantGUID;
|
||||
uint64 GoShadowDummyGUID;
|
||||
uint64 GoBarKegGUID;
|
||||
uint64 GoBarKegTrapGUID;
|
||||
uint64 GoBarDoorGUID;
|
||||
uint64 GoTombEnterGUID;
|
||||
uint64 GoTombExitGUID;
|
||||
uint64 GoLyceumGUID;
|
||||
uint64 GoSFSGUID;
|
||||
uint64 GoSFNGUID;
|
||||
uint64 GoGolemNGUID;
|
||||
uint64 GoGolemSGUID;
|
||||
uint64 GoThroneGUID;
|
||||
uint64 GoChestGUID;
|
||||
uint64 GoSpectralChaliceGUID;
|
||||
ObjectGuid GoArena1GUID;
|
||||
ObjectGuid GoArena2GUID;
|
||||
ObjectGuid GoArena3GUID;
|
||||
ObjectGuid GoArena4GUID;
|
||||
ObjectGuid GoShadowLockGUID;
|
||||
ObjectGuid GoShadowMechGUID;
|
||||
ObjectGuid GoShadowGiantGUID;
|
||||
ObjectGuid GoShadowDummyGUID;
|
||||
ObjectGuid GoBarKegGUID;
|
||||
ObjectGuid GoBarKegTrapGUID;
|
||||
ObjectGuid GoBarDoorGUID;
|
||||
ObjectGuid GoTombEnterGUID;
|
||||
ObjectGuid GoTombExitGUID;
|
||||
ObjectGuid GoLyceumGUID;
|
||||
ObjectGuid GoSFSGUID;
|
||||
ObjectGuid GoSFNGUID;
|
||||
ObjectGuid GoGolemNGUID;
|
||||
ObjectGuid GoGolemSGUID;
|
||||
ObjectGuid GoThroneGUID;
|
||||
ObjectGuid GoChestGUID;
|
||||
ObjectGuid GoSpectralChaliceGUID;
|
||||
|
||||
uint32 BarAleCount;
|
||||
uint32 GhostKillCount;
|
||||
uint64 TombBossGUIDs[7];
|
||||
uint64 TombEventStarterGUID;
|
||||
ObjectGuid TombBossGUIDs[7];
|
||||
ObjectGuid TombEventStarterGUID;
|
||||
uint32 TombTimer;
|
||||
uint32 TombEventCounter;
|
||||
uint32 OpenedCoofers;
|
||||
@@ -110,42 +110,11 @@ public:
|
||||
{
|
||||
memset(&encounter, 0, sizeof(encounter));
|
||||
|
||||
EmperorGUID = 0;
|
||||
PhalanxGUID = 0;
|
||||
MagmusGUID = 0;
|
||||
MoiraGUID = 0;
|
||||
|
||||
GoArena1GUID = 0;
|
||||
GoArena2GUID = 0;
|
||||
GoArena3GUID = 0;
|
||||
GoArena4GUID = 0;
|
||||
GoShadowLockGUID = 0;
|
||||
GoShadowMechGUID = 0;
|
||||
GoShadowGiantGUID = 0;
|
||||
GoShadowDummyGUID = 0;
|
||||
GoBarKegGUID = 0;
|
||||
GoBarKegTrapGUID = 0;
|
||||
GoBarDoorGUID = 0;
|
||||
GoTombEnterGUID = 0;
|
||||
GoTombExitGUID = 0;
|
||||
GoLyceumGUID = 0;
|
||||
GoSFSGUID = 0;
|
||||
GoSFNGUID = 0;
|
||||
GoGolemNGUID = 0;
|
||||
GoGolemSGUID = 0;
|
||||
GoThroneGUID = 0;
|
||||
GoChestGUID = 0;
|
||||
GoSpectralChaliceGUID = 0;
|
||||
|
||||
BarAleCount = 0;
|
||||
GhostKillCount = 0;
|
||||
TombEventStarterGUID = 0;
|
||||
TombTimer = TIMER_TOMBOFTHESEVEN;
|
||||
TombEventCounter = 0;
|
||||
OpenedCoofers = 0;
|
||||
|
||||
for (uint8 i = 0; i < 7; ++i)
|
||||
TombBossGUIDs[i] = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
@@ -185,7 +154,7 @@ public:
|
||||
case NPC_MAGMUS:
|
||||
MagmusGUID = creature->GetGUID();
|
||||
if (!creature->IsAlive())
|
||||
HandleGameObject(GetData64(DATA_THRONE_DOOR), true); // if Magmus is dead open door to last boss
|
||||
HandleGameObject(GetGuidData(DATA_THRONE_DOOR), true); // if Magmus is dead open door to last boss
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -233,9 +202,9 @@ public:
|
||||
case GO_TOMB_EXIT:
|
||||
GoTombExitGUID = go->GetGUID();
|
||||
if (GhostKillCount >= 7)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
else
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_LYCEUM:
|
||||
GoLyceumGUID = go->GetGUID();
|
||||
@@ -264,12 +233,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SetData64(uint32 type, uint64 data) override
|
||||
void SetGuidData(uint32 type, ObjectGuid data) override
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("scripts.ai", "TSCR: Instance Blackrock Depths: SetData64 update (Type: %u Data " UI64FMTD ")", type, data);
|
||||
#endif
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DATA_EVENSTARTER:
|
||||
@@ -365,7 +330,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data) const override
|
||||
ObjectGuid GetGuidData(uint32 data) const override
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
@@ -404,7 +369,8 @@ public:
|
||||
case DATA_GO_CHALICE:
|
||||
return GoSpectralChaliceGUID;
|
||||
}
|
||||
return 0;
|
||||
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
std::string GetSaveData() override
|
||||
@@ -474,7 +440,6 @@ public:
|
||||
}
|
||||
}
|
||||
GhostKillCount = 0;
|
||||
TombEventStarterGUID = 0;
|
||||
TombEventCounter = 0;
|
||||
TombTimer = TIMER_TOMBOFTHESEVEN;
|
||||
SetData(TYPE_TOMB_OF_SEVEN, NOT_STARTED);
|
||||
@@ -492,7 +457,7 @@ public:
|
||||
DoRespawnGameObject(GoChestGUID, DAY);
|
||||
HandleGameObject(GoTombExitGUID, true);//event done, open exit door
|
||||
HandleGameObject(GoTombEnterGUID, true);//event done, open entrance door
|
||||
TombEventStarterGUID = 0;
|
||||
TombEventStarterGUID.Clear();
|
||||
SetData(TYPE_TOMB_OF_SEVEN, DONE);
|
||||
}
|
||||
void Update(uint32 diff) override
|
||||
|
||||
@@ -72,8 +72,7 @@ public:
|
||||
me->GetCreaturesWithEntryInRange(ChromaticEliteGuards, 15.0f, ChromaticEliteGuardEntry);
|
||||
for (std::list<Creature*>::const_iterator itr = ChromaticEliteGuards.begin(); itr != ChromaticEliteGuards.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->GetGUID())
|
||||
(*itr)->ToCreature()->AI()->AttackStart(me->GetVictim());
|
||||
(*itr)->ToCreature()->AI()->AttackStart(me->GetVictim());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,16 +144,14 @@ public:
|
||||
me->GetCreaturesWithEntryInRange(GeneralDrakkisath, 15.0f, GeneralDrakkisathEntry);
|
||||
for (std::list<Creature*>::const_iterator itr = GeneralDrakkisath.begin(); itr != GeneralDrakkisath.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->GetGUID())
|
||||
(*itr)->ToCreature()->AI()->AttackStart(who);
|
||||
(*itr)->ToCreature()->AI()->AttackStart(who);
|
||||
}
|
||||
|
||||
std::list<Creature*> ChromaticEliteGuards;
|
||||
me->GetCreaturesWithEntryInRange(ChromaticEliteGuards, 15.0f, ChromaticEliteGuardEntry);
|
||||
for (std::list<Creature*>::const_iterator itr = ChromaticEliteGuards.begin(); itr != ChromaticEliteGuards.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->GetGUID())
|
||||
(*itr)->ToCreature()->AI()->AttackStart(who);
|
||||
(*itr)->ToCreature()->AI()->AttackStart(who);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -93,10 +93,10 @@ public:
|
||||
break;
|
||||
case 2:
|
||||
// Close these two doors on Blackhand Incarcerators aggro
|
||||
if (GameObject* door1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_IN)))
|
||||
if (GameObject* door1 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_IN)))
|
||||
if (door1->GetGoState() == GO_STATE_ACTIVE)
|
||||
door1->SetGoState(GO_STATE_READY);
|
||||
if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetData64(GO_DOORS)))
|
||||
if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_DOORS)))
|
||||
if (door2->GetGoState() == GO_STATE_ACTIVE)
|
||||
door2->SetGoState(GO_STATE_READY);
|
||||
break;
|
||||
@@ -155,33 +155,33 @@ public:
|
||||
void OpenDoors(bool Boss_Killed)
|
||||
{
|
||||
// These two doors reopen on reset or boss kill
|
||||
if (GameObject* door1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_IN)))
|
||||
if (GameObject* door1 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_IN)))
|
||||
door1->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetData64(GO_DOORS)))
|
||||
if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_DOORS)))
|
||||
door2->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
// This door opens on boss kill
|
||||
if (Boss_Killed)
|
||||
if (GameObject* door3 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_OUT)))
|
||||
if (GameObject* door3 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_OUT)))
|
||||
door3->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
|
||||
void UpdateRunes(GOState state)
|
||||
{
|
||||
// update all runes
|
||||
if (GameObject* rune1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_1)))
|
||||
if (GameObject* rune1 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_RUNE_1)))
|
||||
rune1->SetGoState(state);
|
||||
if (GameObject* rune2 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_2)))
|
||||
if (GameObject* rune2 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_RUNE_2)))
|
||||
rune2->SetGoState(state);
|
||||
if (GameObject* rune3 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_3)))
|
||||
if (GameObject* rune3 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_RUNE_3)))
|
||||
rune3->SetGoState(state);
|
||||
if (GameObject* rune4 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_4)))
|
||||
if (GameObject* rune4 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_RUNE_4)))
|
||||
rune4->SetGoState(state);
|
||||
if (GameObject* rune5 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_5)))
|
||||
if (GameObject* rune5 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_RUNE_5)))
|
||||
rune5->SetGoState(state);
|
||||
if (GameObject* rune6 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_6)))
|
||||
if (GameObject* rune6 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_RUNE_6)))
|
||||
rune6->SetGoState(state);
|
||||
if (GameObject* rune7 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_7)))
|
||||
if (GameObject* rune7 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_RUNE_7)))
|
||||
rune7->SetGoState(state);
|
||||
}
|
||||
|
||||
|
||||
@@ -171,15 +171,15 @@ public:
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_PREPARATION);
|
||||
gythEvent = false;
|
||||
victorGUID = 0;
|
||||
waveDoorGUID = 0;
|
||||
victorGUID.Clear();
|
||||
waveDoorGUID.Clear();
|
||||
|
||||
summons.DespawnAll();
|
||||
|
||||
if (Creature* victor = me->FindNearestCreature(NPC_LORD_VICTOR_NEFARIUS, 5.0f, true))
|
||||
victor->Respawn(true);
|
||||
|
||||
if (GameObject* exitDoor = me->GetMap()->GetGameObject(instance->GetData64(GO_GYTH_ENTRY_DOOR)))
|
||||
if (GameObject* exitDoor = me->GetMap()->GetGameObject(instance->GetGuidData(GO_GYTH_ENTRY_DOOR)))
|
||||
exitDoor->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
instance->SetBossState(DATA_WARCHIEF_REND_BLACKHAND, NOT_STARTED);
|
||||
@@ -225,7 +225,7 @@ public:
|
||||
if (Creature* victor = me->FindNearestCreature(NPC_LORD_VICTOR_NEFARIUS, 75.0f, true))
|
||||
victor->AI()->SetData(1, 2);
|
||||
|
||||
if (GameObject* exitDoor = me->GetMap()->GetGameObject(instance->GetData64(GO_GYTH_ENTRY_DOOR)))
|
||||
if (GameObject* exitDoor = me->GetMap()->GetGameObject(instance->GetGuidData(GO_GYTH_ENTRY_DOOR)))
|
||||
exitDoor->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
instance->SetBossState(DATA_WARCHIEF_REND_BLACKHAND, DONE);
|
||||
@@ -287,7 +287,7 @@ public:
|
||||
if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
|
||||
victor->AI()->Talk(SAY_NEFARIUS_0);
|
||||
|
||||
if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetData64(GO_GYTH_ENTRY_DOOR)))
|
||||
if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_GYTH_ENTRY_DOOR)))
|
||||
door2->SetGoState(GO_STATE_READY);
|
||||
|
||||
events.ScheduleEvent(EVENT_START_2, 4000);
|
||||
@@ -465,8 +465,8 @@ public:
|
||||
|
||||
private:
|
||||
bool gythEvent;
|
||||
uint64 victorGUID;
|
||||
uint64 waveDoorGUID;
|
||||
ObjectGuid victorGUID;
|
||||
ObjectGuid waveDoorGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
|
||||
@@ -41,30 +41,6 @@ public:
|
||||
instance_blackrock_spireMapScript(InstanceMap* map) : InstanceScript(map)
|
||||
{
|
||||
SetBossNumber(EncounterCount);
|
||||
HighlordOmokk = 0;
|
||||
ShadowHunterVoshgajin = 0;
|
||||
WarMasterVoone = 0;
|
||||
MotherSmolderweb = 0;
|
||||
UrokDoomhowl = 0;
|
||||
QuartermasterZigris = 0;
|
||||
GizrultheSlavener = 0;
|
||||
Halycon = 0;
|
||||
OverlordWyrmthalak = 0;
|
||||
PyroguardEmberseer = 0;
|
||||
WarchiefRendBlackhand = 0;
|
||||
Gyth = 0;
|
||||
LordVictorNefarius = 0;
|
||||
TheBeast = 0;
|
||||
GeneralDrakkisath = 0;
|
||||
go_emberseerin = 0;
|
||||
go_doors = 0;
|
||||
go_emberseerout = 0;
|
||||
go_blackrockaltar = 0;
|
||||
go_portcullis_active = 0;
|
||||
go_portcullis_tobossrooms = 0;
|
||||
go_urok_pile = 0;
|
||||
memset(go_roomrunes, 0, sizeof(go_roomrunes));
|
||||
memset(go_emberseerrunes, 0, sizeof(go_emberseerrunes));
|
||||
}
|
||||
|
||||
void CreatureLooted(Creature* creature, LootType loot) override
|
||||
@@ -147,97 +123,97 @@ public:
|
||||
break;
|
||||
case GO_EMBERSEER_IN:
|
||||
go_emberseerin = go->GetGUID();
|
||||
HandleGameObject(0, GetBossState(DATA_DRAGONSPIRE_ROOM) == DONE, go);
|
||||
HandleGameObject(ObjectGuid::Empty, GetBossState(DATA_DRAGONSPIRE_ROOM) == DONE, go);
|
||||
break;
|
||||
case GO_DOORS:
|
||||
go_doors = go->GetGUID();
|
||||
if (GetBossState(DATA_DRAGONSPIRE_ROOM) == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_EMBERSEER_OUT:
|
||||
go_emberseerout = go->GetGUID();
|
||||
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_HALL_RUNE_1:
|
||||
go_roomrunes[0] = go->GetGUID();
|
||||
if (GetBossState(DATA_HALL_RUNE_1) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_HALL_RUNE_2:
|
||||
go_roomrunes[1] = go->GetGUID();
|
||||
if (GetBossState(DATA_HALL_RUNE_2) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_HALL_RUNE_3:
|
||||
go_roomrunes[2] = go->GetGUID();
|
||||
if (GetBossState(DATA_HALL_RUNE_3) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_HALL_RUNE_4:
|
||||
go_roomrunes[3] = go->GetGUID();
|
||||
if (GetBossState(DATA_HALL_RUNE_4) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_HALL_RUNE_5:
|
||||
go_roomrunes[4] = go->GetGUID();
|
||||
if (GetBossState(DATA_HALL_RUNE_5) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_HALL_RUNE_6:
|
||||
go_roomrunes[5] = go->GetGUID();
|
||||
if (GetBossState(DATA_HALL_RUNE_6) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_HALL_RUNE_7:
|
||||
go_roomrunes[6] = go->GetGUID();
|
||||
if (GetBossState(DATA_HALL_RUNE_7) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_1:
|
||||
go_emberseerrunes[0] = go->GetGUID();
|
||||
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_2:
|
||||
go_emberseerrunes[1] = go->GetGUID();
|
||||
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_3:
|
||||
go_emberseerrunes[2] = go->GetGUID();
|
||||
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_4:
|
||||
go_emberseerrunes[3] = go->GetGUID();
|
||||
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_5:
|
||||
go_emberseerrunes[4] = go->GetGUID();
|
||||
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_6:
|
||||
go_emberseerrunes[5] = go->GetGUID();
|
||||
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_7:
|
||||
go_emberseerrunes[6] = go->GetGUID();
|
||||
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_PORTCULLIS_ACTIVE:
|
||||
go_portcullis_active = go->GetGUID();
|
||||
if (GetBossState(DATA_GYTH) == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_PORTCULLIS_TOBOSSROOMS:
|
||||
go_portcullis_tobossrooms = go->GetGUID();
|
||||
if (GetBossState(DATA_GYTH) == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_UROK_PILE:
|
||||
go_urok_pile = go->GetGUID();
|
||||
@@ -315,7 +291,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type) const override
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -388,7 +364,8 @@ public:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void Update(uint32 diff) override
|
||||
@@ -465,7 +442,7 @@ public:
|
||||
|
||||
if (!_mobAlive && rune->GetGoState() == GO_STATE_ACTIVE)
|
||||
{
|
||||
HandleGameObject(0, false, rune);
|
||||
HandleGameObject(ObjectGuid::Empty, false, rune);
|
||||
|
||||
switch (rune->GetEntry())
|
||||
{
|
||||
@@ -502,11 +479,11 @@ public:
|
||||
{
|
||||
SetBossState(DATA_DRAGONSPIRE_ROOM, DONE);
|
||||
if (GameObject* door1 = instance->GetGameObject(go_emberseerin))
|
||||
HandleGameObject(0, true, door1);
|
||||
HandleGameObject(ObjectGuid::Empty, true, door1);
|
||||
if (GameObject* door2 = instance->GetGameObject(go_doors))
|
||||
HandleGameObject(0, true, door2);
|
||||
HandleGameObject(ObjectGuid::Empty, true, door2);
|
||||
if (GameObject* door3 = instance->GetGameObject(go_emberseerin))
|
||||
HandleGameObject(0, true, door3);
|
||||
HandleGameObject(ObjectGuid::Empty, true, door3);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -556,31 +533,31 @@ public:
|
||||
|
||||
protected:
|
||||
EventMap Events;
|
||||
uint64 HighlordOmokk;
|
||||
uint64 ShadowHunterVoshgajin;
|
||||
uint64 WarMasterVoone;
|
||||
uint64 MotherSmolderweb;
|
||||
uint64 UrokDoomhowl;
|
||||
uint64 QuartermasterZigris;
|
||||
uint64 GizrultheSlavener;
|
||||
uint64 Halycon;
|
||||
uint64 OverlordWyrmthalak;
|
||||
uint64 PyroguardEmberseer;
|
||||
uint64 WarchiefRendBlackhand;
|
||||
uint64 Gyth;
|
||||
uint64 LordVictorNefarius;
|
||||
uint64 TheBeast;
|
||||
uint64 GeneralDrakkisath;
|
||||
uint64 go_emberseerin;
|
||||
uint64 go_doors;
|
||||
uint64 go_emberseerout;
|
||||
uint64 go_blackrockaltar;
|
||||
uint64 go_roomrunes[7];
|
||||
uint64 go_emberseerrunes[7];
|
||||
uint64 runecreaturelist[7][5];
|
||||
uint64 go_portcullis_active;
|
||||
uint64 go_portcullis_tobossrooms;
|
||||
uint64 go_urok_pile;
|
||||
ObjectGuid HighlordOmokk;
|
||||
ObjectGuid ShadowHunterVoshgajin;
|
||||
ObjectGuid WarMasterVoone;
|
||||
ObjectGuid MotherSmolderweb;
|
||||
ObjectGuid UrokDoomhowl;
|
||||
ObjectGuid QuartermasterZigris;
|
||||
ObjectGuid GizrultheSlavener;
|
||||
ObjectGuid Halycon;
|
||||
ObjectGuid OverlordWyrmthalak;
|
||||
ObjectGuid PyroguardEmberseer;
|
||||
ObjectGuid WarchiefRendBlackhand;
|
||||
ObjectGuid Gyth;
|
||||
ObjectGuid LordVictorNefarius;
|
||||
ObjectGuid TheBeast;
|
||||
ObjectGuid GeneralDrakkisath;
|
||||
ObjectGuid go_emberseerin;
|
||||
ObjectGuid go_doors;
|
||||
ObjectGuid go_emberseerout;
|
||||
ObjectGuid go_blackrockaltar;
|
||||
ObjectGuid go_roomrunes[7];
|
||||
ObjectGuid go_emberseerrunes[7];
|
||||
ObjectGuid runecreaturelist[7][5];
|
||||
ObjectGuid go_portcullis_active;
|
||||
ObjectGuid go_portcullis_tobossrooms;
|
||||
ObjectGuid go_urok_pile;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
|
||||
@@ -300,11 +300,11 @@ class go_chromaggus_lever : public GameObjectScript
|
||||
{
|
||||
_instance->SetBossState(DATA_CHROMAGGUS, IN_PROGRESS);
|
||||
|
||||
if (Creature* creature = _instance->instance->GetCreature(DATA_CHROMAGGUS))
|
||||
if (Creature* creature = _instance->instance->GetCreature(_instance->GetGuidData(DATA_CHROMAGGUS)))
|
||||
creature->AI()->AttackStart(player);
|
||||
|
||||
if (GameObject* go = _instance->instance->GetGameObject(DATA_GO_CHROMAGGUS_DOOR))
|
||||
_instance->HandleGameObject(0, true, go);
|
||||
if (GameObject* go = _instance->instance->GetGameObject(_instance->GetGuidData(DATA_GO_CHROMAGGUS_DOOR)))
|
||||
_instance->HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
}
|
||||
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE | GO_FLAG_IN_USE);
|
||||
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
{
|
||||
if (InstanceScript* instance = go->GetInstanceScript())
|
||||
if (instance->GetData(DATA_EGG_EVENT) != DONE)
|
||||
if (Creature* razor = ObjectAccessor::GetCreature(*go, instance->GetData64(DATA_RAZORGORE_THE_UNTAMED)))
|
||||
if (Creature* razor = ObjectAccessor::GetCreature(*go, instance->GetGuidData(DATA_RAZORGORE_THE_UNTAMED)))
|
||||
{
|
||||
razor->Attack(player, true);
|
||||
player->CastSpell(razor, SPELL_MINDCONTROL);
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
PlayerGUID = 0;
|
||||
PlayerGUID.Clear();
|
||||
HasYelled = false;
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
@@ -260,8 +260,8 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 PlayerGUID;
|
||||
uint64 m_nefariusGuid;
|
||||
ObjectGuid PlayerGUID;
|
||||
ObjectGuid m_nefariusGuid;
|
||||
bool HasYelled;
|
||||
};
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
case NPC_BLACKWING_TASKMASTER:
|
||||
case NPC_BLACKWING_LEGIONAIRE:
|
||||
case NPC_BLACKWING_WARLOCK:
|
||||
if (Creature* razor = instance->GetCreature(DATA_RAZORGORE_THE_UNTAMED))
|
||||
if (Creature* razor = instance->GetCreature(GetGuidData(DATA_RAZORGORE_THE_UNTAMED)))
|
||||
if (CreatureAI* razorAI = razor->AI())
|
||||
razorAI->JustSummoned(creature);
|
||||
break;
|
||||
@@ -169,8 +169,8 @@ public:
|
||||
case DATA_RAZORGORE_THE_UNTAMED:
|
||||
if (state == DONE)
|
||||
{
|
||||
for (std::list<uint64>::const_iterator itr = EggList.begin(); itr != EggList.end(); ++itr)
|
||||
if (GameObject* egg = instance->GetGameObject((*itr)))
|
||||
for (ObjectGuid const guid : EggList)
|
||||
if (GameObject* egg = instance->GetGameObject(guid))
|
||||
egg->SetPhaseMask(2, true);
|
||||
}
|
||||
SetData(DATA_EGG_EVENT, NOT_STARTED);
|
||||
@@ -179,7 +179,7 @@ public:
|
||||
switch (state)
|
||||
{
|
||||
case NOT_STARTED:
|
||||
if (Creature* nefarian = instance->GetCreature(DATA_NEFARIAN))
|
||||
if (Creature* nefarian = instance->GetCreature(GetGuidData(DATA_NEFARIAN)))
|
||||
nefarian->DespawnOrUnsummon();
|
||||
break;
|
||||
case FAIL:
|
||||
@@ -213,7 +213,7 @@ public:
|
||||
case SPECIAL:
|
||||
if (++EggCount == 15)
|
||||
{
|
||||
if (Creature* razor = instance->GetCreature(DATA_RAZORGORE_THE_UNTAMED))
|
||||
if (Creature* razor = instance->GetCreature(GetGuidData(DATA_RAZORGORE_THE_UNTAMED)))
|
||||
{
|
||||
SetData(DATA_EGG_EVENT, DONE);
|
||||
razor->RemoveAurasDueToSpell(42013); // MindControl
|
||||
@@ -255,11 +255,11 @@ public:
|
||||
break;
|
||||
case EVENT_RAZOR_PHASE_TWO:
|
||||
_events.CancelEvent(EVENT_RAZOR_SPAWN);
|
||||
if (Creature* razor = instance->GetCreature(DATA_RAZORGORE_THE_UNTAMED))
|
||||
if (Creature* razor = instance->GetCreature(GetGuidData(DATA_RAZORGORE_THE_UNTAMED)))
|
||||
razor->AI()->DoAction(ACTION_PHASE_TWO);
|
||||
break;
|
||||
case EVENT_RESPAWN_NEFARIUS:
|
||||
if (Creature* nefarius = instance->GetCreature(DATA_LORD_VICTOR_NEFARIUS))
|
||||
if (Creature* nefarius = instance->GetCreature(GetGuidData(DATA_LORD_VICTOR_NEFARIUS)))
|
||||
{
|
||||
nefarius->SetPhaseMask(1, true);
|
||||
nefarius->setActive(true);
|
||||
@@ -278,7 +278,7 @@ public:
|
||||
// Razorgore
|
||||
uint8 EggCount;
|
||||
uint32 EggEvent;
|
||||
std::list<uint64> EggList;
|
||||
GuidList EggList;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
if (HealthAbovePct(50) || !instance)
|
||||
return;
|
||||
|
||||
if (Creature* pGolemagg = instance->instance->GetCreature(instance->GetData64(BOSS_GOLEMAGG_THE_INCINERATOR)))
|
||||
if (Creature* pGolemagg = instance->instance->GetCreature(instance->GetGuidData(BOSS_GOLEMAGG_THE_INCINERATOR)))
|
||||
{
|
||||
if (pGolemagg->IsAlive())
|
||||
{
|
||||
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
break;
|
||||
case EVENT_INTRO_4:
|
||||
Talk(SAY_ARRIVAL5_RAG);
|
||||
if (Creature* executus = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_MAJORDOMO_EXECUTUS)))
|
||||
if (Creature* executus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(BOSS_MAJORDOMO_EXECUTUS)))
|
||||
Unit::Kill(me, executus);
|
||||
break;
|
||||
case EVENT_INTRO_5:
|
||||
|
||||
@@ -42,9 +42,6 @@ public:
|
||||
instance_molten_core_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetBossNumber(MAX_ENCOUNTER);
|
||||
_golemaggTheIncineratorGUID = 0;
|
||||
_majordomoExecutusGUID = 0;
|
||||
_cacheOfTheFirelordGUID = 0;
|
||||
_deadBossCount = 0;
|
||||
_ragnarosAddDeaths = 0;
|
||||
}
|
||||
@@ -125,7 +122,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type) const override
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -135,7 +132,7 @@ public:
|
||||
return _majordomoExecutusGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 bossId, EncounterState state) override
|
||||
@@ -236,12 +233,12 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 _golemaggTheIncineratorGUID;
|
||||
uint64 _majordomoExecutusGUID;
|
||||
uint64 _cacheOfTheFirelordGUID;
|
||||
ObjectGuid _golemaggTheIncineratorGUID;
|
||||
ObjectGuid _majordomoExecutusGUID;
|
||||
ObjectGuid _cacheOfTheFirelordGUID;
|
||||
uint8 _deadBossCount;
|
||||
uint8 _ragnarosAddDeaths;
|
||||
std::unordered_map<uint8, uint64> _circlesGUIDs;
|
||||
std::unordered_map<uint8, ObjectGuid> _circlesGUIDs;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
|
||||
@@ -139,7 +139,7 @@ public:
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
me->SetTarget(0);
|
||||
me->SetTarget();
|
||||
me->SetFacingTo(5.558f);
|
||||
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
events.ScheduleEvent(point == EQUIP_TWO_SWORDS ? EVENT_SWAP_WEAPON1 : EVENT_SWAP_WEAPON2, 1500);
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
break;
|
||||
case GO_IRON_CLAD_DOOR:
|
||||
if (_encounters[TYPE_CANNON] == DONE)
|
||||
HandleGameObject(0, true, gameobject);
|
||||
HandleGameObject(ObjectGuid::Empty, true, gameobject);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,14 +57,13 @@ public:
|
||||
{
|
||||
npc_kernobeeAI(Creature* creature) : PassiveAI(creature)
|
||||
{
|
||||
playerGUID = 0;
|
||||
checkTimer = 0;
|
||||
}
|
||||
|
||||
uint32 checkTimer;
|
||||
uint64 playerGUID;
|
||||
ObjectGuid playerGUID;
|
||||
|
||||
void SetGUID(uint64 guid, int32) override
|
||||
void SetGUID(ObjectGuid guid, int32) override
|
||||
{
|
||||
playerGUID = guid;
|
||||
}
|
||||
|
||||
@@ -67,13 +67,6 @@ public:
|
||||
boss_netherspiteAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
PortalGUID[i] = 0;
|
||||
BeamTarget[i] = 0;
|
||||
BeamerGUID[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
@@ -86,9 +79,9 @@ public:
|
||||
uint32 NetherbreathTimer;
|
||||
uint32 EmpowermentTimer;
|
||||
uint32 PortalTimer; // timer for beam checking
|
||||
uint64 PortalGUID[3]; // guid's of portals
|
||||
uint64 BeamerGUID[3]; // guid's of auxiliary beaming portals
|
||||
uint64 BeamTarget[3]; // guid's of portals' current targets
|
||||
ObjectGuid PortalGUID[3]; // guid's of portals
|
||||
ObjectGuid BeamerGUID[3]; // guid's of auxiliary beaming portals
|
||||
ObjectGuid BeamTarget[3]; // guid's of portals' current targets
|
||||
|
||||
bool IsBetween(WorldObject* u1, WorldObject* target, WorldObject* u2) // the in-line checker
|
||||
{
|
||||
@@ -150,8 +143,8 @@ public:
|
||||
portal->DisappearAndDie();
|
||||
if (Creature* portal = ObjectAccessor::GetCreature(*me, BeamerGUID[i]))
|
||||
portal->DisappearAndDie();
|
||||
PortalGUID[i] = 0;
|
||||
BeamTarget[i] = 0;
|
||||
PortalGUID[i].Clear();
|
||||
BeamTarget[i].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,9 +168,9 @@ public:
|
||||
Player* p = i->GetSource();
|
||||
if (p && p->IsAlive() // alive
|
||||
&& (!target || target->GetDistance2d(portal) > p->GetDistance2d(portal)) // closer than current best
|
||||
&& !p->HasAura(PlayerDebuff[j], 0) // not exhausted
|
||||
&& !p->HasAura(PlayerBuff[(j + 1) % 3], 0) // not on another beam
|
||||
&& !p->HasAura(PlayerBuff[(j + 2) % 3], 0)
|
||||
&& !p->HasAura(PlayerDebuff[j]) // not exhausted
|
||||
&& !p->HasAura(PlayerBuff[(j + 1) % 3]) // not on another beam
|
||||
&& !p->HasAura(PlayerBuff[(j + 2) % 3])
|
||||
&& IsBetween(me, p, portal)) // on the beam
|
||||
target = p;
|
||||
}
|
||||
@@ -197,7 +190,7 @@ public:
|
||||
{
|
||||
beamer->CastSpell(target, PortalBeam[j], false);
|
||||
beamer->DisappearAndDie();
|
||||
BeamerGUID[j] = 0;
|
||||
BeamerGUID[j].Clear();
|
||||
}
|
||||
// create new one and start beaming on the target
|
||||
if (Creature* beamer = portal->SummonCreature(PortalID[j], portal->GetPositionX(), portal->GetPositionY(), portal->GetPositionZ(), portal->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
@@ -241,7 +234,7 @@ public:
|
||||
|
||||
void HandleDoors(bool open) // Massive Door switcher
|
||||
{
|
||||
if (GameObject* Door = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_GO_MASSIVE_DOOR) ))
|
||||
if (GameObject* Door = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_GO_MASSIVE_DOOR) ))
|
||||
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
||||
}
|
||||
|
||||
|
||||
@@ -120,10 +120,10 @@ public:
|
||||
|
||||
if (instance)
|
||||
{
|
||||
if (instance->GetData64(DATA_NIGHTBANE) == DONE)
|
||||
if (instance->GetData(DATA_NIGHTBANE) == DONE)
|
||||
me->DisappearAndDie();
|
||||
else
|
||||
instance->SetData64(DATA_NIGHTBANE, NOT_STARTED);
|
||||
instance->SetData(DATA_NIGHTBANE, NOT_STARTED);
|
||||
}
|
||||
|
||||
HandleTerraceDoors(true);
|
||||
@@ -142,15 +142,15 @@ public:
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
instance->HandleGameObject(instance->GetData64(DATA_MASTERS_TERRACE_DOOR_1), open);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_MASTERS_TERRACE_DOOR_2), open);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_MASTERS_TERRACE_DOOR_1), open);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_MASTERS_TERRACE_DOOR_2), open);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData64(DATA_NIGHTBANE, IN_PROGRESS);
|
||||
instance->SetData(DATA_NIGHTBANE, IN_PROGRESS);
|
||||
|
||||
HandleTerraceDoors(false);
|
||||
Talk(YELL_AGGRO);
|
||||
@@ -428,7 +428,7 @@ public:
|
||||
if (InstanceScript* pInstance = go->GetInstanceScript())
|
||||
{
|
||||
if (pInstance->GetData(DATA_NIGHTBANE) != DONE && !go->FindNearestCreature(NPC_NIGHTBANE, 40.0f))
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*player, pInstance->GetData64(DATA_NIGHTBANE)))
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*player, pInstance->GetGuidData(DATA_NIGHTBANE)))
|
||||
cr->GetMotionMaster()->MovePoint(0, IntroWay[0][0], IntroWay[0][1], IntroWay[0][2]);
|
||||
}
|
||||
|
||||
|
||||
@@ -87,11 +87,11 @@ public:
|
||||
struct netherspite_infernalAI : public ScriptedAI
|
||||
{
|
||||
netherspite_infernalAI(Creature* creature) : ScriptedAI(creature),
|
||||
HellfireTimer(0), CleanupTimer(0), malchezaar(0), point(nullptr) { }
|
||||
HellfireTimer(0), CleanupTimer(0), point(nullptr) { }
|
||||
|
||||
uint32 HellfireTimer;
|
||||
uint32 CleanupTimer;
|
||||
uint64 malchezaar;
|
||||
ObjectGuid malchezaar;
|
||||
InfernalPoint* point;
|
||||
|
||||
void Reset() override { }
|
||||
@@ -176,9 +176,9 @@ public:
|
||||
uint32 InfernalCleanupTimer;
|
||||
uint32 phase;
|
||||
uint32 enfeeble_health[5];
|
||||
uint64 enfeeble_targets[5];
|
||||
ObjectGuid enfeeble_targets[5];
|
||||
|
||||
std::vector<uint64> infernals;
|
||||
GuidVector infernals;
|
||||
std::vector<InfernalPoint*> positions;
|
||||
|
||||
void Initialize()
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
phase = 1;
|
||||
clearweapons();
|
||||
positions.clear();
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_NETHER_DOOR), true);
|
||||
}
|
||||
|
||||
void clearweapons()
|
||||
@@ -216,7 +216,7 @@ public:
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_NETHER_DOOR), true);
|
||||
if (Creature* Axe = me->FindNearestCreature(MALCHEZARS_AXE, 100.0f))
|
||||
{
|
||||
Axe->DespawnOrUnsummon();
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
DoZoneInCombat();
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), false);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_NETHER_DOOR), false);
|
||||
}
|
||||
|
||||
void SummonAxes()
|
||||
@@ -278,7 +278,7 @@ public:
|
||||
Unit* target = ObjectAccessor::GetUnit(*me, enfeeble_targets[i]);
|
||||
if (target && target->IsAlive())
|
||||
target->SetHealth(enfeeble_health[i]);
|
||||
enfeeble_targets[i] = 0;
|
||||
enfeeble_targets[i].Clear();
|
||||
enfeeble_health[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
|
||||
uint32 FlameWreathTimer;
|
||||
uint32 FlameWreathCheckTime;
|
||||
uint64 FlameWreathTarget[3];
|
||||
ObjectGuid FlameWreathTarget[3];
|
||||
float FWTargPosX[3];
|
||||
float FWTargPosY[3];
|
||||
|
||||
@@ -105,6 +105,9 @@ public:
|
||||
FlameWreathTimer = 0;
|
||||
FlameWreathCheckTime = 0;
|
||||
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
FlameWreathTarget[i].Clear();
|
||||
|
||||
CurrentNormalSpell = 0;
|
||||
ArcaneCooldown = 0;
|
||||
FireCooldown = 0;
|
||||
@@ -118,7 +121,7 @@ public:
|
||||
|
||||
// Not in progress
|
||||
instance->SetData(DATA_ARAN, NOT_STARTED);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR), true);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
@@ -131,7 +134,7 @@ public:
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
instance->SetData(DATA_ARAN, DONE);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR), true);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
@@ -139,7 +142,7 @@ public:
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
instance->SetData(DATA_ARAN, IN_PROGRESS);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), false);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR), false);
|
||||
DoZoneInCombat();
|
||||
}
|
||||
|
||||
@@ -187,7 +190,7 @@ public:
|
||||
{
|
||||
if (CloseDoorTimer <= diff)
|
||||
{
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), false);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR), false);
|
||||
CloseDoorTimer = 0;
|
||||
}
|
||||
else
|
||||
@@ -362,9 +365,9 @@ public:
|
||||
FlameWreathTimer = 20000;
|
||||
FlameWreathCheckTime = 500;
|
||||
|
||||
FlameWreathTarget[0] = 0;
|
||||
FlameWreathTarget[1] = 0;
|
||||
FlameWreathTarget[2] = 0;
|
||||
FlameWreathTarget[0].Clear();
|
||||
FlameWreathTarget[1].Clear();
|
||||
FlameWreathTarget[2].Clear();
|
||||
|
||||
FlameWreathEffect();
|
||||
break;
|
||||
@@ -496,7 +499,7 @@ public:
|
||||
{
|
||||
unit->CastSpell(unit, 20476, true, 0, 0, me->GetGUID());
|
||||
unit->CastSpell(unit, 11027, true);
|
||||
FlameWreathTarget[i] = 0;
|
||||
FlameWreathTarget[i].Clear();
|
||||
}
|
||||
}
|
||||
FlameWreathCheckTime = 500;
|
||||
|
||||
@@ -70,13 +70,13 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 TerestianGUID;
|
||||
ObjectGuid TerestianGUID;
|
||||
|
||||
uint32 AmplifyTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
TerestianGUID = 0;
|
||||
TerestianGUID.Clear();
|
||||
AmplifyTimer = 2000;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
uint64 TerestianGUID = instance->GetData64(DATA_TERESTIAN);
|
||||
ObjectGuid TerestianGUID = instance->GetGuidData(DATA_TERESTIAN);
|
||||
if (TerestianGUID)
|
||||
{
|
||||
Unit* Terestian = ObjectAccessor::GetUnit(*me, TerestianGUID);
|
||||
@@ -130,11 +130,11 @@ public:
|
||||
{
|
||||
npc_demon_chainAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint64 SacrificeGUID;
|
||||
ObjectGuid SacrificeGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
SacrificeGUID = 0;
|
||||
SacrificeGUID.Clear();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
@@ -243,14 +243,12 @@ public:
|
||||
{
|
||||
boss_terestianAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
PortalGUID[i] = 0;
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 PortalGUID[2];
|
||||
ObjectGuid PortalGUID[2];
|
||||
uint8 PortalsCount;
|
||||
|
||||
uint32 SacrificeTimer;
|
||||
@@ -274,7 +272,7 @@ public:
|
||||
pPortal->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
PortalGUID[i] = 0;
|
||||
PortalGUID[i].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,7 +337,7 @@ public:
|
||||
if (Creature* pPortal = ObjectAccessor::GetCreature((*me), PortalGUID[i]))
|
||||
pPortal->DespawnOrUnsummon();
|
||||
|
||||
PortalGUID[i] = 0;
|
||||
PortalGUID[i].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -242,12 +242,12 @@ public:
|
||||
{
|
||||
npc_titoAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint64 DorotheeGUID;
|
||||
ObjectGuid DorotheeGUID;
|
||||
uint32 YipTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
DorotheeGUID = 0;
|
||||
DorotheeGUID.Clear();
|
||||
YipTimer = 10000;
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ public:
|
||||
{
|
||||
if (DorotheeGUID)
|
||||
{
|
||||
Creature* Dorothee = (ObjectAccessor::GetCreature((*me), DorotheeGUID));
|
||||
Creature* Dorothee = ObjectAccessor::GetCreature(*me, DorotheeGUID);
|
||||
if (Dorothee && Dorothee->IsAlive())
|
||||
{
|
||||
CAST_AI(boss_dorothee::boss_dorotheeAI, Dorothee->AI())->TitoDied = true;
|
||||
@@ -848,7 +848,7 @@ public:
|
||||
uint32 FearTimer;
|
||||
uint32 SwipeTimer;
|
||||
|
||||
uint64 HoodGUID;
|
||||
ObjectGuid HoodGUID;
|
||||
float TempThreat;
|
||||
|
||||
bool IsChasing;
|
||||
@@ -859,7 +859,7 @@ public:
|
||||
FearTimer = urand(25000, 35000);
|
||||
SwipeTimer = 5000;
|
||||
|
||||
HoodGUID = 0;
|
||||
HoodGUID.Clear();
|
||||
TempThreat = 0;
|
||||
|
||||
IsChasing = false;
|
||||
@@ -918,7 +918,7 @@ public:
|
||||
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*me, HoodGUID))
|
||||
{
|
||||
HoodGUID = 0;
|
||||
HoodGUID.Clear();
|
||||
if (DoGetThreat(target))
|
||||
DoModifyThreatPercent(target, -100);
|
||||
me->AddThreat(target, TempThreat);
|
||||
@@ -1050,7 +1050,7 @@ public:
|
||||
uint32 EntryYellTimer;
|
||||
uint32 AggroYellTimer;
|
||||
|
||||
uint64 RomuloGUID;
|
||||
ObjectGuid RomuloGUID;
|
||||
|
||||
uint32 Phase;
|
||||
|
||||
@@ -1069,7 +1069,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
RomuloGUID = 0;
|
||||
RomuloGUID.Clear();
|
||||
Phase = PHASE_JULIANNE;
|
||||
|
||||
BlindingPassionTimer = 30000;
|
||||
@@ -1165,7 +1165,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 JulianneGUID;
|
||||
ObjectGuid JulianneGUID;
|
||||
uint32 Phase;
|
||||
|
||||
uint32 EntryYellTimer;
|
||||
@@ -1181,7 +1181,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
JulianneGUID = 0;
|
||||
JulianneGUID.Clear();
|
||||
Phase = PHASE_ROMULO;
|
||||
|
||||
BackwardLungeTimer = 15000;
|
||||
@@ -1259,7 +1259,7 @@ public:
|
||||
Talk(SAY_ROMULO_AGGRO);
|
||||
if (JulianneGUID)
|
||||
{
|
||||
Creature* Julianne = (ObjectAccessor::GetCreature((*me), JulianneGUID));
|
||||
Creature* Julianne = ObjectAccessor::GetCreature(*me, JulianneGUID);
|
||||
if (Julianne && Julianne->GetVictim())
|
||||
{
|
||||
me->AddThreat(Julianne->GetVictim(), 1.0f);
|
||||
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void SetData64(uint32 type, uint64 data) override
|
||||
void SetGuidData(uint32 type, ObjectGuid data) override
|
||||
{
|
||||
if (type == DATA_IMAGE_OF_MEDIVH)
|
||||
ImageGUID = data;
|
||||
@@ -228,43 +228,12 @@ public:
|
||||
return OperaEvent;
|
||||
case DATA_OPERA_OZ_DEATHCOUNT:
|
||||
return OzDeathCount;
|
||||
|
||||
case DATA_KILREK:
|
||||
return m_uiKilrekGUID;
|
||||
case DATA_TERESTIAN:
|
||||
return m_uiTerestianGUID;
|
||||
case DATA_MOROES:
|
||||
return m_uiMoroesGUID;
|
||||
case DATA_GO_STAGEDOORLEFT:
|
||||
return m_uiStageDoorLeftGUID;
|
||||
case DATA_GO_STAGEDOORRIGHT:
|
||||
return m_uiStageDoorRightGUID;
|
||||
case DATA_GO_CURTAINS:
|
||||
return m_uiCurtainGUID;
|
||||
case DATA_GO_LIBRARY_DOOR:
|
||||
return m_uiLibraryDoor;
|
||||
case DATA_GO_MASSIVE_DOOR:
|
||||
return m_uiMassiveDoor;
|
||||
case DATA_GO_SIDE_ENTRANCE_DOOR:
|
||||
return m_uiSideEntranceDoor;
|
||||
case DATA_GO_GAME_DOOR:
|
||||
return m_uiGamesmansDoor;
|
||||
case DATA_GO_GAME_EXIT_DOOR:
|
||||
return m_uiGamesmansExitDoor;
|
||||
case DATA_GO_NETHER_DOOR:
|
||||
return m_uiNetherspaceDoor;
|
||||
case DATA_MASTERS_TERRACE_DOOR_1:
|
||||
return MastersTerraceDoor[0];
|
||||
case DATA_MASTERS_TERRACE_DOOR_2:
|
||||
return MastersTerraceDoor[1];
|
||||
case DATA_IMAGE_OF_MEDIVH:
|
||||
return ImageGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data) const override
|
||||
ObjectGuid GetGuidData(uint32 data) const override
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
@@ -302,7 +271,7 @@ public:
|
||||
return m_uiNightBaneGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -311,25 +280,25 @@ public:
|
||||
uint32 OptionalBossCount;
|
||||
//uint32 m_auiEncounter[MAX_ENCOUNTERS];
|
||||
//uint32 m_uiTeam;
|
||||
uint64 m_uiCurtainGUID;
|
||||
uint64 m_uiStageDoorLeftGUID;
|
||||
uint64 m_uiStageDoorRightGUID;
|
||||
uint64 m_uiKilrekGUID;
|
||||
uint64 m_uiTerestianGUID;
|
||||
uint64 m_uiMoroesGUID;
|
||||
uint64 m_uiNightBaneGUID;
|
||||
//uint64 EchoOfMedivhGUID;
|
||||
uint64 m_uiLibraryDoor; // Door at Shade of Aran
|
||||
uint64 m_uiMassiveDoor; // Door at Netherspite
|
||||
uint64 m_uiSideEntranceDoor; // Side Entrance
|
||||
uint64 m_uiGamesmansDoor; // Door before Chess
|
||||
uint64 m_uiGamesmansExitDoor; // Door after Chess
|
||||
uint64 m_uiNetherspaceDoor; // Door at Malchezaar
|
||||
//uint64 m_uiServantsAccessDoor; // Door to Brocken Stair
|
||||
uint64 MastersTerraceDoor[2];
|
||||
uint64 ImageGUID;
|
||||
uint64 DustCoveredChest;
|
||||
uint64 m_uiRelayGUID;
|
||||
ObjectGuid m_uiCurtainGUID;
|
||||
ObjectGuid m_uiStageDoorLeftGUID;
|
||||
ObjectGuid m_uiStageDoorRightGUID;
|
||||
ObjectGuid m_uiKilrekGUID;
|
||||
ObjectGuid m_uiTerestianGUID;
|
||||
ObjectGuid m_uiMoroesGUID;
|
||||
ObjectGuid m_uiNightBaneGUID;
|
||||
//ObjectGuid EchoOfMedivhGUID;
|
||||
ObjectGuid m_uiLibraryDoor; // Door at Shade of Aran
|
||||
ObjectGuid m_uiMassiveDoor; // Door at Netherspite
|
||||
ObjectGuid m_uiSideEntranceDoor; // Side Entrance
|
||||
ObjectGuid m_uiGamesmansDoor; // Door before Chess
|
||||
ObjectGuid m_uiGamesmansExitDoor; // Door after Chess
|
||||
ObjectGuid m_uiNetherspaceDoor; // Door at Malchezaar
|
||||
//ObjectGuid m_uiServantsAccessDoor; // Door to Brocken Stair
|
||||
ObjectGuid MastersTerraceDoor[2];
|
||||
ObjectGuid ImageGUID;
|
||||
ObjectGuid DustCoveredChest;
|
||||
ObjectGuid m_uiRelayGUID;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 m_uiSpotlightGUID;
|
||||
ObjectGuid m_uiSpotlightGUID;
|
||||
|
||||
uint32 TalkCount;
|
||||
uint32 TalkTimer;
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
m_uiSpotlightGUID = 0;
|
||||
m_uiSpotlightGUID.Clear();
|
||||
|
||||
TalkCount = 0;
|
||||
TalkTimer = 2000;
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
{
|
||||
case 0:
|
||||
DoCast(me, SPELL_TUXEDO, false);
|
||||
instance->DoUseDoorOrButton(instance->GetData64(DATA_GO_STAGEDOORLEFT));
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(DATA_GO_STAGEDOORLEFT));
|
||||
break;
|
||||
case 4:
|
||||
TalkCount = 0;
|
||||
@@ -184,12 +184,12 @@ public:
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
instance->DoUseDoorOrButton(instance->GetData64(DATA_GO_STAGEDOORLEFT));
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(DATA_GO_STAGEDOORLEFT));
|
||||
PerformanceReady = true;
|
||||
break;
|
||||
case 9:
|
||||
PrepareEncounter();
|
||||
instance->DoUseDoorOrButton(instance->GetData64(DATA_GO_CURTAINS));
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(DATA_GO_CURTAINS));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -437,7 +437,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 ArcanagosGUID;
|
||||
ObjectGuid ArcanagosGUID;
|
||||
|
||||
uint32 YellTimer;
|
||||
uint8 Step;
|
||||
@@ -448,11 +448,11 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
ArcanagosGUID = 0;
|
||||
ArcanagosGUID.Clear();
|
||||
MTimer = 0;
|
||||
ATimer = 0;
|
||||
|
||||
if (instance && instance->GetData64(DATA_IMAGE_OF_MEDIVH) == 0)
|
||||
if (instance && !instance->GetGuidData(DATA_IMAGE_OF_MEDIVH))
|
||||
{
|
||||
Creature* Arcanagos = me->SummonCreature(NPC_ARCANAGOS, ArcanagosPos[0], ArcanagosPos[1], ArcanagosPos[2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000);
|
||||
if (!Arcanagos)
|
||||
@@ -461,7 +461,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
instance->SetData64(DATA_IMAGE_OF_MEDIVH, me->GetGUID());
|
||||
instance->SetGuidData(DATA_IMAGE_OF_MEDIVH, me->GetGUID());
|
||||
EventStarted = true;
|
||||
ArcanagosGUID = Arcanagos->GetGUID();
|
||||
|
||||
|
||||
@@ -314,7 +314,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
|
||||
void EnterEvadeMode() override
|
||||
{
|
||||
if (Creature* delrissa = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_DELRISSA)))
|
||||
if (Creature* delrissa = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_DELRISSA)))
|
||||
if (!delrissa->IsAlive())
|
||||
{
|
||||
delrissa->Respawn();
|
||||
@@ -325,7 +325,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
|
||||
void EnterCombat(Unit* who) override
|
||||
{
|
||||
if (Creature* delrissa = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_DELRISSA)))
|
||||
if (Creature* delrissa = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_DELRISSA)))
|
||||
if (delrissa->IsAlive() && !delrissa->IsInCombat())
|
||||
delrissa->AI()->AttackStart(who);
|
||||
|
||||
@@ -344,7 +344,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (Creature* delrissa = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_DELRISSA)))
|
||||
if (Creature* delrissa = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_DELRISSA)))
|
||||
delrissa->AI()->KilledUnit(victim);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
InstanceScript* instance;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
uint64 CrystalGUID;
|
||||
ObjectGuid CrystalGUID;
|
||||
|
||||
bool CanAIAttack(const Unit* who) const override
|
||||
{
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
summons.DespawnAll();
|
||||
SpawnCrystals();
|
||||
instance->SetData(DATA_SELIN_EVENT, NOT_STARTED);
|
||||
CrystalGUID = 0;
|
||||
CrystalGUID.Clear();
|
||||
me->SetPower(POWER_MANA, 0);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
if (summons.empty())
|
||||
return;
|
||||
|
||||
CrystalGUID = 0;
|
||||
CrystalGUID.Clear();
|
||||
Unit* crystal = nullptr;
|
||||
for (SummonList::const_iterator i = summons.begin(); i != summons.end(); )
|
||||
if (Creature* summon = ObjectAccessor::GetCreature(*me, *i++))
|
||||
|
||||
@@ -17,29 +17,19 @@ public:
|
||||
|
||||
uint32 Encounter[MAX_ENCOUNTER];
|
||||
|
||||
uint64 VexallusDoorGUID;
|
||||
uint64 SelinDoorGUID;
|
||||
uint64 SelinEncounterDoorGUID;
|
||||
uint64 DelrissaDoorGUID;
|
||||
uint64 KaelDoorGUID;
|
||||
uint64 EscapeOrbGUID;
|
||||
ObjectGuid VexallusDoorGUID;
|
||||
ObjectGuid SelinDoorGUID;
|
||||
ObjectGuid SelinEncounterDoorGUID;
|
||||
ObjectGuid DelrissaDoorGUID;
|
||||
ObjectGuid KaelDoorGUID;
|
||||
ObjectGuid EscapeOrbGUID;
|
||||
|
||||
uint64 DelrissaGUID;
|
||||
uint64 KaelGUID;
|
||||
ObjectGuid DelrissaGUID;
|
||||
ObjectGuid KaelGUID;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
memset(&Encounter, 0, sizeof(Encounter));
|
||||
|
||||
VexallusDoorGUID = 0;
|
||||
SelinDoorGUID = 0;
|
||||
SelinEncounterDoorGUID = 0;
|
||||
DelrissaDoorGUID = 0;
|
||||
KaelDoorGUID = 0;
|
||||
EscapeOrbGUID = 0;
|
||||
|
||||
DelrissaGUID = 0;
|
||||
KaelGUID = 0;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const override
|
||||
@@ -118,7 +108,7 @@ public:
|
||||
{
|
||||
case GO_SELIN_DOOR:
|
||||
if (GetData(DATA_SELIN_EVENT) == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
SelinDoorGUID = go->GetGUID();
|
||||
break;
|
||||
case GO_SELIN_ENCOUNTER_DOOR:
|
||||
@@ -127,13 +117,13 @@ public:
|
||||
|
||||
case GO_VEXALLUS_DOOR:
|
||||
if (GetData(DATA_VEXALLUS_EVENT) == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
VexallusDoorGUID = go->GetGUID();
|
||||
break;
|
||||
|
||||
case GO_DELRISSA_DOOR:
|
||||
if (GetData(DATA_DELRISSA_EVENT) == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
DelrissaDoorGUID = go->GetGUID();
|
||||
break;
|
||||
case GO_KAEL_DOOR:
|
||||
@@ -182,14 +172,15 @@ public:
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier) const override
|
||||
ObjectGuid GetGuidData(uint32 identifier) const override
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
case NPC_DELRISSA:
|
||||
return DelrissaGUID;
|
||||
}
|
||||
return 0;
|
||||
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
void SetControl(Player* player, bool on)
|
||||
{
|
||||
WorldPacket data(SMSG_CLIENT_CONTROL_UPDATE, me->GetPackGUID().size() + 1);
|
||||
data.append(me->GetPackGUID());
|
||||
data << me->GetPackGUID();
|
||||
data << uint8(on ? 1 : 0);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
}
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
if (player->IsInCombat() || creature->IsInCombat())
|
||||
return true;
|
||||
|
||||
if (!creature->AI()->GetData(player->GetGUIDLow()))
|
||||
if (!creature->AI()->GetGUID(player->GetGUID().GetCounter()))
|
||||
AddGossipItemFor(player, 9765, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
npc_death_knight_initiateAI(Creature* creature) : CombatAI(creature) { }
|
||||
|
||||
bool _duelInProgress;
|
||||
uint64 _duelGUID;
|
||||
ObjectGuid _duelGUID;
|
||||
EventMap events;
|
||||
std::set<uint32> playerGUIDs;
|
||||
uint32 timer = 0;
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
_duelInProgress = false;
|
||||
_duelGUID = 0;
|
||||
_duelGUID.Clear();
|
||||
me->RestoreFaction();
|
||||
CombatAI::Reset();
|
||||
|
||||
@@ -253,7 +253,7 @@ public:
|
||||
{
|
||||
if (!_duelInProgress && pSpell->Id == SPELL_DUEL)
|
||||
{
|
||||
playerGUIDs.insert(caster->GetGUIDLow());
|
||||
playerGUIDs.insert(caster->GetGUID().GetCounter());
|
||||
_duelGUID = caster->GetGUID();
|
||||
_duelInProgress = true;
|
||||
|
||||
@@ -280,7 +280,7 @@ public:
|
||||
damage = 0;
|
||||
events.ScheduleEvent(EVENT_DUEL_LOST, 2000);
|
||||
events.ScheduleEvent(EVENT_DUEL_LOST + 1, 6000);
|
||||
_duelGUID = 0;
|
||||
_duelGUID.Clear();
|
||||
_duelInProgress = 0;
|
||||
|
||||
attacker->RemoveGameObject(SPELL_DUEL_FLAG, true);
|
||||
@@ -453,11 +453,10 @@ public:
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
uint64 gothikGUID;
|
||||
ObjectGuid gothikGUID;
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
gothikGUID = 0;
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||
ScriptedAI::InitializeAI();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
@@ -472,7 +471,7 @@ public:
|
||||
AttackStart(attacker);
|
||||
}
|
||||
|
||||
void SetGUID(uint64 guid, int32) override
|
||||
void SetGUID(ObjectGuid guid, int32) override
|
||||
{
|
||||
gothikGUID = guid;
|
||||
events.ScheduleEvent(EVENT_GHOUL_MOVE_TO_PIT, 3000);
|
||||
@@ -701,17 +700,17 @@ public:
|
||||
me->SetCurrentEquipmentId(me->GetOriginalEquipmentId());
|
||||
}
|
||||
|
||||
uint64 playerGUID;
|
||||
ObjectGuid playerGUID;
|
||||
UnworthyInitiatePhase phase;
|
||||
uint32 wait_timer;
|
||||
float anchorX, anchorY;
|
||||
uint64 anchorGUID;
|
||||
ObjectGuid anchorGUID;
|
||||
|
||||
EventMap events;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
anchorGUID = 0;
|
||||
anchorGUID.Clear();
|
||||
phase = PHASE_CHAINED;
|
||||
events.Reset();
|
||||
me->setFaction(7);
|
||||
@@ -880,17 +879,17 @@ public:
|
||||
|
||||
struct npc_unworthy_initiate_anchorAI : public PassiveAI
|
||||
{
|
||||
npc_unworthy_initiate_anchorAI(Creature* creature) : PassiveAI(creature), prisonerGUID(0) {}
|
||||
npc_unworthy_initiate_anchorAI(Creature* creature) : PassiveAI(creature) {}
|
||||
|
||||
uint64 prisonerGUID;
|
||||
ObjectGuid prisonerGUID;
|
||||
|
||||
void SetGUID(uint64 guid, int32 /*id*/) override
|
||||
void SetGUID(ObjectGuid guid, int32 /*id*/) override
|
||||
{
|
||||
if (!prisonerGUID)
|
||||
prisonerGUID = guid;
|
||||
}
|
||||
|
||||
uint64 GetGUID(int32 /*id*/) const override
|
||||
ObjectGuid GetGUID(int32 /*id*/) const override
|
||||
{
|
||||
return prisonerGUID;
|
||||
}
|
||||
@@ -905,7 +904,7 @@ public:
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
if (Creature* anchor = go->FindNearestCreature(29521, 15))
|
||||
if (uint64 prisonerGUID = anchor->AI()->GetGUID())
|
||||
if (ObjectGuid prisonerGUID = anchor->AI()->GetGUID())
|
||||
if (Creature* prisoner = ObjectAccessor::GetCreature(*player, prisonerGUID))
|
||||
CAST_AI(npc_unworthy_initiate::npc_unworthy_initiateAI, prisoner->AI())->EventStart(anchor, player);
|
||||
|
||||
@@ -935,16 +934,16 @@ public:
|
||||
|
||||
struct npc_scarlet_miner_cartAI : public PassiveAI
|
||||
{
|
||||
npc_scarlet_miner_cartAI(Creature* creature) : PassiveAI(creature), minerGUID(0)
|
||||
npc_scarlet_miner_cartAI(Creature* creature) : PassiveAI(creature)
|
||||
{
|
||||
me->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
me->setFaction(35);
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid1); // Modelid2 is a horse.
|
||||
}
|
||||
|
||||
uint64 minerGUID;
|
||||
ObjectGuid minerGUID;
|
||||
|
||||
void SetGUID(uint64 guid, int32 /*id*/) override
|
||||
void SetGUID(ObjectGuid guid, int32 /*id*/) override
|
||||
{
|
||||
minerGUID = guid;
|
||||
}
|
||||
@@ -1004,11 +1003,11 @@ public:
|
||||
|
||||
uint32 IntroTimer;
|
||||
uint32 IntroPhase;
|
||||
uint64 carGUID;
|
||||
ObjectGuid carGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
carGUID = 0;
|
||||
carGUID.Clear();
|
||||
IntroTimer = 0;
|
||||
IntroPhase = 0;
|
||||
}
|
||||
|
||||
@@ -47,13 +47,13 @@ public:
|
||||
|
||||
uint32 speechTimer;
|
||||
uint32 speechCounter;
|
||||
uint64 playerGUID;
|
||||
ObjectGuid playerGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
speechTimer = 0;
|
||||
speechCounter = 0;
|
||||
playerGUID = 0;
|
||||
playerGUID.Clear();
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->RestoreFaction();
|
||||
}
|
||||
@@ -212,7 +212,7 @@ public:
|
||||
|
||||
uint32 m_uiWave;
|
||||
uint32 m_uiWave_Timer;
|
||||
uint64 m_uiValrothGUID;
|
||||
ObjectGuid m_uiValrothGUID;
|
||||
SummonList summons;
|
||||
|
||||
void Reset() override
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
{
|
||||
m_uiWave = 0;
|
||||
m_uiWave_Timer = 3000;
|
||||
m_uiValrothGUID = 0;
|
||||
m_uiValrothGUID.Clear();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->LoadEquipment(0, true);
|
||||
me->RemoveAllAuras();
|
||||
@@ -645,13 +645,13 @@ public:
|
||||
|
||||
uint32 ExecuteSpeech_Timer;
|
||||
uint32 ExecuteSpeech_Counter;
|
||||
uint64 PlayerGUID;
|
||||
ObjectGuid PlayerGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
ExecuteSpeech_Timer = 0;
|
||||
ExecuteSpeech_Counter = 0;
|
||||
PlayerGUID = 0;
|
||||
PlayerGUID.Clear();
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type) const override
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -158,7 +158,8 @@ public:
|
||||
case DATA_DOOR_WHITEMANE:
|
||||
return DoorHighInquisitorGUID;
|
||||
}
|
||||
return 0;
|
||||
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const override
|
||||
@@ -168,9 +169,9 @@ public:
|
||||
return 0;
|
||||
}
|
||||
private:
|
||||
uint64 DoorHighInquisitorGUID;
|
||||
uint64 MograineGUID;
|
||||
uint64 WhitemaneGUID;
|
||||
ObjectGuid DoorHighInquisitorGUID;
|
||||
ObjectGuid MograineGUID;
|
||||
ObjectGuid WhitemaneGUID;
|
||||
uint32 encounter;
|
||||
};
|
||||
};
|
||||
@@ -395,7 +396,7 @@ public:
|
||||
return;
|
||||
|
||||
//On first death, fake death and open door, as well as initiate whitemane if exist
|
||||
if (Unit* Whitemane = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_WHITEMANE)))
|
||||
if (Unit* Whitemane = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_WHITEMANE)))
|
||||
{
|
||||
instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, IN_PROGRESS);
|
||||
Whitemane->GetMotionMaster()->MovePoint(1, 1163.113370f, 1398.856812f, 32.527786f);
|
||||
@@ -413,7 +414,7 @@ public:
|
||||
hasDied = true;
|
||||
fakeDeath = true;
|
||||
damage = 0;
|
||||
ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_WHITEMANE))->SetInCombatWithZone();
|
||||
ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_WHITEMANE))->SetInCombatWithZone();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -451,7 +452,7 @@ public:
|
||||
if (hasDied && !heal && instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == SPECIAL)
|
||||
{
|
||||
//On resurrection, stop fake death and heal whitemane and resume fight
|
||||
if (Unit* Whitemane = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_WHITEMANE)))
|
||||
if (Unit* Whitemane = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_WHITEMANE)))
|
||||
{
|
||||
//Incase wipe during phase that mograine fake death
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -563,7 +564,7 @@ public:
|
||||
//When casting resuruction make sure to delay so on rez when reinstate battle deepsleep runs out
|
||||
if (Wait_Timer <= diff)
|
||||
{
|
||||
if (ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MOGRAINE)))
|
||||
if (ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_MOGRAINE)))
|
||||
{
|
||||
DoCast(SPELL_SCARLET_RESURRECTION);
|
||||
Talk(SAY_WH_RESURRECT);
|
||||
@@ -597,7 +598,7 @@ public:
|
||||
if (!HealthAbovePct(75))
|
||||
target = me;
|
||||
|
||||
if (Creature* mograine = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MOGRAINE)))
|
||||
if (Creature* mograine = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_MOGRAINE)))
|
||||
{
|
||||
// checking canResurrectCheck prevents her healing Mograine while he is "faking death"
|
||||
if (canResurrectCheck && mograine->IsAlive() && !mograine->HealthAbovePct(75))
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_KIRTONOS)))
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetGuidData(GO_GATE_KIRTONOS)))
|
||||
{
|
||||
gate->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
|
||||
void EnterEvadeMode() override
|
||||
{
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_KIRTONOS)))
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetGuidData(GO_GATE_KIRTONOS)))
|
||||
{
|
||||
gate->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
me->GetMotionMaster()->MovePoint(0, PosMove[0]);
|
||||
break;
|
||||
case INTRO_3:
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_KIRTONOS)))
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetGuidData(GO_GATE_KIRTONOS)))
|
||||
{
|
||||
gate->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
@@ -24,13 +24,6 @@ public:
|
||||
struct instance_scholomance_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_scholomance_InstanceMapScript(Map* map) : InstanceScript(map),
|
||||
GateKirtonosGUID { 0 },
|
||||
GateMiliciaGUID { 0 },
|
||||
GateTheolenGUID { 0 },
|
||||
GatePolkeltGUID { 0 },
|
||||
GateRavenianGUID { 0 },
|
||||
GateBarovGUID { 0 },
|
||||
GateIlluciaGUID { 0 },
|
||||
_kirtonosState { 0 },
|
||||
_miniBosses { 0 },
|
||||
_rasHuman { 0 }
|
||||
@@ -64,7 +57,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type) const override
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -84,7 +77,7 @@ public:
|
||||
return GateIlluciaGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data) override
|
||||
@@ -146,13 +139,13 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
uint64 GateKirtonosGUID;
|
||||
uint64 GateMiliciaGUID;
|
||||
uint64 GateTheolenGUID;
|
||||
uint64 GatePolkeltGUID;
|
||||
uint64 GateRavenianGUID;
|
||||
uint64 GateBarovGUID;
|
||||
uint64 GateIlluciaGUID;
|
||||
ObjectGuid GateKirtonosGUID;
|
||||
ObjectGuid GateMiliciaGUID;
|
||||
ObjectGuid GateTheolenGUID;
|
||||
ObjectGuid GatePolkeltGUID;
|
||||
ObjectGuid GateRavenianGUID;
|
||||
ObjectGuid GateBarovGUID;
|
||||
ObjectGuid GateIlluciaGUID;
|
||||
|
||||
uint32 _kirtonosState;
|
||||
uint32 _miniBosses;
|
||||
@@ -291,37 +284,37 @@ public:
|
||||
{
|
||||
case ROOM_HALL_OF_SECRETS:
|
||||
if (InstanceScript* instance = caster->GetInstanceScript())
|
||||
if (GameObject* gate = ObjectAccessor::GetGameObject(*caster, instance->GetData64(GO_GATE_RAVENIAN)))
|
||||
if (GameObject* gate = ObjectAccessor::GetGameObject(*caster, instance->GetGuidData(GO_GATE_RAVENIAN)))
|
||||
if (gate->GetGoState() == GO_STATE_ACTIVE)
|
||||
spellId = SPELL_SHADOW_PORTAL_HALLOFSECRETS;
|
||||
break;
|
||||
case ROOM_HALL_OF_THE_DAMNED:
|
||||
if (InstanceScript* instance = caster->GetInstanceScript())
|
||||
if (GameObject* gate = ObjectAccessor::GetGameObject(*caster, instance->GetData64(GO_GATE_THEOLEN)))
|
||||
if (GameObject* gate = ObjectAccessor::GetGameObject(*caster, instance->GetGuidData(GO_GATE_THEOLEN)))
|
||||
if (gate->GetGoState() == GO_STATE_ACTIVE)
|
||||
spellId = SPELL_SHADOW_PORTAL_HALLOFTHEDAMNED;
|
||||
break;
|
||||
case ROOM_THE_COVEN:
|
||||
if (InstanceScript* instance = caster->GetInstanceScript())
|
||||
if (GameObject* gate = ObjectAccessor::GetGameObject(*caster, instance->GetData64(GO_GATE_MALICIA)))
|
||||
if (GameObject* gate = ObjectAccessor::GetGameObject(*caster, instance->GetGuidData(GO_GATE_MALICIA)))
|
||||
if (gate->GetGoState() == GO_STATE_ACTIVE)
|
||||
spellId = SPELL_SHADOW_PORTAL_THECOVEN;
|
||||
break;
|
||||
case ROOM_THE_SHADOW_VAULT:
|
||||
if (InstanceScript* instance = caster->GetInstanceScript())
|
||||
if (GameObject* gate = ObjectAccessor::GetGameObject(*caster, instance->GetData64(GO_GATE_ILLUCIA)))
|
||||
if (GameObject* gate = ObjectAccessor::GetGameObject(*caster, instance->GetGuidData(GO_GATE_ILLUCIA)))
|
||||
if (gate->GetGoState() == GO_STATE_ACTIVE)
|
||||
spellId = SPELL_SHADOW_PORTAL_THESHADOWVAULT;
|
||||
break;
|
||||
case ROOM_BAROV_FAMILY_VAULT:
|
||||
if (InstanceScript* instance = caster->GetInstanceScript())
|
||||
if (GameObject* gate = ObjectAccessor::GetGameObject(*caster, instance->GetData64(GO_GATE_BAROV)))
|
||||
if (GameObject* gate = ObjectAccessor::GetGameObject(*caster, instance->GetGuidData(GO_GATE_BAROV)))
|
||||
if (gate->GetGoState() == GO_STATE_ACTIVE)
|
||||
spellId = SPELL_SHADOW_PORTAL_BAROVFAMILYVAULT;
|
||||
break;
|
||||
case ROOM_VAULT_OF_THE_RAVENIAN:
|
||||
if (InstanceScript* instance = caster->GetInstanceScript())
|
||||
if (GameObject* gate = ObjectAccessor::GetGameObject(*caster, instance->GetData64(GO_GATE_POLKELT)))
|
||||
if (GameObject* gate = ObjectAccessor::GetGameObject(*caster, instance->GetGuidData(GO_GATE_POLKELT)))
|
||||
if (gate->GetGoState() == GO_STATE_ACTIVE)
|
||||
spellId = SPELL_SHADOW_PORTAL_VAULTOFTHERAVENIAN;
|
||||
break;
|
||||
@@ -442,7 +435,7 @@ public:
|
||||
}
|
||||
|
||||
if (InstanceScript* instance = GetCaster()->GetInstanceScript())
|
||||
if (GameObject* gate = ObjectAccessor::GetGameObject(*caster, instance->GetData64(gateId)))
|
||||
if (GameObject* gate = ObjectAccessor::GetGameObject(*caster, instance->GetGuidData(gateId)))
|
||||
{
|
||||
gate->SetGoState(GO_STATE_READY);
|
||||
gate->AI()->SetData(1, 1);
|
||||
|
||||
@@ -40,15 +40,15 @@ public:
|
||||
{
|
||||
case GO_COURTYARD_DOOR:
|
||||
if (_encounters[TYPE_COURTYARD] == DONE)
|
||||
HandleGameObject(0, true, gameobject);
|
||||
HandleGameObject(ObjectGuid::Empty, true, gameobject);
|
||||
break;
|
||||
case GO_SORCERER_DOOR:
|
||||
if (_encounters[TYPE_FENRUS_THE_DEVOURER] == DONE)
|
||||
HandleGameObject(0, true, gameobject);
|
||||
HandleGameObject(ObjectGuid::Empty, true, gameobject);
|
||||
break;
|
||||
case GO_ARUGAL_DOOR:
|
||||
if (_encounters[TYPE_WOLF_MASTER_NANDOS] == DONE)
|
||||
HandleGameObject(0, true, gameobject);
|
||||
HandleGameObject(ObjectGuid::Empty, true, gameobject);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,15 +60,6 @@ public:
|
||||
_slaughterNPCs = 0;
|
||||
_postboxesOpened = 0;
|
||||
|
||||
_zigguratDoorsGUID1 = 0;
|
||||
_zigguratDoorsGUID2 = 0;
|
||||
_zigguratDoorsGUID3 = 0;
|
||||
_zigguratDoorsGUID4 = 0;
|
||||
_zigguratDoorsGUID5 = 0;
|
||||
_gauntletGateGUID = 0;
|
||||
_slaughterGateGUID = 0;
|
||||
_baronRivendareGUID = 0;
|
||||
|
||||
_gateTrapsCooldown[0] = false;
|
||||
_gateTrapsCooldown[1] = false;
|
||||
|
||||
@@ -546,18 +537,18 @@ public:
|
||||
uint32 _postboxesOpened;
|
||||
EventMap events;
|
||||
|
||||
uint64 _zigguratDoorsGUID1;
|
||||
uint64 _zigguratDoorsGUID2;
|
||||
uint64 _zigguratDoorsGUID3;
|
||||
uint64 _zigguratDoorsGUID4;
|
||||
uint64 _zigguratDoorsGUID5;
|
||||
uint64 _slaughterGateGUID;
|
||||
uint64 _gauntletGateGUID;
|
||||
uint64 _baronRivendareGUID;
|
||||
ObjectGuid _zigguratDoorsGUID1;
|
||||
ObjectGuid _zigguratDoorsGUID2;
|
||||
ObjectGuid _zigguratDoorsGUID3;
|
||||
ObjectGuid _zigguratDoorsGUID4;
|
||||
ObjectGuid _zigguratDoorsGUID5;
|
||||
ObjectGuid _slaughterGateGUID;
|
||||
ObjectGuid _gauntletGateGUID;
|
||||
ObjectGuid _baronRivendareGUID;
|
||||
|
||||
bool _gateTrapsCooldown[2];
|
||||
uint64 _trappedPlayerGUID;
|
||||
uint64 _trapGatesGUIDs[4];
|
||||
ObjectGuid _trappedPlayerGUID;
|
||||
ObjectGuid _trapGatesGUIDs[4];
|
||||
|
||||
void gate_delay(int gate)
|
||||
{
|
||||
@@ -575,7 +566,7 @@ public:
|
||||
{
|
||||
if (_trappedPlayerGUID)
|
||||
{
|
||||
if (Player* pPlayer = instance->GetPlayer(_trappedPlayerGUID))
|
||||
if (Player* pPlayer = ObjectAccessor::GetPlayer(instance, _trappedPlayerGUID))
|
||||
{
|
||||
DoSpawnPlaguedCritters(gate, pPlayer);
|
||||
}
|
||||
|
||||
@@ -25,9 +25,6 @@ public:
|
||||
_statuePhase = 0;
|
||||
_defendersKilled = 0;
|
||||
memset(&_encounters, 0, sizeof(_encounters));
|
||||
|
||||
_forcefieldGUID = 0;
|
||||
_jammalanGUID = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
@@ -39,7 +36,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if (creature->IsAlive() && creature->GetDBTableGUIDLow() && creature->GetCreatureType() == CREATURE_TYPE_DRAGONKIN && creature->GetEntry() != NPC_SHADE_OF_ERANIKUS)
|
||||
if (creature->IsAlive() && creature->GetSpawnId() && creature->GetCreatureType() == CREATURE_TYPE_DRAGONKIN && creature->GetEntry() != NPC_SHADE_OF_ERANIKUS)
|
||||
_dragonkinList.push_back(creature->GetGUID());
|
||||
}
|
||||
|
||||
@@ -99,9 +96,9 @@ public:
|
||||
}
|
||||
break;
|
||||
case DATA_ERANIKUS_FIGHT:
|
||||
for (std::list<uint64>::const_iterator itr = _dragonkinList.begin(); itr != _dragonkinList.end(); ++itr)
|
||||
for (ObjectGuid const guid : _dragonkinList)
|
||||
{
|
||||
if (Creature* creature = instance->GetCreature(*itr))
|
||||
if (Creature* creature = instance->GetCreature(guid))
|
||||
if (instance->IsGridLoaded(creature->GetPositionX(), creature->GetPositionY()))
|
||||
creature->SetInCombatWithZone();
|
||||
}
|
||||
@@ -180,9 +177,9 @@ public:
|
||||
uint32 _defendersKilled;
|
||||
uint32 _encounters[MAX_ENCOUNTERS];
|
||||
|
||||
uint64 _forcefieldGUID;
|
||||
uint64 _jammalanGUID;
|
||||
std::list<uint64> _dragonkinList;
|
||||
ObjectGuid _forcefieldGUID;
|
||||
ObjectGuid _jammalanGUID;
|
||||
GuidList _dragonkinList;
|
||||
EventMap _events;
|
||||
};
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
Talk(YELL_DEATH);
|
||||
|
||||
me->CastSpell(me, SPELL_SUMMON_BRUTALLUS_DEATH_CLOUD, true);
|
||||
if (Creature* madrigosa = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_MADRIGOSA)))
|
||||
if (Creature* madrigosa = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_MADRIGOSA)))
|
||||
madrigosa->AI()->DoAction(ACTION_SPAWN_FELMYST);
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ public:
|
||||
{
|
||||
case EVENT_MAD_1:
|
||||
me->SetVisible(true);
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_BRUTALLUS)))
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRUTALLUS)))
|
||||
{
|
||||
me->SetTarget(brutallus->GetGUID());
|
||||
brutallus->SetReactState(REACT_PASSIVE);
|
||||
@@ -256,12 +256,12 @@ public:
|
||||
events.ScheduleEvent(EVENT_MAD_4, 7000);
|
||||
break;
|
||||
case EVENT_MAD_4:
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_BRUTALLUS)))
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRUTALLUS)))
|
||||
brutallus->AI()->Talk(YELL_INTRO);
|
||||
events.ScheduleEvent(EVENT_MAD_5, 5000);
|
||||
break;
|
||||
case EVENT_MAD_5:
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_BRUTALLUS)))
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRUTALLUS)))
|
||||
{
|
||||
brutallus->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK1H);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK1H);
|
||||
@@ -269,7 +269,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_MAD_6, 10000);
|
||||
break;
|
||||
case EVENT_MAD_6:
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_BRUTALLUS)))
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRUTALLUS)))
|
||||
{
|
||||
brutallus->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
@@ -292,11 +292,11 @@ public:
|
||||
events.ScheduleEvent(EVENT_MAD_8, 14000);
|
||||
break;
|
||||
case EVENT_MAD_8:
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_BRUTALLUS)))
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRUTALLUS)))
|
||||
me->CastSpell(brutallus, SPELL_MADRIGOSA_FROSTBOLT, false);
|
||||
break;
|
||||
case EVENT_MAD_9:
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_BRUTALLUS)))
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRUTALLUS)))
|
||||
{
|
||||
brutallus->CastSpell(brutallus, SPELL_BRUTALLUS_FLAME_RING, true);
|
||||
brutallus->RemoveAllAuras();
|
||||
@@ -318,7 +318,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_MAD_14, 2000);
|
||||
break;
|
||||
case EVENT_MAD_14:
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_BRUTALLUS)))
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRUTALLUS)))
|
||||
{
|
||||
brutallus->SetDisableGravity(true);
|
||||
brutallus->GetMotionMaster()->MovePoint(0, brutallus->GetPositionX(), brutallus->GetPositionY() - 30.0f, brutallus->GetPositionZ() + 15.0f, false, true);
|
||||
@@ -326,7 +326,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_MAD_15, 10000);
|
||||
break;
|
||||
case EVENT_MAD_15:
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_BRUTALLUS)))
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRUTALLUS)))
|
||||
{
|
||||
brutallus->RemoveAllAuras();
|
||||
brutallus->SetDisableGravity(false);
|
||||
@@ -336,12 +336,12 @@ public:
|
||||
events.ScheduleEvent(EVENT_MAD_16, 1400);
|
||||
break;
|
||||
case EVENT_MAD_16:
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_BRUTALLUS)))
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRUTALLUS)))
|
||||
brutallus->CastSpell(me, SPELL_BRUTALLUS_CHARGE, true);
|
||||
events.ScheduleEvent(EVENT_MAD_17, 1200);
|
||||
break;
|
||||
case EVENT_MAD_17:
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_BRUTALLUS)))
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRUTALLUS)))
|
||||
brutallus->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK1H);
|
||||
events.ScheduleEvent(EVENT_MAD_18, 500);
|
||||
break;
|
||||
@@ -352,14 +352,14 @@ public:
|
||||
events.ScheduleEvent(EVENT_MAD_19, 6000);
|
||||
break;
|
||||
case EVENT_MAD_19:
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_BRUTALLUS)))
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRUTALLUS)))
|
||||
brutallus->AI()->Talk(YELL_INTRO_KILL_MADRIGOSA);
|
||||
events.ScheduleEvent(EVENT_MAD_20, 7000);
|
||||
break;
|
||||
case EVENT_MAD_20:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->setFaction(35);
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_BRUTALLUS)))
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRUTALLUS)))
|
||||
{
|
||||
brutallus->AI()->Talk(YELL_INTRO_TAUNT);
|
||||
brutallus->CastSpell(brutallus, SPELL_BRUTALLUS_BREAK_ICE, false);
|
||||
@@ -367,7 +367,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_MAD_21, 4000);
|
||||
break;
|
||||
case EVENT_MAD_21:
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_BRUTALLUS)))
|
||||
if (Creature* brutallus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRUTALLUS)))
|
||||
{
|
||||
brutallus->SetReactState(REACT_AGGRESSIVE);
|
||||
brutallus->SetHealth(brutallus->GetMaxHealth());
|
||||
@@ -377,7 +377,7 @@ public:
|
||||
break;
|
||||
case EVENT_SPAWN_FELMYST:
|
||||
me->DespawnOrUnsummon(1);
|
||||
if (Creature* felmyst = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_FELMYST)))
|
||||
if (Creature* felmyst = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_FELMYST)))
|
||||
felmyst->AI()->DoAction(ACTION_START_EVENT);
|
||||
break;
|
||||
}
|
||||
@@ -517,7 +517,7 @@ public:
|
||||
{
|
||||
instance->SetBossState(DATA_MADRIGOSA, NOT_STARTED);
|
||||
instance->SetBossState(DATA_MADRIGOSA, DONE);
|
||||
if (Creature* creature = ObjectAccessor::GetCreature(*player, instance->GetData64(NPC_MADRIGOSA)))
|
||||
if (Creature* creature = ObjectAccessor::GetCreature(*player, instance->GetGuidData(NPC_MADRIGOSA)))
|
||||
creature->AI()->DoAction(ACTION_START_EVENT);
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
void EnterEvadeMode() override
|
||||
{
|
||||
BossAI::EnterEvadeMode();
|
||||
if (Creature* alythess = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_GRAND_WARLOCK_ALYTHESS)))
|
||||
if (Creature* alythess = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_GRAND_WARLOCK_ALYTHESS)))
|
||||
{
|
||||
if (!alythess->IsAlive())
|
||||
alythess->Respawn(true);
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
void EnterCombat(Unit* who) override
|
||||
{
|
||||
BossAI::EnterCombat(who);
|
||||
if (Creature* alythess = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_GRAND_WARLOCK_ALYTHESS)))
|
||||
if (Creature* alythess = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_GRAND_WARLOCK_ALYTHESS)))
|
||||
if (alythess->IsAlive() && !alythess->IsInCombat())
|
||||
alythess->AI()->AttackStart(who);
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
Talk(YELL_SAC_DEAD);
|
||||
instance->SetBossState(DATA_EREDAR_TWINS, DONE);
|
||||
}
|
||||
else if (Creature* alythess = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_GRAND_WARLOCK_ALYTHESS)))
|
||||
else if (Creature* alythess = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_GRAND_WARLOCK_ALYTHESS)))
|
||||
alythess->AI()->DoAction(ACTION_SISTER_DIED);
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
void EnterEvadeMode() override
|
||||
{
|
||||
BossAI::EnterEvadeMode();
|
||||
if (Creature* scorlash = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_LADY_SACROLASH)))
|
||||
if (Creature* scorlash = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_LADY_SACROLASH)))
|
||||
{
|
||||
if (!scorlash->IsAlive())
|
||||
scorlash->Respawn(true);
|
||||
@@ -261,7 +261,7 @@ public:
|
||||
void EnterCombat(Unit* who) override
|
||||
{
|
||||
BossAI::EnterCombat(who);
|
||||
if (Creature* scorlash = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_LADY_SACROLASH)))
|
||||
if (Creature* scorlash = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_LADY_SACROLASH)))
|
||||
if (scorlash->IsAlive() && !scorlash->IsInCombat())
|
||||
scorlash->AI()->AttackStart(who);
|
||||
|
||||
@@ -288,7 +288,7 @@ public:
|
||||
Talk(YELL_SAC_DEAD);
|
||||
instance->SetBossState(DATA_EREDAR_TWINS, DONE);
|
||||
}
|
||||
else if (Creature* scorlash = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_LADY_SACROLASH)))
|
||||
else if (Creature* scorlash = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_LADY_SACROLASH)))
|
||||
scorlash->AI()->DoAction(ACTION_SISTER_DIED);
|
||||
}
|
||||
|
||||
@@ -491,9 +491,9 @@ public:
|
||||
if (instance->GetBossState(DATA_EREDAR_TWINS_INTRO) != DONE)
|
||||
{
|
||||
instance->SetBossState(DATA_EREDAR_TWINS_INTRO, DONE);
|
||||
if (Creature* creature = ObjectAccessor::GetCreature(*player, instance->GetData64(NPC_LADY_SACROLASH)))
|
||||
if (Creature* creature = ObjectAccessor::GetCreature(*player, instance->GetGuidData(NPC_LADY_SACROLASH)))
|
||||
creature->AI()->Talk(YELL_INTRO_SAC);
|
||||
if (Creature* creature = ObjectAccessor::GetCreature(*player, instance->GetData64(NPC_GRAND_WARLOCK_ALYTHESS)))
|
||||
if (Creature* creature = ObjectAccessor::GetCreature(*player, instance->GetGuidData(NPC_GRAND_WARLOCK_ALYTHESS)))
|
||||
creature->AI()->Talk(YELL_INTRO_ALY);
|
||||
}
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
}
|
||||
else if (point == POINT_AIR_BREATH_START1)
|
||||
{
|
||||
me->SetTarget(0);
|
||||
me->SetTarget();
|
||||
me->SetFacingTo(4.71f);
|
||||
events.ScheduleEvent(EVENT_FLIGHT_EMOTE, 2000);
|
||||
events.ScheduleEvent(EVENT_CORRUPT_TRIGGERS, 5000);
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
}
|
||||
else if (point == POINT_AIR_BREATH_START2)
|
||||
{
|
||||
me->SetTarget(0);
|
||||
me->SetTarget();
|
||||
me->SetFacingTo(1.57f);
|
||||
events.ScheduleEvent(EVENT_FLIGHT_EMOTE, 2000);
|
||||
events.ScheduleEvent(EVENT_CORRUPT_TRIGGERS, 5000);
|
||||
@@ -308,7 +308,7 @@ public:
|
||||
break;
|
||||
case EVENT_FLIGHT_SEQ:
|
||||
Talk(YELL_TAKEOFF);
|
||||
me->SetTarget(0);
|
||||
me->SetTarget();
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
||||
me->SetDisableGravity(true);
|
||||
me->SendMovementFlagUpdate();
|
||||
@@ -534,7 +534,7 @@ public:
|
||||
return true;
|
||||
|
||||
Creature* cr = object->ToCreature();
|
||||
return cr->GetDBTableGUIDLow() != 54780 && cr->GetDBTableGUIDLow() != 54787 && cr->GetDBTableGUIDLow() != 54801;
|
||||
return cr->GetSpawnId() != 54780 && cr->GetSpawnId() != 54787 && cr->GetSpawnId() != 54801;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
events.Reset();
|
||||
events2.ScheduleEvent(EVENT_TALK_GOOD_1, 1000);
|
||||
ClearPlayerAuras();
|
||||
if (Creature* Sath = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_SATHROVARR)))
|
||||
if (Creature* Sath = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_SATHROVARR)))
|
||||
{
|
||||
Sath->RemoveAllAuras();
|
||||
Sath->GetMotionMaster()->MovementExpired();
|
||||
@@ -232,7 +232,7 @@ public:
|
||||
events2.ScheduleEvent(EVENT_TALK_GOOD_2, 1000);
|
||||
break;
|
||||
case EVENT_TALK_GOOD_2:
|
||||
if (Creature* Sath = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_SATHROVARR)))
|
||||
if (Creature* Sath = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_SATHROVARR)))
|
||||
{
|
||||
summons.Despawn(Sath);
|
||||
Unit::Kill(me, Sath);
|
||||
@@ -318,7 +318,7 @@ public:
|
||||
case EVENT_CHECK_HEALTH:
|
||||
if (me->HealthBelowPct(10))
|
||||
{
|
||||
if (Creature* Sath = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_SATHROVARR)))
|
||||
if (Creature* Sath = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_SATHROVARR)))
|
||||
Sath->AI()->DoAction(ACTION_ENRAGE_OTHER);
|
||||
DoAction(ACTION_ENRAGE);
|
||||
break;
|
||||
@@ -408,7 +408,7 @@ public:
|
||||
void JustDied(Unit*) override
|
||||
{
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
if (Creature* kalecgos = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_KALECGOS)))
|
||||
if (Creature* kalecgos = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_KALECGOS)))
|
||||
kalecgos->AI()->DoAction(ACTION_KALEC_DIED);
|
||||
}
|
||||
|
||||
@@ -577,7 +577,7 @@ public:
|
||||
if (me->HealthBelowPct(10))
|
||||
{
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
if (Creature* kalecgos = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_KALECGOS)))
|
||||
if (Creature* kalecgos = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_KALECGOS)))
|
||||
kalecgos->AI()->DoAction(ACTION_ENRAGE_OTHER);
|
||||
DoAction(ACTION_ENRAGE);
|
||||
break;
|
||||
@@ -587,7 +587,7 @@ public:
|
||||
case EVENT_CHECK_HEALTH2:
|
||||
if (me->HealthBelowPct(1))
|
||||
{
|
||||
if (Creature* kalecgos = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_KALECGOS)))
|
||||
if (Creature* kalecgos = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_KALECGOS)))
|
||||
kalecgos->AI()->DoAction(ACTION_SATH_BANISH);
|
||||
DoAction(ACTION_BANISH);
|
||||
break;
|
||||
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
void ResetOrbs()
|
||||
{
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (GameObject* orb = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_1 + i)))
|
||||
if (GameObject* orb = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_1 + i)))
|
||||
orb->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ public:
|
||||
{
|
||||
if (damage >= me->GetHealth())
|
||||
{
|
||||
me->SetTarget(0);
|
||||
me->SetTarget();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->RemoveAllAuras();
|
||||
me->DeleteThreatList();
|
||||
@@ -332,7 +332,7 @@ public:
|
||||
{
|
||||
Talk(SAY_KJ_DEATH);
|
||||
instance->SetBossState(DATA_KILJAEDEN, DONE);
|
||||
if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_KILJAEDEN_CONTROLLER)))
|
||||
if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_KILJAEDEN_CONTROLLER)))
|
||||
Unit::Kill(controller, controller);
|
||||
}
|
||||
|
||||
@@ -392,17 +392,17 @@ public:
|
||||
me->CastSpell(me, SPELL_REBIRTH, false);
|
||||
break;
|
||||
case EVENT_EMPOWER_ORBS1:
|
||||
if (Creature* kalec = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_KALECGOS_KJ)))
|
||||
if (Creature* kalec = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_KALECGOS_KJ)))
|
||||
kalec->AI()->Talk(SAY_KALECGOS_READY1);
|
||||
EmpowerOrb(false);
|
||||
break;
|
||||
case EVENT_EMPOWER_ORBS2:
|
||||
if (Creature* kalec = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_KALECGOS_KJ)))
|
||||
if (Creature* kalec = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_KALECGOS_KJ)))
|
||||
kalec->AI()->Talk(SAY_KALECGOS_READY2);
|
||||
EmpowerOrb(false);
|
||||
break;
|
||||
case EVENT_EMPOWER_ORBS3:
|
||||
if (Creature* kalec = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_KALECGOS_KJ)))
|
||||
if (Creature* kalec = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_KALECGOS_KJ)))
|
||||
kalec->AI()->Talk(SAY_KALECGOS_READY_ALL);
|
||||
EmpowerOrb(true);
|
||||
break;
|
||||
@@ -412,56 +412,56 @@ public:
|
||||
me->SetInCombatWithZone();
|
||||
return;
|
||||
case EVENT_TEXT_SPEACH11:
|
||||
if (Creature* kalec = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_KALECGOS_KJ)))
|
||||
if (Creature* kalec = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_KALECGOS_KJ)))
|
||||
kalec->AI()->Talk(SAY_KALECGOS_JOIN);
|
||||
break;
|
||||
case EVENT_TEXT_SPEACH21:
|
||||
if (Creature* kalec = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_KALECGOS_KJ)))
|
||||
if (Creature* kalec = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_KALECGOS_KJ)))
|
||||
kalec->AI()->Talk(SAY_KALECGOS_AWAKEN);
|
||||
break;
|
||||
case EVENT_TEXT_SPEACH22:
|
||||
if (Creature* anveena = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_ANVEENA)))
|
||||
if (Creature* anveena = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_ANVEENA)))
|
||||
sCreatureTextMgr->SendChat(anveena, SAY_ANVEENA_IMPRISONED, nullptr, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_ZONE);
|
||||
break;
|
||||
case EVENT_TEXT_SPEACH23:
|
||||
Talk(SAY_KJ_PHASE3);
|
||||
break;
|
||||
case EVENT_TEXT_SPEACH31:
|
||||
if (Creature* kalec = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_KALECGOS_KJ)))
|
||||
if (Creature* kalec = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_KALECGOS_KJ)))
|
||||
kalec->AI()->Talk(SAY_KALECGOS_LETGO);
|
||||
break;
|
||||
case EVENT_TEXT_SPEACH32:
|
||||
if (Creature* anveena = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_ANVEENA)))
|
||||
if (Creature* anveena = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_ANVEENA)))
|
||||
sCreatureTextMgr->SendChat(anveena, SAY_ANVEENA_LOST, nullptr, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_ZONE);
|
||||
break;
|
||||
case EVENT_TEXT_SPEACH33:
|
||||
Talk(SAY_KJ_PHASE4);
|
||||
break;
|
||||
case EVENT_TEXT_SPEACH41:
|
||||
if (Creature* kalec = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_KALECGOS_KJ)))
|
||||
if (Creature* kalec = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_KALECGOS_KJ)))
|
||||
kalec->AI()->Talk(SAY_KALECGOS_FOCUS);
|
||||
break;
|
||||
case EVENT_TEXT_SPEACH42:
|
||||
if (Creature* anveena = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_ANVEENA)))
|
||||
if (Creature* anveena = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_ANVEENA)))
|
||||
sCreatureTextMgr->SendChat(anveena, SAY_ANVEENA_KALEC, nullptr, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_ZONE);
|
||||
break;
|
||||
case EVENT_TEXT_SPEACH43:
|
||||
if (Creature* kalec = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_KALECGOS_KJ)))
|
||||
if (Creature* kalec = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_KALECGOS_KJ)))
|
||||
kalec->AI()->Talk(SAY_KALECGOS_FATE);
|
||||
break;
|
||||
case EVENT_TEXT_SPEACH44:
|
||||
if (Creature* anveena = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_ANVEENA)))
|
||||
if (Creature* anveena = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_ANVEENA)))
|
||||
sCreatureTextMgr->SendChat(anveena, SAY_ANVEENA_GOODBYE, nullptr, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_ZONE);
|
||||
break;
|
||||
case EVENT_TEXT_SPEACH45:
|
||||
if (Creature* anveena = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_ANVEENA)))
|
||||
if (Creature* anveena = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_ANVEENA)))
|
||||
{
|
||||
anveena->RemoveAllAuras();
|
||||
anveena->DespawnOrUnsummon(3500);
|
||||
}
|
||||
break;
|
||||
case EVENT_TEXT_SPEACH46:
|
||||
if (Creature* anveena = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_ANVEENA)))
|
||||
if (Creature* anveena = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_ANVEENA)))
|
||||
{
|
||||
anveena->CastSpell(anveena, SPELL_SACRIFICE_OF_ANVEENA, true);
|
||||
me->CastSpell(me, SPELL_CUSTOM_08_STATE, true);
|
||||
@@ -628,7 +628,7 @@ public:
|
||||
{
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
if (GameObject* orb = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_1 + i)))
|
||||
if (GameObject* orb = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_1 + i)))
|
||||
{
|
||||
if (orb->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE))
|
||||
{
|
||||
@@ -636,7 +636,7 @@ public:
|
||||
if (Creature* trigger = me->SummonTrigger(orb->GetPositionX(), orb->GetPositionY(), orb->GetPositionZ(), 0, 10 * MINUTE * IN_MILLISECONDS))
|
||||
{
|
||||
trigger->CastSpell(trigger, SPELL_RING_OF_BLUE_FLAMES, true, nullptr, nullptr, trigger->GetGUID());
|
||||
if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_KILJAEDEN_CONTROLLER)))
|
||||
if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_KILJAEDEN_CONTROLLER)))
|
||||
controller->AI()->JustSummoned(trigger);
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
void EnterEvadeMode() override
|
||||
{
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
if (Creature* muru = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_MURU)))
|
||||
if (Creature* muru = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_MURU)))
|
||||
if (!muru->IsInEvadeMode())
|
||||
muru->AI()->EnterEvadeMode();
|
||||
|
||||
@@ -195,7 +195,7 @@ public:
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
if (Creature* muru = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_MURU)))
|
||||
if (Creature* muru = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_MURU)))
|
||||
Unit::Kill(muru, muru);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,22 +29,6 @@ public:
|
||||
{
|
||||
SetBossNumber(MAX_ENCOUNTERS);
|
||||
LoadDoorData(doorData);
|
||||
|
||||
KalecgosDragonGUID = 0;
|
||||
SathrovarrGUID = 0;
|
||||
BrutallusGUID = 0;
|
||||
MadrigosaGUID = 0;
|
||||
FelmystGUID = 0;
|
||||
AlythessGUID = 0;
|
||||
SacrolashGUID = 0;
|
||||
MuruGUID = 0;
|
||||
KilJaedenGUID = 0;
|
||||
KilJaedenControllerGUID = 0;
|
||||
AnveenaGUID = 0;
|
||||
KalecgosKjGUID = 0;
|
||||
|
||||
IceBarrierGUID = 0;
|
||||
memset(&blueFlightOrbGUID, 0, sizeof(blueFlightOrbGUID));
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Player* player) override
|
||||
@@ -64,7 +48,7 @@ public:
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
Player* player = itr->GetSource();
|
||||
if (player && !player->HasAura(45839, 0))
|
||||
if (player && !player->HasAura(45839))
|
||||
return player;
|
||||
}
|
||||
}
|
||||
@@ -76,7 +60,7 @@ public:
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
if (creature->GetDBTableGUIDLow() > 0 || !IS_PLAYER_GUID(creature->GetOwnerGUID()))
|
||||
if (creature->GetSpawnId() > 0 || !creature->GetOwnerGUID().IsPlayer())
|
||||
creature->CastSpell(creature, SPELL_SUNWELL_RADIANCE, true);
|
||||
|
||||
switch (creature->GetEntry())
|
||||
@@ -196,7 +180,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 id) const override
|
||||
ObjectGuid GetGuidData(uint32 id) const override
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
@@ -232,7 +216,8 @@ public:
|
||||
case DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_4:
|
||||
return blueFlightOrbGUID[id - DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_1];
|
||||
}
|
||||
return 0;
|
||||
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
std::string GetSaveData() override
|
||||
@@ -279,21 +264,21 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
uint64 KalecgosDragonGUID;
|
||||
uint64 SathrovarrGUID;
|
||||
uint64 BrutallusGUID;
|
||||
uint64 MadrigosaGUID;
|
||||
uint64 FelmystGUID;
|
||||
uint64 AlythessGUID;
|
||||
uint64 SacrolashGUID;
|
||||
uint64 MuruGUID;
|
||||
uint64 KilJaedenGUID;
|
||||
uint64 KilJaedenControllerGUID;
|
||||
uint64 AnveenaGUID;
|
||||
uint64 KalecgosKjGUID;
|
||||
ObjectGuid KalecgosDragonGUID;
|
||||
ObjectGuid SathrovarrGUID;
|
||||
ObjectGuid BrutallusGUID;
|
||||
ObjectGuid MadrigosaGUID;
|
||||
ObjectGuid FelmystGUID;
|
||||
ObjectGuid AlythessGUID;
|
||||
ObjectGuid SacrolashGUID;
|
||||
ObjectGuid MuruGUID;
|
||||
ObjectGuid KilJaedenGUID;
|
||||
ObjectGuid KilJaedenControllerGUID;
|
||||
ObjectGuid AnveenaGUID;
|
||||
ObjectGuid KalecgosKjGUID;
|
||||
|
||||
uint64 IceBarrierGUID;
|
||||
uint64 blueFlightOrbGUID[4];
|
||||
ObjectGuid IceBarrierGUID;
|
||||
ObjectGuid blueFlightOrbGUID[4];
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
|
||||
@@ -31,8 +31,6 @@ public:
|
||||
void Initialize() override
|
||||
{
|
||||
memset(&_encounters, 0, sizeof(_encounters));
|
||||
archaedasTempleDoorGUID = 0;
|
||||
ancientVaultDoorGUID = 0;
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* gameobject) override
|
||||
@@ -43,18 +41,18 @@ public:
|
||||
case GO_KEYSTONE:
|
||||
if (_encounters[DATA_IRONAYA_DOORS] == DONE)
|
||||
{
|
||||
HandleGameObject(0, true, gameobject);
|
||||
HandleGameObject(ObjectGuid::Empty, true, gameobject);
|
||||
gameobject->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
break;
|
||||
case GO_TEMPLE_DOOR:
|
||||
if (_encounters[DATA_STONE_KEEPERS] == DONE)
|
||||
HandleGameObject(0, true, gameobject);
|
||||
HandleGameObject(ObjectGuid::Empty, true, gameobject);
|
||||
break;
|
||||
case GO_ANCIENT_VAULT_DOOR:
|
||||
ancientVaultDoorGUID = gameobject->GetGUID();
|
||||
if (_encounters[DATA_ARCHAEDAS] == DONE)
|
||||
HandleGameObject(0, true, gameobject);
|
||||
HandleGameObject(ObjectGuid::Empty, true, gameobject);
|
||||
break;
|
||||
case GO_ARCHAEDAS_TEMPLE_DOOR:
|
||||
archaedasTempleDoorGUID = gameobject->GetGUID();
|
||||
@@ -121,8 +119,8 @@ public:
|
||||
|
||||
private:
|
||||
uint32 _encounters[MAX_ENCOUNTERS];
|
||||
uint64 archaedasTempleDoorGUID;
|
||||
uint64 ancientVaultDoorGUID;
|
||||
ObjectGuid archaedasTempleDoorGUID;
|
||||
ObjectGuid ancientVaultDoorGUID;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
|
||||
@@ -76,17 +76,19 @@ public:
|
||||
{
|
||||
boss_akilzonAI(Creature* creature) : BossAI(creature, DATA_AKILZONEVENT)
|
||||
{
|
||||
memset(BirdGUIDs, 0, sizeof(BirdGUIDs));
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
|
||||
TargetGUID = 0;
|
||||
CloudGUID = 0;
|
||||
CycloneGUID = 0;
|
||||
memset(BirdGUIDs, 0, sizeof(BirdGUIDs));
|
||||
TargetGUID.Clear();
|
||||
CloudGUID.Clear();
|
||||
CycloneGUID.Clear();
|
||||
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
BirdGUIDs[i].Clear();
|
||||
|
||||
StormCount = 0;
|
||||
isRaining = false;
|
||||
|
||||
@@ -200,7 +202,7 @@ public:
|
||||
StormCount = 0; // finish
|
||||
events.ScheduleEvent(EVENT_SUMMON_EAGLES, 5000);
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
CloudGUID = 0;
|
||||
CloudGUID.Clear();
|
||||
if (Cloud)
|
||||
Unit::DealDamage(Cloud, Cloud, Cloud->GetHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false);
|
||||
SetWeather(WEATHER_STATE_FINE, 0.0f);
|
||||
@@ -353,10 +355,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 BirdGUIDs[8];
|
||||
uint64 TargetGUID;
|
||||
uint64 CycloneGUID;
|
||||
uint64 CloudGUID;
|
||||
ObjectGuid BirdGUIDs[8];
|
||||
ObjectGuid TargetGUID;
|
||||
ObjectGuid CycloneGUID;
|
||||
ObjectGuid CloudGUID;
|
||||
uint8 StormCount;
|
||||
bool isRaining;
|
||||
};
|
||||
@@ -378,13 +380,13 @@ public:
|
||||
|
||||
uint32 EagleSwoop_Timer;
|
||||
bool arrived;
|
||||
uint64 TargetGUID;
|
||||
ObjectGuid TargetGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
EagleSwoop_Timer = urand(5000, 10000);
|
||||
arrived = true;
|
||||
TargetGUID = 0;
|
||||
TargetGUID.Clear();
|
||||
me->SetDisableGravity(true);
|
||||
}
|
||||
|
||||
@@ -402,7 +404,7 @@ public:
|
||||
{
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*me, TargetGUID))
|
||||
DoCast(target, SPELL_EAGLE_SWOOP, true);
|
||||
TargetGUID = 0;
|
||||
TargetGUID.Clear();
|
||||
me->SetSpeed(MOVE_RUN, 1.2f);
|
||||
EagleSwoop_Timer = urand(5000, 10000);
|
||||
}
|
||||
|
||||
@@ -77,14 +77,14 @@ public:
|
||||
uint32 BerserkTimer;
|
||||
uint32 TransformCount;
|
||||
|
||||
uint64 LynxGUID;
|
||||
ObjectGuid LynxGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
instance->SetData(DATA_HALAZZIEVENT, NOT_STARTED);
|
||||
summons.DespawnAll();
|
||||
|
||||
LynxGUID = 0;
|
||||
LynxGUID.Clear();
|
||||
TransformCount = 0;
|
||||
BerserkTimer = 600000;
|
||||
CheckTimer = 1000;
|
||||
|
||||
@@ -247,16 +247,14 @@ public:
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
SelectAddEntry();
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
AddGUID[i] = 0;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 AddGUID[4];
|
||||
ObjectGuid AddGUID[4];
|
||||
uint32 AddEntry[4];
|
||||
|
||||
uint64 PlayerGUID;
|
||||
ObjectGuid PlayerGUID;
|
||||
|
||||
uint32 SpiritBolts_Timer;
|
||||
uint32 DrainPower_Timer;
|
||||
@@ -433,7 +431,7 @@ public:
|
||||
trigger->GetMotionMaster()->MoveChase(me);
|
||||
|
||||
//DoCast(target, SPELL_SIPHON_SOUL, true);
|
||||
//me->SetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT, target->GetGUID());
|
||||
//me->SetGuidValue(UNIT_FIELD_CHANNEL_OBJECT, target->GetGUID());
|
||||
//me->SetUInt32Value(UNIT_CHANNEL_SPELL, SPELL_SIPHON_SOUL);
|
||||
|
||||
PlayerGUID = target->GetGUID();
|
||||
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
|
||||
bool isFlameBreathing;
|
||||
|
||||
uint64 FireBombGUIDs[40];
|
||||
ObjectGuid FireBombGUIDs[40];
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
isFlameBreathing = false;
|
||||
|
||||
for (uint8 i = 0; i < 40; ++i)
|
||||
FireBombGUIDs[i] = 0;
|
||||
FireBombGUIDs[i].Clear();
|
||||
|
||||
HatchAllEggs(1);
|
||||
}
|
||||
|
||||
@@ -127,9 +127,9 @@ public:
|
||||
}
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 SpiritGUID[4];
|
||||
uint64 ClawTargetGUID;
|
||||
uint64 TankGUID;
|
||||
ObjectGuid SpiritGUID[4];
|
||||
ObjectGuid ClawTargetGUID;
|
||||
ObjectGuid TankGUID;
|
||||
|
||||
uint32 Phase;
|
||||
uint32 health_20;
|
||||
@@ -180,8 +180,8 @@ public:
|
||||
Flame_Breath_Timer = 6000;
|
||||
Pillar_Of_Fire_Timer = 7000;
|
||||
|
||||
ClawTargetGUID = 0;
|
||||
TankGUID = 0;
|
||||
ClawTargetGUID.Clear();
|
||||
TankGUID.Clear();
|
||||
|
||||
Summons.DespawnAll();
|
||||
|
||||
@@ -278,7 +278,7 @@ public:
|
||||
temp->setDeathState(DEAD);
|
||||
}
|
||||
}
|
||||
SpiritGUID[i] = 0;
|
||||
SpiritGUID[i].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -449,7 +449,7 @@ public:
|
||||
Claw_Rage_Timer = urand(15000, 20000);
|
||||
me->SetSpeed(MOVE_RUN, 1.2f);
|
||||
AttackStart(ObjectAccessor::GetUnit(*me, TankGUID));
|
||||
TankGUID = 0;
|
||||
TankGUID.Clear();
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -499,7 +499,7 @@ public:
|
||||
Lynx_Rush_Timer = urand(15000, 20000);
|
||||
me->SetSpeed(MOVE_RUN, 1.2f);
|
||||
AttackStart(ObjectAccessor::GetUnit(*me, TankGUID));
|
||||
TankGUID = 0;
|
||||
TankGUID.Clear();
|
||||
}
|
||||
else
|
||||
AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0));
|
||||
|
||||
@@ -56,19 +56,19 @@ public:
|
||||
{
|
||||
instance_zulaman_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
uint64 HarkorsSatchelGUID;
|
||||
uint64 TanzarsTrunkGUID;
|
||||
uint64 AshlisBagGUID;
|
||||
uint64 KrazsPackageGUID;
|
||||
uint64 StrangeGongGUID;
|
||||
uint64 HarrisonJonesGUID;
|
||||
ObjectGuid HarkorsSatchelGUID;
|
||||
ObjectGuid TanzarsTrunkGUID;
|
||||
ObjectGuid AshlisBagGUID;
|
||||
ObjectGuid KrazsPackageGUID;
|
||||
ObjectGuid StrangeGongGUID;
|
||||
ObjectGuid HarrisonJonesGUID;
|
||||
|
||||
uint64 HexLordGateGUID;
|
||||
uint64 ZulJinGateGUID;
|
||||
uint64 MassiveGateGUID;
|
||||
uint64 AkilzonDoorGUID;
|
||||
uint64 ZulJinDoorGUID;
|
||||
uint64 HalazziDoorGUID;
|
||||
ObjectGuid HexLordGateGUID;
|
||||
ObjectGuid ZulJinGateGUID;
|
||||
ObjectGuid MassiveGateGUID;
|
||||
ObjectGuid AkilzonDoorGUID;
|
||||
ObjectGuid ZulJinDoorGUID;
|
||||
ObjectGuid HalazziDoorGUID;
|
||||
|
||||
uint32 QuestTimer;
|
||||
uint16 BossKilled;
|
||||
@@ -82,20 +82,6 @@ public:
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
HarkorsSatchelGUID = 0;
|
||||
TanzarsTrunkGUID = 0;
|
||||
AshlisBagGUID = 0;
|
||||
KrazsPackageGUID = 0;
|
||||
StrangeGongGUID = 0;
|
||||
HexLordGateGUID = 0;
|
||||
ZulJinGateGUID = 0;
|
||||
MassiveGateGUID = 0;
|
||||
AkilzonDoorGUID = 0;
|
||||
HalazziDoorGUID = 0;
|
||||
ZulJinDoorGUID = 0;
|
||||
|
||||
HarrisonJonesGUID = 0;
|
||||
|
||||
QuestTimer = 0;
|
||||
QuestMinute = 0;
|
||||
BossKilled = 0;
|
||||
@@ -380,7 +366,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type) const override
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -390,7 +376,7 @@ public:
|
||||
return MassiveGateGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
InstanceScript* instance;
|
||||
EventMap events;
|
||||
uint8 eventTimer;
|
||||
uint64 PlayerGUID;
|
||||
ObjectGuid PlayerGUID;
|
||||
|
||||
void Reset() override { }
|
||||
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
events.Update(diff);
|
||||
if (eventTimer)
|
||||
{
|
||||
Player* player = me->GetMap()->GetPlayer(PlayerGUID);
|
||||
Player* player = ObjectAccessor::GetPlayer(me->GetMap(), PlayerGUID);
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 1:
|
||||
@@ -454,7 +454,7 @@ public:
|
||||
}
|
||||
|
||||
bool IsLoot;
|
||||
uint64 PlayerGUID;
|
||||
ObjectGuid PlayerGUID;
|
||||
|
||||
void Reset() override { }
|
||||
|
||||
@@ -598,13 +598,13 @@ public:
|
||||
|
||||
uint8 _gongEvent;
|
||||
uint32 _gongTimer;
|
||||
uint64 uiTargetGUID;
|
||||
ObjectGuid uiTargetGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_gongEvent = 0;
|
||||
_gongTimer = 0;
|
||||
uiTargetGUID = 0;
|
||||
uiTargetGUID.Clear();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
@@ -629,7 +629,7 @@ public:
|
||||
me->RemoveAllAuras();
|
||||
me->SetEntry(NPC_HARRISON_JONES_2);
|
||||
me->SetDisplayId(MODEL_HARRISON_JONES_2);
|
||||
me->SetTarget(0);
|
||||
me->SetTarget();
|
||||
me->SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_STAND_STATE, UNIT_STAND_STATE_DEAD);
|
||||
me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
|
||||
instance->SetData(DATA_GONGEVENT, DONE);
|
||||
@@ -659,14 +659,14 @@ public:
|
||||
_gongTimer = 4000;
|
||||
break;
|
||||
case GONG_EVENT_3:
|
||||
if (GameObject* gong = me->GetMap()->GetGameObject(instance->GetData64(GO_STRANGE_GONG)))
|
||||
if (GameObject* gong = me->GetMap()->GetGameObject(instance->GetGuidData(GO_STRANGE_GONG)))
|
||||
gong->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
_gongEvent = GONG_EVENT_4;
|
||||
_gongTimer = 105000;
|
||||
break;
|
||||
case GONG_EVENT_4:
|
||||
me->RemoveAura(SPELL_BANGING_THE_GONG);
|
||||
if (GameObject* gong = me->GetMap()->GetGameObject(instance->GetData64(GO_STRANGE_GONG)))
|
||||
if (GameObject* gong = me->GetMap()->GetGameObject(instance->GetGuidData(GO_STRANGE_GONG)))
|
||||
gong->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
// trigger or gong will need to be scripted to set IN_PROGRESS after enough hits.
|
||||
@@ -728,7 +728,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_MASSIVE_GATE)))
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetGuidData(GO_MASSIVE_GATE)))
|
||||
gate->SetGoState(GO_STATE_ACTIVE);
|
||||
_gongTimer = 2000;
|
||||
_gongEvent = GONG_EVENT_8;
|
||||
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
void EnterEvadeMode() override
|
||||
{
|
||||
BossAI::EnterEvadeMode();
|
||||
if (GameObject* object = ObjectAccessor::GetGameObject(*me, instance->GetData64(GO_GONG_OF_BETHEKK)))
|
||||
if (GameObject* object = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(GO_GONG_OF_BETHEKK)))
|
||||
object->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
me->DespawnOrUnsummon(4000);
|
||||
}
|
||||
@@ -285,8 +285,8 @@ public:
|
||||
private:
|
||||
uint8 _summonCountA;
|
||||
uint8 _summonCountB;
|
||||
uint64 _triggersSideAGUID[5];
|
||||
uint64 _triggersSideBGUID[5];
|
||||
ObjectGuid _triggersSideAGUID[5];
|
||||
ObjectGuid _triggersSideBGUID[5];
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -335,7 +335,7 @@ public:
|
||||
DoCast(me, SPELL_SNEAK_RANK_1_1);
|
||||
DoCast(me, SPELL_SNEAK_RANK_1_2);
|
||||
|
||||
if (Unit* arlokk = ObjectAccessor::GetUnit(*me, _instance->GetData64(NPC_ARLOKK)))
|
||||
if (Unit* arlokk = ObjectAccessor::GetUnit(*me, _instance->GetGuidData(NPC_ARLOKK)))
|
||||
me->GetMotionMaster()->MovePoint(0, arlokk->GetPositionX(), arlokk->GetPositionY(), arlokk->GetPositionZ());
|
||||
_events.ScheduleEvent(EVENT_ATTACK, 6000);
|
||||
}
|
||||
@@ -355,7 +355,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (Unit* arlokk = ObjectAccessor::GetUnit(*me, _instance->GetData64(NPC_ARLOKK)))
|
||||
if (Unit* arlokk = ObjectAccessor::GetUnit(*me, _instance->GetGuidData(NPC_ARLOKK)))
|
||||
{
|
||||
if (arlokk->IsAlive())
|
||||
arlokk->GetAI()->SetData(_sideData, 0);
|
||||
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
//Heal_Timer
|
||||
if (Heal_Timer <= diff)
|
||||
{
|
||||
Unit* pJindo = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_JINDO));
|
||||
Unit* pJindo = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_JINDO));
|
||||
if (pJindo)
|
||||
DoCast(pJindo, SPELL_HEAL);
|
||||
Heal_Timer = 3000;
|
||||
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
{
|
||||
killCount = 0;
|
||||
events.ScheduleEvent(EVENT_CHECK_START, 1000);
|
||||
if (Creature* speaker = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_VILEBRANCH_SPEAKER)))
|
||||
if (Creature* speaker = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_VILEBRANCH_SPEAKER)))
|
||||
if (!speaker->IsAlive())
|
||||
speaker->Respawn(true);
|
||||
}
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
if (++killCount == 3)
|
||||
{
|
||||
Talk(SAY_DING_KILL);
|
||||
if (Creature* jindo = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_JINDO)))
|
||||
if (Creature* jindo = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_JINDO)))
|
||||
if (jindo->IsAlive())
|
||||
jindo->AI()->Talk(SAY_GRATS_JINDO);
|
||||
DoCast(me, SPELL_LEVEL_UP, true);
|
||||
@@ -261,7 +261,7 @@ public:
|
||||
|
||||
private:
|
||||
uint8 killCount;
|
||||
uint64 chainedSpirtGUIDs[CHAINED_SPIRT_COUNT];
|
||||
ObjectGuid chainedSpirtGUIDs[CHAINED_SPIRT_COUNT];
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
if (instance->GetBossState(DATA_LORKHAN) == SPECIAL)
|
||||
{
|
||||
//Resurrect LorKhan
|
||||
if (Unit* pLorKhan = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_LORKHAN)))
|
||||
if (Unit* pLorKhan = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_LORKHAN)))
|
||||
{
|
||||
pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pLorKhan->setFaction(14);
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
if (instance->GetBossState(DATA_ZATH) == SPECIAL)
|
||||
{
|
||||
//Resurrect Zath
|
||||
if (Unit* pZath = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_ZATH)))
|
||||
if (Unit* pZath = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_ZATH)))
|
||||
{
|
||||
pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pZath->setFaction(14);
|
||||
@@ -310,8 +310,8 @@ public:
|
||||
//Casting Greaterheal to Thekal or Zath if they are in meele range.
|
||||
if (GreaterHeal_Timer <= diff)
|
||||
{
|
||||
Unit* pThekal = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THEKAL));
|
||||
Unit* pZath = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_ZATH));
|
||||
Unit* pThekal = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_THEKAL));
|
||||
Unit* pZath = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_ZATH));
|
||||
|
||||
if (!pThekal || !pZath)
|
||||
return;
|
||||
@@ -346,7 +346,7 @@ public:
|
||||
if (instance->GetBossState(DATA_THEKAL) == SPECIAL)
|
||||
{
|
||||
//Resurrect Thekal
|
||||
if (Unit* pThekal = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THEKAL)))
|
||||
if (Unit* pThekal = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_THEKAL)))
|
||||
{
|
||||
pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -358,7 +358,7 @@ public:
|
||||
if (instance->GetBossState(DATA_ZATH) == SPECIAL)
|
||||
{
|
||||
//Resurrect Zath
|
||||
if (Unit* pZath = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_ZATH)))
|
||||
if (Unit* pZath = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_ZATH)))
|
||||
{
|
||||
pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -499,7 +499,7 @@ public:
|
||||
if (instance->GetBossState(DATA_LORKHAN) == SPECIAL)
|
||||
{
|
||||
//Resurrect LorKhan
|
||||
if (Unit* pLorKhan = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_LORKHAN)))
|
||||
if (Unit* pLorKhan = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_LORKHAN)))
|
||||
{
|
||||
pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -511,7 +511,7 @@ public:
|
||||
if (instance->GetBossState(DATA_THEKAL) == SPECIAL)
|
||||
{
|
||||
//Resurrect Thekal
|
||||
if (Unit* pThekal = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THEKAL)))
|
||||
if (Unit* pThekal = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_THEKAL)))
|
||||
{
|
||||
pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
@@ -34,17 +34,6 @@ public:
|
||||
LoadDoorData(doorData);
|
||||
}
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
_zealotLorkhanGUID = 0;
|
||||
_zealotZathGUID = 0;
|
||||
_highPriestTekalGUID = 0;
|
||||
_jindoTheHexxerGUID = 0;
|
||||
_vilebranchSpeakerGUID = 0;
|
||||
_arlokkGUID = 0;
|
||||
_goGongOfBethekkGUID = 0;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const override
|
||||
{
|
||||
// not active in Zul'Gurub
|
||||
@@ -107,7 +96,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiData) const override
|
||||
ObjectGuid GetGuidData(uint32 uiData) const override
|
||||
{
|
||||
switch (uiData)
|
||||
{
|
||||
@@ -130,7 +119,8 @@ public:
|
||||
return _goGongOfBethekkGUID;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
std::string GetSaveData() override
|
||||
@@ -179,13 +169,13 @@ public:
|
||||
//If all High Priest bosses were killed. Lorkhan, Zath and Ohgan are added too.
|
||||
//Storing Lorkhan, Zath and Thekal because we need to cast on them later. Jindo is needed for healfunction too.
|
||||
|
||||
uint64 _zealotLorkhanGUID;
|
||||
uint64 _zealotZathGUID;
|
||||
uint64 _highPriestTekalGUID;
|
||||
uint64 _jindoTheHexxerGUID;
|
||||
uint64 _vilebranchSpeakerGUID;
|
||||
uint64 _arlokkGUID;
|
||||
uint64 _goGongOfBethekkGUID;
|
||||
ObjectGuid _zealotLorkhanGUID;
|
||||
ObjectGuid _zealotZathGUID;
|
||||
ObjectGuid _highPriestTekalGUID;
|
||||
ObjectGuid _jindoTheHexxerGUID;
|
||||
ObjectGuid _vilebranchSpeakerGUID;
|
||||
ObjectGuid _arlokkGUID;
|
||||
ObjectGuid _goGongOfBethekkGUID;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
|
||||
SummonList summons;
|
||||
EventMap events;
|
||||
uint64 _playerGUID;
|
||||
ObjectGuid _playerGUID;
|
||||
uint8 _counter;
|
||||
uint8 _savedCount;
|
||||
uint8 _deathCount;
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
_savedCount = 0;
|
||||
_deathCount = 0;
|
||||
_counter = 0;
|
||||
_playerGUID = 0;
|
||||
_playerGUID.Clear();
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
_faction = faction;
|
||||
}
|
||||
|
||||
void SetGUID(uint64 guid, int32) override
|
||||
void SetGUID(ObjectGuid guid, int32) override
|
||||
{
|
||||
_playerGUID = guid;
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
|
||||
struct npc_balance_of_light_and_shadowAI : public NullCreatureAI
|
||||
{
|
||||
npc_balance_of_light_and_shadowAI(Creature* creature) : NullCreatureAI(creature) { timer = 0; _targetGUID = 0; }
|
||||
npc_balance_of_light_and_shadowAI(Creature* creature) : NullCreatureAI(creature) { timer = 0; _targetGUID.Clear(); }
|
||||
|
||||
bool CanBeSeen(Player const* player) override
|
||||
{
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
}
|
||||
|
||||
uint32 timer;
|
||||
uint64 _targetGUID;
|
||||
ObjectGuid _targetGUID;
|
||||
|
||||
void SpellHit(Unit*, const SpellInfo* spellInfo) override
|
||||
{
|
||||
|
||||
@@ -122,8 +122,8 @@ public:
|
||||
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
uint64 playerGUID;
|
||||
uint64 morlenGUID;
|
||||
ObjectGuid playerGUID;
|
||||
ObjectGuid morlenGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -131,8 +131,8 @@ public:
|
||||
me->SetRegeneratingHealth(true);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
playerGUID = 0;
|
||||
morlenGUID = 0;
|
||||
playerGUID.Clear();
|
||||
morlenGUID.Clear();
|
||||
summons.DespawnAll();
|
||||
if (Creature* c = me->FindNearestCreature(NPC_THALORIEN_REMAINS, 100.0f, true))
|
||||
c->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
@@ -378,7 +378,7 @@ public:
|
||||
break;
|
||||
case EVENT_OUTRO_KNEEL:
|
||||
if (Player* p = ObjectAccessor::GetPlayer(*me, playerGUID))
|
||||
p->KilledMonsterCredit(NPC_THALORIEN_KILL_CREDIT, 0);
|
||||
p->KilledMonsterCredit(NPC_THALORIEN_KILL_CREDIT);
|
||||
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
events.ScheduleEvent(EVENT_DISAPPEAR, 6000);
|
||||
break;
|
||||
@@ -492,13 +492,13 @@ public:
|
||||
npc_grand_magister_rommathAI(Creature* c) : NullCreatureAI(c)
|
||||
{
|
||||
announced = false;
|
||||
playerGUID = 0;
|
||||
playerGUID.Clear();
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
bool announced;
|
||||
uint64 playerGUID;
|
||||
ObjectGuid playerGUID;
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
uint32 Phase;
|
||||
int8 KillCount;
|
||||
uint32 WaitTimer;
|
||||
uint64 PlayerGUID;
|
||||
ObjectGuid PlayerGUID;
|
||||
SummonList Summons;
|
||||
|
||||
bool QuestInProgress;
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
{
|
||||
Phase = 0;
|
||||
KillCount = 0;
|
||||
PlayerGUID = 0;
|
||||
PlayerGUID.Clear();
|
||||
Summons.DespawnAll();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,14 +135,14 @@ public:
|
||||
uint32 uiTimer;
|
||||
uint32 uiPhase;
|
||||
|
||||
uint64 MarzonGUID;
|
||||
ObjectGuid MarzonGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiTimer = 0;
|
||||
uiPhase = 0;
|
||||
|
||||
MarzonGUID = 0;
|
||||
MarzonGUID.Clear();
|
||||
}
|
||||
|
||||
void EnterEvadeMode() override
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
{
|
||||
npc_galen_goodwardAI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
galensCageGUID = 0;
|
||||
galensCageGUID.Clear();
|
||||
Reset();
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 galensCageGUID;
|
||||
ObjectGuid galensCageGUID;
|
||||
uint32 periodicSay;
|
||||
};
|
||||
|
||||
|
||||
@@ -60,13 +60,13 @@ public:
|
||||
|
||||
uint32 m_uiPhase;
|
||||
uint32 m_uiPhaseTimer;
|
||||
uint64 m_uiPlayerGUID;
|
||||
ObjectGuid m_uiPlayerGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
m_uiPhase = 0;
|
||||
m_uiPhaseTimer = 5000;
|
||||
m_uiPlayerGUID = 0;
|
||||
m_uiPlayerGUID.Clear();
|
||||
|
||||
me->RestoreFaction();
|
||||
|
||||
|
||||
@@ -106,8 +106,7 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
LamentEvent = false;
|
||||
targetGUID = 0;
|
||||
playerGUID = 0;
|
||||
playerGUID.Clear();
|
||||
_events.Reset();
|
||||
}
|
||||
|
||||
@@ -120,7 +119,7 @@ public:
|
||||
_events.ScheduleEvent(EVENT_MULTI_SHOT, 10000);
|
||||
}
|
||||
|
||||
void SetGUID(uint64 guid, int32 type) override
|
||||
void SetGUID(ObjectGuid guid, int32 type) override
|
||||
{
|
||||
if (type == GUID_EVENT_INVOKER)
|
||||
{
|
||||
@@ -223,8 +222,7 @@ public:
|
||||
private:
|
||||
EventMap _events;
|
||||
bool LamentEvent;
|
||||
uint64 targetGUID;
|
||||
uint64 playerGUID;
|
||||
ObjectGuid playerGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -951,7 +949,7 @@ public:
|
||||
if (Creature* jaina = GetClosestCreatureWithEntry(creature, NPC_JAINA, 50.0f))
|
||||
ai->jainaGUID = jaina->GetGUID();
|
||||
else
|
||||
ai->jainaGUID = 0;
|
||||
ai->jainaGUID.Clear();
|
||||
ai->SetDespawnAtEnd(false);
|
||||
ai->SetDespawnAtFar(false);
|
||||
}
|
||||
@@ -979,9 +977,6 @@ public:
|
||||
{
|
||||
npc_varian_wrynnAI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
memset(generatorGUID, 0, sizeof(generatorGUID));
|
||||
memset(allianceForcesGUID, 0, sizeof(allianceForcesGUID));
|
||||
memset(hordeForcesGUID, 0, sizeof(hordeForcesGUID));
|
||||
allianceGuardsGUID.clear();
|
||||
}
|
||||
|
||||
@@ -993,17 +988,17 @@ public:
|
||||
|
||||
uint32 whirlwindTimer;
|
||||
|
||||
uint64 jainaGUID;
|
||||
uint64 putressGUID;
|
||||
uint64 blightWormGUID;
|
||||
uint64 khanokGUID;
|
||||
uint64 thrallGUID;
|
||||
uint64 sylvanasGUID;
|
||||
ObjectGuid jainaGUID;
|
||||
ObjectGuid putressGUID;
|
||||
ObjectGuid blightWormGUID;
|
||||
ObjectGuid khanokGUID;
|
||||
ObjectGuid thrallGUID;
|
||||
ObjectGuid sylvanasGUID;
|
||||
|
||||
uint64 generatorGUID[GENERATOR_MAXCOUNT];
|
||||
uint64 allianceForcesGUID[ALLIANCE_FORCE_MAXCOUNT];
|
||||
uint64 hordeForcesGUID[HORDE_FORCE_MAXCOUNT];
|
||||
std::vector<uint64> allianceGuardsGUID;
|
||||
ObjectGuid generatorGUID[GENERATOR_MAXCOUNT];
|
||||
ObjectGuid allianceForcesGUID[ALLIANCE_FORCE_MAXCOUNT];
|
||||
ObjectGuid hordeForcesGUID[HORDE_FORCE_MAXCOUNT];
|
||||
GuidVector allianceGuardsGUID;
|
||||
|
||||
EventMap _events;
|
||||
|
||||
@@ -1036,7 +1031,7 @@ public:
|
||||
bStepping = false;
|
||||
step = 0;
|
||||
phaseTimer = 0;
|
||||
jainaGUID = 0;
|
||||
jainaGUID.Clear();
|
||||
_events.ScheduleEvent(EVENT_WHIRLWIND, 5 * IN_MILLISECONDS);
|
||||
_events.ScheduleEvent(EVENT_HEROIC_LEAP, 10 * IN_MILLISECONDS);
|
||||
_events.ScheduleEvent(EVENT_AGGRO_JAINA, 2 * IN_MILLISECONDS);
|
||||
@@ -1046,38 +1041,38 @@ public:
|
||||
if (Creature* putress = ObjectAccessor::GetCreature(*me, putressGUID))
|
||||
{
|
||||
putress->DespawnOrUnsummon();
|
||||
putressGUID = 0;
|
||||
putressGUID.Clear();
|
||||
}
|
||||
|
||||
if (Creature* blightWorm = ObjectAccessor::GetCreature(*me, blightWormGUID))
|
||||
{
|
||||
blightWorm->DespawnOrUnsummon();
|
||||
blightWormGUID = 0;
|
||||
blightWormGUID.Clear();
|
||||
}
|
||||
|
||||
if (Creature* khanok = ObjectAccessor::GetCreature(*me, khanokGUID))
|
||||
{
|
||||
khanok->DespawnOrUnsummon();
|
||||
khanokGUID = 0;
|
||||
khanokGUID.Clear();
|
||||
}
|
||||
|
||||
if (Creature* thrall = ObjectAccessor::GetCreature(*me, thrallGUID))
|
||||
{
|
||||
thrall->DespawnOrUnsummon();
|
||||
thrallGUID = 0;
|
||||
thrallGUID.Clear();
|
||||
}
|
||||
|
||||
if (Creature* sylvanas = ObjectAccessor::GetCreature(*me, sylvanasGUID))
|
||||
{
|
||||
sylvanas->DespawnOrUnsummon();
|
||||
sylvanasGUID = 0;
|
||||
sylvanasGUID.Clear();
|
||||
}
|
||||
|
||||
for (uint8 i = 0; i < GENERATOR_MAXCOUNT; ++i)
|
||||
{
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, generatorGUID[i]))
|
||||
{
|
||||
generatorGUID[i] = 0;
|
||||
generatorGUID[i].Clear();
|
||||
temp->DespawnOrUnsummon();
|
||||
}
|
||||
}
|
||||
@@ -1086,13 +1081,13 @@ public:
|
||||
{
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, allianceForcesGUID[i]))
|
||||
{
|
||||
allianceForcesGUID[i] = 0;
|
||||
allianceForcesGUID[i].Clear();
|
||||
temp->DespawnOrUnsummon();
|
||||
}
|
||||
}
|
||||
|
||||
for (std::vector<uint64>::const_iterator i = allianceGuardsGUID.begin(); i != allianceGuardsGUID.end(); ++i)
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, *i))
|
||||
for (ObjectGuid const guid : allianceGuardsGUID)
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, guid))
|
||||
temp->DespawnOrUnsummon();
|
||||
|
||||
allianceGuardsGUID.clear();
|
||||
@@ -1101,7 +1096,7 @@ public:
|
||||
{
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, hordeForcesGUID[i]))
|
||||
{
|
||||
hordeForcesGUID[i] = 0;
|
||||
hordeForcesGUID[i].Clear();
|
||||
temp->DespawnOrUnsummon();
|
||||
}
|
||||
}
|
||||
@@ -2291,7 +2286,7 @@ public:
|
||||
thrall_ai->SetDespawnAtFar(false);
|
||||
}
|
||||
else
|
||||
thrall_ai->sylvanasfollowGUID = 0;
|
||||
thrall_ai->sylvanasfollowGUID.Clear();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2329,7 +2324,6 @@ public:
|
||||
{
|
||||
npc_thrall_bfuAI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
memset(allianceForcesGUID, 0, sizeof(allianceForcesGUID));
|
||||
hordeGuardsGUID.clear();
|
||||
}
|
||||
|
||||
@@ -2339,14 +2333,14 @@ public:
|
||||
uint32 step;
|
||||
uint32 phaseTimer;
|
||||
|
||||
uint64 sylvanasfollowGUID;
|
||||
uint64 allianceForcesGUID[ALLIANCE_FORCE_MAXCOUNT];
|
||||
uint64 ValimathrasGUID;
|
||||
uint64 ValimathrasPortalGUID;
|
||||
uint64 WrynnGUID;
|
||||
uint64 JainaGUID;
|
||||
uint64 SaurfangGUID;
|
||||
std::vector<uint64> hordeGuardsGUID;
|
||||
ObjectGuid sylvanasfollowGUID;
|
||||
ObjectGuid allianceForcesGUID[ALLIANCE_FORCE_MAXCOUNT];
|
||||
ObjectGuid ValimathrasGUID;
|
||||
ObjectGuid ValimathrasPortalGUID;
|
||||
ObjectGuid WrynnGUID;
|
||||
ObjectGuid JainaGUID;
|
||||
ObjectGuid SaurfangGUID;
|
||||
GuidVector hordeGuardsGUID;
|
||||
|
||||
EventMap _events;
|
||||
|
||||
@@ -2384,7 +2378,7 @@ public:
|
||||
EnableAttack = false;
|
||||
step = 0;
|
||||
phaseTimer = 0;
|
||||
sylvanasfollowGUID = 0;
|
||||
sylvanasfollowGUID.Clear();
|
||||
_events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 3 * IN_MILLISECONDS);
|
||||
_events.ScheduleEvent(EVENT_LAVA_BURST, 5 * IN_MILLISECONDS);
|
||||
_events.ScheduleEvent(EVENT_THUNDER, 8 * IN_MILLISECONDS);
|
||||
@@ -2394,35 +2388,35 @@ public:
|
||||
if (Creature* valimathras = ObjectAccessor::GetCreature(*me, ValimathrasGUID))
|
||||
{
|
||||
valimathras->DespawnOrUnsummon();
|
||||
ValimathrasGUID = 0;
|
||||
ValimathrasGUID.Clear();
|
||||
}
|
||||
|
||||
if (Creature* valimathrasportal = ObjectAccessor::GetCreature(*me, ValimathrasPortalGUID))
|
||||
{
|
||||
valimathrasportal->DespawnOrUnsummon();
|
||||
ValimathrasPortalGUID = 0;
|
||||
ValimathrasPortalGUID.Clear();
|
||||
}
|
||||
|
||||
if (Creature* wrynn = ObjectAccessor::GetCreature(*me, WrynnGUID))
|
||||
{
|
||||
wrynn->DespawnOrUnsummon();
|
||||
WrynnGUID = 0;
|
||||
WrynnGUID.Clear();
|
||||
}
|
||||
|
||||
if (Creature* jaina = ObjectAccessor::GetCreature(*me, JainaGUID))
|
||||
{
|
||||
jaina->DespawnOrUnsummon();
|
||||
JainaGUID = 0;
|
||||
JainaGUID.Clear();
|
||||
}
|
||||
|
||||
if (Creature* saurfang = ObjectAccessor::GetCreature(*me, SaurfangGUID))
|
||||
{
|
||||
saurfang->DespawnOrUnsummon();
|
||||
SaurfangGUID = 0;
|
||||
SaurfangGUID.Clear();
|
||||
}
|
||||
|
||||
for (std::vector<uint64>::const_iterator i = hordeGuardsGUID.begin(); i != hordeGuardsGUID.end(); ++i)
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, *i))
|
||||
for (ObjectGuid const guid : hordeGuardsGUID)
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, guid))
|
||||
temp->DespawnOrUnsummon();
|
||||
|
||||
hordeGuardsGUID.clear();
|
||||
|
||||
Reference in New Issue
Block a user