mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-22 11:44:37 +00:00
feat(Core/Misc): implement ObjectGuid class (port from TC) (#4885)
This commit is contained in:
@@ -87,7 +87,7 @@ public:
|
||||
SummonCryptGuards();
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_ANUB_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_ANUB_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
Talk(SAY_AGGRO);
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_ANUB_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_ANUB_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
{
|
||||
if (!me->IsInCombat() && sayGreet)
|
||||
{
|
||||
for (std::list<uint64>::iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
for (SummonList::iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
SummonHelpers();
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_FAERLINA_WEB)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_FAERLINA_WEB)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
events.SetPhase(1);
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_FAERLINA_WEB)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_FAERLINA_WEB)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
Talk(SAY_DEATH);
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_FAERLINA_WEB)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_FAERLINA_WEB)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
{
|
||||
if (!me->IsInCombat() && sayGreet)
|
||||
{
|
||||
for (std::list<uint64>::iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
for (SummonList::iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
}
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_HORSEMEN_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_HORSEMEN_GATE)))
|
||||
{
|
||||
if (pInstance->GetBossState(BOSS_GOTHIK) == DONE)
|
||||
{
|
||||
@@ -270,7 +270,7 @@ public:
|
||||
player->SummonGameObject(RAID_MODE(GO_HORSEMEN_CHEST_10, GO_HORSEMEN_CHEST_25), 2514.8f, -2944.9f, 245.55f, 5.51f, 0, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_HORSEMEN_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_HORSEMEN_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
@@ -292,7 +292,7 @@ public:
|
||||
}
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_HORSEMEN_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_HORSEMEN_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
@@ -217,15 +217,15 @@ public:
|
||||
me->NearTeleportTo(2642.139f, -3386.959f, 285.492f, 6.265f);
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_ENTER_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_GOTHIK_ENTER_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_INNER_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_GOTHIK_INNER_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_EXIT_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_GOTHIK_EXIT_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
@@ -245,11 +245,11 @@ public:
|
||||
events.ScheduleEvent(EVENT_CHECK_PLAYERS, 120000);
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_ENTER_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_GOTHIK_ENTER_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_INNER_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_GOTHIK_INNER_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
@@ -294,15 +294,15 @@ public:
|
||||
summons.DespawnAll();
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_ENTER_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_GOTHIK_ENTER_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_INNER_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_GOTHIK_INNER_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_EXIT_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_GOTHIK_EXIT_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
@@ -447,7 +447,7 @@ public:
|
||||
case EVENT_CHECK_HEALTH:
|
||||
if (me->HealthBelowPct(30) && pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_INNER_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_GOTHIK_INNER_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
@@ -482,7 +482,7 @@ public:
|
||||
case EVENT_CHECK_PLAYERS:
|
||||
if (!CheckGroupSplitted())
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_INNER_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_GOTHIK_INNER_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
|
||||
@@ -79,10 +79,7 @@ public:
|
||||
me->GetCreaturesWithEntryInRange(StichedGiants, 300.0f, NPC_STICHED_GIANT);
|
||||
for (std::list<Creature*>::const_iterator itr = StichedGiants.begin(); itr != StichedGiants.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->GetGUID())
|
||||
{
|
||||
(*itr)->ToCreature()->AI()->AttackStart(me->GetVictim());
|
||||
}
|
||||
(*itr)->ToCreature()->AI()->AttackStart(me->GetVictim());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
moveRight = true;
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_HEIGAN_ENTER_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_HEIGAN_ENTER_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
Talk(SAY_AGGRO);
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_HEIGAN_ENTER_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_HEIGAN_ENTER_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
@@ -210,12 +210,12 @@ public:
|
||||
summons.DespawnAll();
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_FLOOR)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_KELTHUZAD_FLOOR)))
|
||||
{
|
||||
go->SetPhaseMask(1, true);
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_KELTHUZAD_GATE)))
|
||||
{
|
||||
if(!_justSpawned) // Don't open the door if we just spawned and are still doing the conversation
|
||||
{
|
||||
@@ -223,19 +223,19 @@ public:
|
||||
}
|
||||
}
|
||||
_justSpawned = false;
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_PORTAL_1)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_KELTHUZAD_PORTAL_1)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_PORTAL_2)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_KELTHUZAD_PORTAL_2)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_PORTAL_3)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_KELTHUZAD_PORTAL_3)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_PORTAL_4)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_KELTHUZAD_PORTAL_4)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
@@ -270,7 +270,7 @@ public:
|
||||
Talk(SAY_DEATH);
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_KELTHUZAD_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
@@ -289,7 +289,7 @@ public:
|
||||
Talk(SAY_SUMMON_MINIONS);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE);
|
||||
me->RemoveAllAttackers();
|
||||
me->SetTarget(0);
|
||||
me->SetTarget();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->CastSpell(me, SPELL_KELTHUZAD_CHANNEL, false);
|
||||
events.ScheduleEvent(EVENT_SPAWN_POOL, 5000);
|
||||
@@ -300,13 +300,13 @@ public:
|
||||
events.ScheduleEvent(EVENT_ENRAGE, 900000);
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_FLOOR)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_KELTHUZAD_FLOOR)))
|
||||
{
|
||||
events.ScheduleEvent(EVENT_FLOOR_CHANGE, 15000);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_KELTHUZAD_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
@@ -342,7 +342,7 @@ public:
|
||||
case EVENT_FLOOR_CHANGE:
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_FLOOR)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_KELTHUZAD_FLOOR)))
|
||||
{
|
||||
events.ScheduleEvent(EVENT_FLOOR_CHANGE, 15000);
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
@@ -451,19 +451,19 @@ public:
|
||||
Talk(SAY_REQUEST_AID);
|
||||
events.DelayEvents(5500);
|
||||
events.ScheduleEvent(EVENT_P3_LICH_KING_SAY, 5000);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_PORTAL_1)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_KELTHUZAD_PORTAL_1)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_PORTAL_2)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_KELTHUZAD_PORTAL_2)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_PORTAL_3)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_KELTHUZAD_PORTAL_3)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_PORTAL_4)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_KELTHUZAD_PORTAL_4)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
@@ -474,7 +474,7 @@ public:
|
||||
case EVENT_P3_LICH_KING_SAY:
|
||||
if (pInstance)
|
||||
{
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*me, pInstance->GetData64(DATA_LICH_KING_BOSS)))
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(DATA_LICH_KING_BOSS)))
|
||||
{
|
||||
cr->AI()->Talk(SAY_ANSWER_REQUEST);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(BOSS_LOATHEB, NOT_STARTED);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_LOATHEB_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_LOATHEB_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(BOSS_LOATHEB, IN_PROGRESS);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_LOATHEB_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_LOATHEB_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
summons.DespawnAll();
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_MAEXXNA_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_MAEXXNA_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SUMMON_SPIDERLINGS, 30000);
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_MAEXXNA_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_MAEXXNA_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
@@ -219,12 +219,14 @@ public:
|
||||
|
||||
struct boss_maexxna_webwrapAI : public NullCreatureAI
|
||||
{
|
||||
explicit boss_maexxna_webwrapAI(Creature* c) : NullCreatureAI(c), victimGUID(0) {}
|
||||
explicit boss_maexxna_webwrapAI(Creature* c) : NullCreatureAI(c) {}
|
||||
|
||||
uint64 victimGUID;
|
||||
void SetGUID(uint64 guid, int32 /*param*/) override
|
||||
ObjectGuid victimGUID;
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 /*param*/) override
|
||||
{
|
||||
victimGUID = guid;
|
||||
|
||||
if (me->m_spells[0] && victimGUID)
|
||||
{
|
||||
if (Unit* victim = ObjectAccessor::GetUnit(*me, victimGUID))
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
timesInBalcony = 0;
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_NOTH_ENTRY_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_NOTH_ENTRY_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
StartGroundPhase();
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_NOTH_ENTRY_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_NOTH_ENTRY_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
Talk(SAY_DEATH);
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_NOTH_ENTRY_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_NOTH_ENTRY_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
|
||||
@@ -86,8 +86,8 @@ public:
|
||||
InstanceScript* pInstance;
|
||||
uint8 iceboltCount{};
|
||||
uint32 spawnTimer{};
|
||||
std::list<uint64> blockList;
|
||||
uint64 currentTarget{};
|
||||
GuidList blockList;
|
||||
ObjectGuid currentTarget;
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
events.Reset();
|
||||
iceboltCount = 0;
|
||||
spawnTimer = 0;
|
||||
currentTarget = 0;
|
||||
currentTarget.Clear();
|
||||
blockList.clear();
|
||||
}
|
||||
|
||||
@@ -191,12 +191,12 @@ public:
|
||||
|
||||
bool IsValidExplosionTarget(WorldObject* target)
|
||||
{
|
||||
for (std::list<uint64>::const_iterator itr = blockList.begin(); itr != blockList.end(); ++itr)
|
||||
for (ObjectGuid const guid : blockList)
|
||||
{
|
||||
if (target->GetGUID() == (*itr))
|
||||
if (target->GetGUID() == guid)
|
||||
return false;
|
||||
|
||||
if (Unit* block = ObjectAccessor::GetUnit(*me, *itr))
|
||||
if (Unit* block = ObjectAccessor::GetUnit(*me, guid))
|
||||
{
|
||||
if (block->IsInBetween(me, target, 2.0f) && block->IsWithinDist(target, 10.0f))
|
||||
return false;
|
||||
@@ -293,7 +293,7 @@ public:
|
||||
me->SendMeleeAttackStop(me->GetVictim());
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
||||
me->SetDisableGravity(true);
|
||||
currentTarget = 0;
|
||||
currentTarget.Clear();
|
||||
events.ScheduleEvent(EVENT_FLIGHT_ICEBOLT, 3000);
|
||||
iceboltCount = RAID_MODE(2, 3);
|
||||
return;
|
||||
@@ -316,7 +316,7 @@ public:
|
||||
bool inList = false;
|
||||
if (!blockList.empty())
|
||||
{
|
||||
for (std::list<uint64>::const_iterator itr = blockList.begin(); itr != blockList.end(); ++itr)
|
||||
for (GuidList::const_iterator itr = blockList.begin(); itr != blockList.end(); ++itr)
|
||||
{
|
||||
if ((*i)->getTarget()->GetGUID() == *itr)
|
||||
{
|
||||
@@ -349,7 +349,7 @@ public:
|
||||
return;
|
||||
}
|
||||
case EVENT_FLIGHT_BREATH:
|
||||
currentTarget = 0;
|
||||
currentTarget.Clear();
|
||||
Talk(EMOTE_BREATH);
|
||||
me->CastSpell(me, SPELL_FROST_MISSILE, false);
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SPELL_EXPLOSION, 8500);
|
||||
@@ -361,7 +361,7 @@ public:
|
||||
case EVENT_FLIGHT_START_LAND:
|
||||
if (!blockList.empty())
|
||||
{
|
||||
for (std::list<uint64>::const_iterator itr = blockList.begin(); itr != blockList.end(); ++itr)
|
||||
for (GuidList::const_iterator itr = blockList.begin(); itr != blockList.end(); ++itr)
|
||||
{
|
||||
if (Unit* block = ObjectAccessor::GetUnit(*me, *itr))
|
||||
{
|
||||
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
}
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_THADDIUS_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_THADDIUS_GATE)))
|
||||
{
|
||||
if (pInstance->GetBossState(BOSS_GLUTH) == DONE)
|
||||
{
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
{
|
||||
pInstance->DoRemoveAurasDueToSpellOnPlayers(28059);
|
||||
pInstance->DoRemoveAurasDueToSpellOnPlayers(28084);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_THADDIUS_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_THADDIUS_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
@@ -365,7 +365,6 @@ public:
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
overload = false;
|
||||
myCoil = 0;
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
@@ -373,7 +372,7 @@ public:
|
||||
uint32 pullTimer{};
|
||||
uint32 visualTimer{};
|
||||
bool overload;
|
||||
uint64 myCoil;
|
||||
ObjectGuid myCoil;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -421,11 +420,11 @@ public:
|
||||
}
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_THADDIUS_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_THADDIUS_GATE)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*me, pInstance->GetData64(DATA_THADDIUS_BOSS)))
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(DATA_THADDIUS_BOSS)))
|
||||
{
|
||||
cr->AI()->AttackStart(pWho);
|
||||
cr->AddThreat(pWho, 10.0f);
|
||||
@@ -461,7 +460,7 @@ public:
|
||||
Talk(me->GetEntry() == NPC_STALAGG ? EMOTE_STAL_DEATH : EMOTE_FEUG_DEATH);
|
||||
if (pInstance)
|
||||
{
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*me, pInstance->GetData64(DATA_THADDIUS_BOSS)))
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(DATA_THADDIUS_BOSS)))
|
||||
{
|
||||
cr->AI()->DoAction(ACTION_SUMMON_DIED);
|
||||
}
|
||||
@@ -530,7 +529,7 @@ public:
|
||||
events.RepeatEvent(20000);
|
||||
if (pInstance)
|
||||
{
|
||||
if (Creature* feugen = ObjectAccessor::GetCreature(*me, pInstance->GetData64(DATA_FEUGEN_BOSS)))
|
||||
if (Creature* feugen = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(DATA_FEUGEN_BOSS)))
|
||||
{
|
||||
if (!feugen->IsAlive() || !feugen->GetVictim() || !me->GetVictim())
|
||||
return;
|
||||
@@ -734,7 +733,7 @@ public:
|
||||
if (!instance || instance->GetData(DATA_HAD_THADDIUS_GREET) || instance->GetBossState(BOSS_THADDIUS) == DONE)
|
||||
return true;
|
||||
|
||||
if (Creature* thaddius = ObjectAccessor::GetCreature(*player, instance->GetData64(DATA_THADDIUS_BOSS)))
|
||||
if (Creature* thaddius = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_THADDIUS_BOSS)))
|
||||
{
|
||||
thaddius->AI()->Talk(SAY_GREET);
|
||||
}
|
||||
|
||||
@@ -55,54 +55,8 @@ public:
|
||||
for (auto& i : HeiganEruption)
|
||||
i.clear();
|
||||
|
||||
// GOs
|
||||
_patchwerkGateGUID = 0;
|
||||
_gluthGateGUID = 0;
|
||||
_nothEntryGateGUID = 0;
|
||||
_nothExitGateGUID = 0;
|
||||
_heiganGateGUID = 0;
|
||||
_heiganGateExitGUID = 0;
|
||||
_loathebGateGUID = 0;
|
||||
_anubGateGUID = 0;
|
||||
_anubNextGateGUID = 0;
|
||||
_faerlinaWebGUID = 0;
|
||||
_faerlinaGateGUID = 0;
|
||||
_maexxnaGateGUID = 0;
|
||||
_thaddiusGateGUID = 0;
|
||||
_horsemanGateGUID = 0;
|
||||
_kelthuzadFloorGUID = 0;
|
||||
_kelthuzadGateGUID = 0;
|
||||
_kelthuzadPortal1GUID = 0;
|
||||
_kelthuzadPortal2GUID = 0;
|
||||
_kelthuzadPortal3GUID = 0;
|
||||
_kelthuzadPortal4GUID = 0;
|
||||
_sapphironGateGUID = 0;
|
||||
_horsemanPortalGUID = 0;
|
||||
_loathebPortalGUID = 0;
|
||||
_maexxnaPortalGUID = 0;
|
||||
_thaddiusPortalGUID = 0;
|
||||
_deathknightEyePortalGUID = 0;
|
||||
_plagueEyePortalGUID = 0;
|
||||
_spiderEyePortalGUID = 0;
|
||||
_abomEyePortalGUID = 0;
|
||||
_deathknightGlowEyePortalGUID = 0;
|
||||
_plagueGlowEyePortalGUID = 0;
|
||||
_spiderGlowEyePortalGUID = 0;
|
||||
_abomGlowEyePortalGUID = 0;
|
||||
|
||||
// NPCs
|
||||
PatchwerkRoomTrash.clear();
|
||||
_patchwerkGUID = 0;
|
||||
_thaddiusGUID = 0;
|
||||
_stalaggGUID = 0;
|
||||
_feugenGUID = 0;
|
||||
_zeliekGUID = 0;
|
||||
_rivendareGUID = 0;
|
||||
_blaumeuxGUID = 0;
|
||||
_korthazzGUID = 0;
|
||||
_sapphironGUID = 0;
|
||||
_kelthuzadGUID = 0;
|
||||
_lichkingGUID = 0;
|
||||
|
||||
// Controls
|
||||
_horsemanKilled = 0;
|
||||
@@ -126,56 +80,56 @@ public:
|
||||
std::set<GameObject*> HeiganEruption[4];
|
||||
|
||||
// GOs
|
||||
uint64 _patchwerkGateGUID;
|
||||
uint64 _gluthGateGUID;
|
||||
uint64 _nothEntryGateGUID;
|
||||
uint64 _nothExitGateGUID;
|
||||
uint64 _heiganGateGUID;
|
||||
uint64 _heiganGateExitGUID;
|
||||
uint64 _loathebGateGUID;
|
||||
uint64 _anubGateGUID;
|
||||
uint64 _anubNextGateGUID;
|
||||
uint64 _faerlinaWebGUID;
|
||||
uint64 _faerlinaGateGUID;
|
||||
uint64 _maexxnaGateGUID;
|
||||
uint64 _thaddiusGateGUID;
|
||||
uint64 _gothikEnterGateGUID{};
|
||||
uint64 _gothikInnerGateGUID{};
|
||||
uint64 _gothikExitGateGUID{};
|
||||
uint64 _horsemanGateGUID;
|
||||
uint64 _kelthuzadFloorGUID;
|
||||
uint64 _kelthuzadGateGUID;
|
||||
uint64 _kelthuzadPortal1GUID;
|
||||
uint64 _kelthuzadPortal2GUID;
|
||||
uint64 _kelthuzadPortal3GUID;
|
||||
uint64 _kelthuzadPortal4GUID;
|
||||
uint64 _sapphironGateGUID;
|
||||
uint64 _horsemanPortalGUID;
|
||||
uint64 _loathebPortalGUID;
|
||||
uint64 _maexxnaPortalGUID;
|
||||
uint64 _thaddiusPortalGUID;
|
||||
uint64 _deathknightEyePortalGUID;
|
||||
uint64 _plagueEyePortalGUID;
|
||||
uint64 _spiderEyePortalGUID;
|
||||
uint64 _abomEyePortalGUID;
|
||||
uint64 _deathknightGlowEyePortalGUID;
|
||||
uint64 _plagueGlowEyePortalGUID;
|
||||
uint64 _spiderGlowEyePortalGUID;
|
||||
uint64 _abomGlowEyePortalGUID;
|
||||
ObjectGuid _patchwerkGateGUID;
|
||||
ObjectGuid _gluthGateGUID;
|
||||
ObjectGuid _nothEntryGateGUID;
|
||||
ObjectGuid _nothExitGateGUID;
|
||||
ObjectGuid _heiganGateGUID;
|
||||
ObjectGuid _heiganGateExitGUID;
|
||||
ObjectGuid _loathebGateGUID;
|
||||
ObjectGuid _anubGateGUID;
|
||||
ObjectGuid _anubNextGateGUID;
|
||||
ObjectGuid _faerlinaWebGUID;
|
||||
ObjectGuid _faerlinaGateGUID;
|
||||
ObjectGuid _maexxnaGateGUID;
|
||||
ObjectGuid _thaddiusGateGUID;
|
||||
ObjectGuid _gothikEnterGateGUID;
|
||||
ObjectGuid _gothikInnerGateGUID;
|
||||
ObjectGuid _gothikExitGateGUID{};
|
||||
ObjectGuid _horsemanGateGUID;
|
||||
ObjectGuid _kelthuzadFloorGUID;
|
||||
ObjectGuid _kelthuzadGateGUID;
|
||||
ObjectGuid _kelthuzadPortal1GUID;
|
||||
ObjectGuid _kelthuzadPortal2GUID;
|
||||
ObjectGuid _kelthuzadPortal3GUID;
|
||||
ObjectGuid _kelthuzadPortal4GUID;
|
||||
ObjectGuid _sapphironGateGUID;
|
||||
ObjectGuid _horsemanPortalGUID;
|
||||
ObjectGuid _loathebPortalGUID;
|
||||
ObjectGuid _maexxnaPortalGUID;
|
||||
ObjectGuid _thaddiusPortalGUID;
|
||||
ObjectGuid _deathknightEyePortalGUID;
|
||||
ObjectGuid _plagueEyePortalGUID;
|
||||
ObjectGuid _spiderEyePortalGUID;
|
||||
ObjectGuid _abomEyePortalGUID;
|
||||
ObjectGuid _deathknightGlowEyePortalGUID;
|
||||
ObjectGuid _plagueGlowEyePortalGUID;
|
||||
ObjectGuid _spiderGlowEyePortalGUID;
|
||||
ObjectGuid _abomGlowEyePortalGUID;
|
||||
|
||||
// NPCs
|
||||
std::list<uint64> PatchwerkRoomTrash;
|
||||
uint64 _patchwerkGUID;
|
||||
uint64 _thaddiusGUID;
|
||||
uint64 _stalaggGUID;
|
||||
uint64 _feugenGUID;
|
||||
uint64 _zeliekGUID;
|
||||
uint64 _rivendareGUID;
|
||||
uint64 _blaumeuxGUID;
|
||||
uint64 _korthazzGUID;
|
||||
uint64 _sapphironGUID;
|
||||
uint64 _kelthuzadGUID;
|
||||
uint64 _lichkingGUID;
|
||||
GuidList PatchwerkRoomTrash;
|
||||
ObjectGuid _patchwerkGUID;
|
||||
ObjectGuid _thaddiusGUID;
|
||||
ObjectGuid _stalaggGUID;
|
||||
ObjectGuid _feugenGUID;
|
||||
ObjectGuid _zeliekGUID;
|
||||
ObjectGuid _rivendareGUID;
|
||||
ObjectGuid _blaumeuxGUID;
|
||||
ObjectGuid _korthazzGUID;
|
||||
ObjectGuid _sapphironGUID;
|
||||
ObjectGuid _kelthuzadGUID;
|
||||
ObjectGuid _lichkingGUID;
|
||||
|
||||
// Controls
|
||||
uint8 _horsemanKilled;
|
||||
@@ -1075,7 +1029,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 id) const override
|
||||
ObjectGuid GetGuidData(uint32 id) const override
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
@@ -1124,10 +1078,11 @@ public:
|
||||
return _feugenGUID;
|
||||
case DATA_LICH_KING_BOSS:
|
||||
return _lichkingGUID;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
std::string GetSaveData() override
|
||||
|
||||
Reference in New Issue
Block a user