aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Outland
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2014-10-21 20:27:00 +0200
committerShauren <shauren.trinity@gmail.com>2014-10-21 20:27:00 +0200
commit034561792ca9a07d719961ea842af2118428816f (patch)
treea3e360f5fd1d439508dd29ee22a5983a828f8306 /src/server/scripts/Outland
parent9cc7044546eaaaf4fd7a999c5e074ad0ea3d47ef (diff)
Core/Entities: Second batch of removing implicit conversions of ObjectGuid to uint64
Diffstat (limited to 'src/server/scripts/Outland')
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_gurtogg_bloodboil.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_illidan.cpp8
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp6
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp6
-rw-r--r--src/server/scripts/Outland/BlackTemple/illidari_council.cpp4
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp9
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp15
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp2
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp2
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp4
-rw-r--r--src/server/scripts/Outland/zone_shadowmoon_valley.cpp12
13 files changed, 39 insertions, 35 deletions
diff --git a/src/server/scripts/Outland/BlackTemple/boss_gurtogg_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_gurtogg_bloodboil.cpp
index 0b219eeff56..b48efcecea1 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_gurtogg_bloodboil.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_gurtogg_bloodboil.cpp
@@ -261,7 +261,7 @@ public:
}
else // Encounter is a loop pretty much. Phase 1 -> Phase 2 -> Phase 1 -> Phase 2 till death or enrage
{
- if (TargetGUID)
+ if (!TargetGUID.IsEmpty())
RevertThreatOnTarget(TargetGUID);
TargetGUID.Clear();
Phase1 = true;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
index aec4e982a49..8e7df5f1c3f 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
@@ -711,7 +711,7 @@ public:
default:
break;
}
- if (MaievGUID)
+ if (!MaievGUID.IsEmpty())
{
if (Creature* maiev = ObjectAccessor::GetCreature(*me, MaievGUID))
if (maiev->IsAlive())
@@ -853,7 +853,7 @@ public:
case 8: // glaive return
for (uint8 i = 0; i < 2; ++i)
{
- if (GlaiveGUID[i])
+ if (!GlaiveGUID[i].IsEmpty())
{
Unit* Glaive = ObjectAccessor::GetUnit(*me, GlaiveGUID[i]);
if (Glaive)
@@ -871,7 +871,7 @@ public:
me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
for (uint8 i = 0; i < 2; ++i)
{
- if (GlaiveGUID[i])
+ if (!GlaiveGUID[i].IsEmpty())
{
if (Creature* glaive = ObjectAccessor::GetCreature(*me, GlaiveGUID[i]))
glaive->DespawnOrUnsummon();
@@ -928,7 +928,7 @@ public:
DoResetThreat();
break;
case 9:
- if (MaievGUID)
+ if (!MaievGUID.IsEmpty())
EnterPhase(PHASE_NORMAL_MAIEV); // Depending on whether we summoned Maiev, we switch to either phase 5 or 3
else
EnterPhase(PHASE_NORMAL_2);
diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
index 39aac706acc..ed145045131 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
@@ -232,7 +232,7 @@ public:
{
for (uint8 i = 0; i < 3; ++i)
{
- if (TargetGUID[i])
+ if (!TargetGUID[i].IsEmpty())
{
if (Unit* unit = ObjectAccessor::GetUnit(*me, TargetGUID[i]))
unit->CastSpell(unit, SPELL_ATTRACTION, true);
diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
index 23abf48233e..6c15784c35e 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
@@ -172,7 +172,7 @@ public:
{
instance->SetBossState(DATA_RELIQUARY_OF_SOULS, NOT_STARTED);
- if (EssenceGUID)
+ if (!EssenceGUID.IsEmpty())
{
if (Creature* essence = ObjectAccessor::GetCreature(*me, EssenceGUID))
essence->DespawnOrUnsummon();
@@ -268,7 +268,7 @@ public:
}
Creature* Essence = NULL;
- if (EssenceGUID)
+ if (!EssenceGUID.IsEmpty())
{
Essence = ObjectAccessor::GetCreature(*me, EssenceGUID);
if (!Essence)
@@ -387,7 +387,7 @@ public:
void npc_enslaved_soul::npc_enslaved_soulAI::JustDied(Unit* /*killer*/)
{
- if (ReliquaryGUID)
+ if (!ReliquaryGUID.IsEmpty())
if (Creature* Reliquary = (ObjectAccessor::GetCreature((*me), ReliquaryGUID)))
++(ENSURE_AI(boss_reliquary_of_souls::boss_reliquary_of_soulsAI, Reliquary->AI())->SoulDeathCount);
diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
index 9e9f3f60a59..6666fd58d32 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
@@ -99,7 +99,7 @@ public:
{
if (CheckTeronTimer <= diff)
{
- if (TeronGUID)
+ if (!TeronGUID.IsEmpty())
{
DoZoneInCombat();
@@ -364,7 +364,7 @@ public:
/************************************************************************/
Unit* ghost = NULL;
- if (GhostGUID)
+ if (!GhostGUID.IsEmpty())
ghost = ObjectAccessor::GetUnit(*me, GhostGUID);
if (ghost && ghost->IsAlive() && ghost->HasAura(SPELL_SHADOW_OF_DEATH))
{
@@ -410,7 +410,7 @@ public:
Talk(SAY_AGGRO);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
Done = true;
- if (AggroTargetGUID)
+ if (!AggroTargetGUID.IsEmpty())
{
Unit* unit = ObjectAccessor::GetUnit(*me, AggroTargetGUID);
if (unit)
diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
index 3c4b37165de..73dc3d1904f 100644
--- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
+++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
@@ -304,7 +304,7 @@ public:
for (uint8 i = 0; i < 4; ++i)
{
- if (Council[i])
+ if (!Council[i].IsEmpty())
{
if (Creature* member = ObjectAccessor::GetCreature(*me, Council[i]))
if (member->IsAlive())
@@ -352,7 +352,7 @@ public:
uint8 EvadeCheck = 0;
for (uint8 i = 0; i < 4; ++i)
{
- if (Council[i])
+ if (!Council[i].IsEmpty())
{
if (Creature* Member = (ObjectAccessor::GetCreature((*me), Council[i])))
{
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
index ca04d41e3c8..6fba2c3dd9d 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
@@ -144,7 +144,8 @@ public:
RAdvisors[2] = instance->GetGuidData(DATA_CARIBDIS);
// Respawn of the 3 Advisors
for (uint8 i = 0; i < MAX_ADVISORS; ++i)
- if (RAdvisors[i])
+ {
+ if (!RAdvisors[i].IsEmpty())
{
Creature* advisor = ObjectAccessor::GetCreature(*me, RAdvisors[i]);
if (advisor && !advisor->IsAlive())
@@ -154,6 +155,7 @@ public:
advisor->GetMotionMaster()->MoveTargetedHome();
}
}
+ }
instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
}
@@ -272,7 +274,8 @@ public:
BlessingOfTides = true;
bool continueTriggering = false;
for (uint8 i = 0; i < MAX_ADVISORS; ++i)
- if (Advisors[i])
+ {
+ if (!Advisors[i].IsEmpty())
{
Creature* advisor = ObjectAccessor::GetCreature(*me, Advisors[i]);
if (advisor && advisor->IsAlive())
@@ -281,6 +284,8 @@ public:
break;
}
}
+ }
+
if (continueTriggering)
{
DoCast(me, SPELL_BLESSING_OF_THE_TIDES);
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
index 450ac350f0c..89b28b8dcd8 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
@@ -211,7 +211,7 @@ public:
for (uint8 i = 0; i < 4; ++i)
{
- if (ShieldGeneratorChannel[i])
+ if (!ShieldGeneratorChannel[i].IsEmpty())
{
if (Unit* remo = ObjectAccessor::GetUnit(*me, ShieldGeneratorChannel[i]))
{
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
index 00d52727798..87451a1f69c 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
@@ -325,7 +325,7 @@ public:
// and reseting equipment
me->LoadEquipment();
- if (instance->GetGuidData(DATA_LEOTHERAS_EVENT_STARTER))
+ if (!instance->GetGuidData(DATA_LEOTHERAS_EVENT_STARTER).IsEmpty())
{
Unit* victim = NULL;
victim = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_LEOTHERAS_EVENT_STARTER));
@@ -353,9 +353,9 @@ public:
//Despawn all Inner Demon summoned
void DespawnDemon()
{
- for (uint8 i=0; i<5; ++i)
+ for (uint8 i = 0; i < 5; ++i)
{
- if (InnderDemon[i])
+ if (!InnderDemon[i].IsEmpty())
{
//delete creature
Creature* creature = ObjectAccessor::GetCreature((*me), InnderDemon[i]);
@@ -373,7 +373,7 @@ public:
{
for (uint8 i = 0; i < 5; ++i)
{
- if (InnderDemon[i])
+ if (!InnderDemon[i].IsEmpty())
{
Creature* unit = ObjectAccessor::GetCreature((*me), InnderDemon[i]);
if (unit && unit->IsAlive())
@@ -402,11 +402,10 @@ public:
Talk(SAY_DEATH);
//despawn copy
- if (Demon)
- {
+ if (!Demon.IsEmpty())
if (Creature* pDemon = ObjectAccessor::GetCreature(*me, Demon))
pDemon->DespawnOrUnsummon();
- }
+
instance->SetData(DATA_LEOTHERASTHEBLINDEVENT, DONE);
}
@@ -742,7 +741,7 @@ public:
{
if (!me->IsInCombat() && !me->GetCurrentSpell(CURRENT_CHANNELED_SPELL))
{
- if (leotherasGUID)
+ if (!leotherasGUID.IsEmpty())
{
Creature* leotheras = ObjectAccessor::GetCreature(*me, leotherasGUID);
if (leotheras && leotheras->IsAlive())
diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp
index e8ce29e9f1a..d730c26c4f4 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp
@@ -133,7 +133,7 @@ public:
} else SporeStriders_Timer -= diff;
// Levitate
- if (LevitatedTarget)
+ if (!LevitatedTarget.IsEmpty())
{
if (LevitatedTarget_Timer <= diff)
{
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
index 831818a4c9a..f53b4bea70c 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
@@ -168,7 +168,7 @@ class boss_omor_the_unscarred : public CreatureScript
OrbitalStrike_Timer = 14000 + rand32() % 2000;
PlayerGUID = temp->GetGUID();
- if (PlayerGUID)
+ if (!PlayerGUID.IsEmpty())
CanPullBack = true;
}
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
index e7c1e60e432..7dbccf5908a 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
@@ -268,8 +268,8 @@ class boss_magtheridon : public CreatureScript
void SetClicker(ObjectGuid cubeGUID, ObjectGuid clickerGUID)
{
// to avoid multiclicks from 1 cube
- if (ObjectGuid guid = Cube[cubeGUID])
- DebuffClicker(ObjectAccessor::GetUnit(*me, guid));
+ if (!Cube[cubeGUID].IsEmpty())
+ DebuffClicker(ObjectAccessor::GetUnit(*me, Cube[cubeGUID]));
Cube[cubeGUID] = clickerGUID;
NeedCheckCube = true;
}
diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
index 0952fc04512..b37adae3fe9 100644
--- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
+++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
@@ -417,7 +417,7 @@ public:
if (id == 1)
{
- if (PlayerGUID)
+ if (!PlayerGUID.IsEmpty())
{
Unit* player = ObjectAccessor::GetUnit(*me, PlayerGUID);
if (player)
@@ -441,7 +441,7 @@ public:
if (FlyTimer <= diff)
{
Tapped = false;
- if (PlayerGUID)
+ if (!PlayerGUID.IsEmpty())
{
Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID);
if (player && player->GetQuestStatus(10854) == QUEST_STATUS_INCOMPLETE)
@@ -551,7 +551,7 @@ public:
{
if (PoisonTimer <= diff)
{
- if (PlayerGUID)
+ if (!PlayerGUID.IsEmpty())
{
Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID);
if (player && player->GetQuestStatus(11020) == QUEST_STATUS_INCOMPLETE)
@@ -776,7 +776,7 @@ public:
IllidanGUID = Illidan->GetGUID();
Illidan->SetVisible(false);
}
- if (PlayerGUID)
+ if (!PlayerGUID.IsEmpty())
{
Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID);
if (player)
@@ -1760,7 +1760,7 @@ void npc_lord_illidan_stormrage::npc_lord_illidan_stormrageAI::SummonNextWave()
if (WaveCount < 3)//1-3 Wave
{
- if (PlayerGUID)
+ if (!PlayerGUID.IsEmpty())
{
if (Player* target = ObjectAccessor::GetPlayer(*me, PlayerGUID))
{
@@ -1775,7 +1775,7 @@ void npc_lord_illidan_stormrage::npc_lord_illidan_stormrageAI::SummonNextWave()
if (WavesInfo[WaveCount].CreatureId == 22076) // Torloth
{
ENSURE_AI(npc_torloth_the_magnificent::npc_torloth_the_magnificentAI, Spawn->AI())->LordIllidanGUID = me->GetGUID();
- if (PlayerGUID)
+ if (!PlayerGUID.IsEmpty())
ENSURE_AI(npc_torloth_the_magnificent::npc_torloth_the_magnificentAI, Spawn->AI())->AggroTargetGUID = PlayerGUID;
}
}