diff options
| author | Shauren <shauren.trinity@gmail.com> | 2014-10-21 19:23:32 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2014-10-21 19:23:32 +0200 |
| commit | 9cc7044546eaaaf4fd7a999c5e074ad0ea3d47ef (patch) | |
| tree | e40c2f50a9b5b11620ee607103f0352521bdf54f /src/server/scripts/EasternKingdoms | |
| parent | 1bea52fd4649b6a1761aa157f9e74f01e19872e7 (diff) | |
Core/Entities: First batch of removing implicit conversions of ObjectGuid to uint64
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
9 files changed, 16 insertions, 13 deletions
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp index 08b773bc61a..857ae04d41b 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp @@ -233,7 +233,7 @@ public: { MobDeath_Timer = 2500; - if (RingBossGUID) + if (!RingBossGUID.IsEmpty()) { Creature* boss = ObjectAccessor::GetCreature(*me, RingBossGUID); if (boss && !boss->IsAlive() && boss->isDead()) diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp index 46cdd5edc7d..a8b373531a1 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp @@ -342,7 +342,7 @@ public: void TombOfSevenEvent() { - if (GhostKillCount < 7 && TombBossGUIDs[TombEventCounter]) + if (GhostKillCount < 7 && !TombBossGUIDs[TombEventCounter].IsEmpty()) { if (Creature* boss = instance->GetCreature(TombBossGUIDs[TombEventCounter])) { @@ -399,7 +399,7 @@ public: } void Update(uint32 diff) override { - if (TombEventStarterGUID && GhostKillCount < 7) + if (!TombEventStarterGUID.IsEmpty() && GhostKillCount < 7) { if (TombTimer <= diff) { @@ -419,7 +419,7 @@ public: } } else TombTimer -= diff; } - if (GhostKillCount >= 7 && TombEventStarterGUID) + if (GhostKillCount >= 7 && !TombEventStarterGUID.IsEmpty()) TombOfSevenEnd(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp index 7de89b41b7f..d87fd69cbf4 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp @@ -135,7 +135,7 @@ class instance_molten_core : public InstanceMapScript void SummonMajordomoExecutus() { _executusSchedule = false; - if (_majordomoExecutusGUID) + if (!_majordomoExecutusGUID.IsEmpty()) return; if (GetBossState(BOSS_MAJORDOMO_EXECUTUS) != DONE) diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp index d4e32d8e908..177f35329be 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp @@ -195,8 +195,8 @@ class instance_deadmines : public InstanceMapScript switch (type) { case EVENT_STATE: - if (DefiasCannonGUID && IronCladDoorGUID) - State=data; + if (!DefiasCannonGUID.IsEmpty() && !IronCladDoorGUID.IsEmpty()) + State = data; break; case EVENT_RHAHKZOR: if (data == DONE) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp index be6d07571cf..e18aa3cd91c 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp @@ -410,7 +410,7 @@ public: if (!PortalGUID[1]) DoCastVictim(SPELL_FIENDISH_PORTAL_1, false); - if (PortalGUID[0] && PortalGUID[1]) + if (!PortalGUID[0].IsEmpty() && !PortalGUID[1].IsEmpty()) { if (Creature* pPortal = ObjectAccessor::GetCreature(*me, PortalGUID[urand(0, 1)])) pPortal->CastSpell(me->GetVictim(), SPELL_SUMMON_FIENDISIMP, false); diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index c01affd3012..7249480108f 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -324,9 +324,12 @@ public: bool OnGossipHello(Player* player, GameObject* go) override { if (Creature* anchor = go->FindNearestCreature(29521, 15)) - if (ObjectGuid prisonerGUID = anchor->AI()->GetGUID()) + { + ObjectGuid prisonerGUID = anchor->AI()->GetGUID(); + if (!prisonerGUID.IsEmpty()) if (Creature* prisoner = ObjectAccessor::GetCreature(*player, prisonerGUID)) ENSURE_AI(npc_unworthy_initiate::npc_unworthy_initiateAI, prisoner->AI())->EventStart(anchor, player); + } return false; } diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index fe433a6692d..873ca94c033 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -708,7 +708,7 @@ public: void MoveInLineOfSight(Unit* who) override { - if (PlayerGUID || who->GetTypeId() != TYPEID_PLAYER || !who->IsWithinDist(me, INTERACTION_DISTANCE)) + if (!PlayerGUID.IsEmpty() || who->GetTypeId() != TYPEID_PLAYER || !who->IsWithinDist(me, INTERACTION_DISTANCE)) return; if (MeetQuestCondition(who->ToPlayer())) @@ -717,7 +717,7 @@ public: void UpdateAI(uint32 diff) override { - if (PlayerGUID && !me->GetVictim() && me->IsAlive()) + if (!PlayerGUID.IsEmpty() && !me->GetVictim() && me->IsAlive()) { if (ExecuteSpeech_Timer <= diff) { diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 58165df48ef..15d33256fb6 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -441,7 +441,7 @@ public: { Initialize(); DoCast(me, SPELL_HEAD); - if (headGUID) + if (!headGUID.IsEmpty()) { if (Creature* Head = ObjectAccessor::GetCreature((*me), headGUID)) Head->DespawnOrUnsummon(); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index f88c9c6159e..3a751f1769e 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -625,7 +625,7 @@ public: me->setActive(true); KalecgosGUID = instance->GetGuidData(DATA_KALECGOS_DRAGON); instance->SetBossState(DATA_KALECGOS, NOT_STARTED); - if (KalecGUID) + if (!KalecGUID.IsEmpty()) { if (Creature* Kalec = ObjectAccessor::GetCreature(*me, KalecGUID)) Kalec->setDeathState(JUST_DIED); |
