aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms
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/EasternKingdoms
parent9cc7044546eaaaf4fd7a999c5e074ad0ea3d47ef (diff)
Core/Entities: Second batch of removing implicit conversions of ObjectGuid to uint64
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp15
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp2
4 files changed, 16 insertions, 11 deletions
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
index 0d9827d390c..8877289813b 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
@@ -227,7 +227,7 @@ public:
{
for (uint8 i = 0; i < 4; ++i)
{
- if (AddGUID[i])
+ if (!AddGUID[i].IsEmpty())
{
if (Creature* temp = ObjectAccessor::GetCreature(*me, AddGUID[i]))
temp->DespawnOrUnsummon();
@@ -239,7 +239,7 @@ public:
{
for (uint8 i = 0; i < 4; ++i)
{
- if (AddGUID[i])
+ if (!AddGUID[i].IsEmpty())
{
Creature* temp = ObjectAccessor::GetCreature((*me), AddGUID[i]);
if (temp && temp->IsAlive())
@@ -273,7 +273,7 @@ public:
{
for (uint8 i = 0; i < 4; ++i)
{
- if (AddGUID[i])
+ if (!AddGUID[i].IsEmpty())
{
Creature* temp = ObjectAccessor::GetCreature((*me), AddGUID[i]);
if (temp && temp->IsAlive())
@@ -353,15 +353,20 @@ struct boss_moroes_guestAI : public ScriptedAI
void AcquireGUID()
{
if (Creature* Moroes = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_MOROES)))
+ {
for (uint8 i = 0; i < 4; ++i)
- if (ObjectGuid GUID = ENSURE_AI(boss_moroes::boss_moroesAI, Moroes->AI())->AddGUID[i])
+ {
+ ObjectGuid GUID = ENSURE_AI(boss_moroes::boss_moroesAI, Moroes->AI())->AddGUID[i];
+ if (!GUID.IsEmpty())
GuestGUID[i] = GUID;
+ }
+ }
}
Unit* SelectGuestTarget()
{
ObjectGuid TempGUID = GuestGUID[rand32() % 4];
- if (TempGUID)
+ if (!TempGUID.IsEmpty())
{
Unit* unit = ObjectAccessor::GetUnit(*me, TempGUID);
if (unit && unit->IsAlive())
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
index e18aa3cd91c..2b0fb61dba3 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
@@ -160,7 +160,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- if (SacrificeGUID)
+ if (!SacrificeGUID.IsEmpty())
{
Unit* Sacrifice = ObjectAccessor::GetUnit(*me, SacrificeGUID);
if (Sacrifice)
@@ -301,7 +301,7 @@ public:
{
for (uint8 i = 0; i < 2; ++i)
{
- if (PortalGUID[i])
+ if (!PortalGUID[i].IsEmpty())
{
if (Creature* pPortal = ObjectAccessor::GetCreature(*me, PortalGUID[i]))
{
@@ -359,7 +359,7 @@ public:
{
for (uint8 i = 0; i < 2; ++i)
{
- if (PortalGUID[i])
+ if (!PortalGUID[i].IsEmpty())
{
if (Creature* pPortal = ObjectAccessor::GetCreature((*me), PortalGUID[i]))
pPortal->DespawnOrUnsummon();
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
index 63d543568fb..e32b32029d2 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
@@ -266,7 +266,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- if (DorotheeGUID)
+ if (!DorotheeGUID.IsEmpty())
{
Creature* Dorothee = (ObjectAccessor::GetCreature((*me), DorotheeGUID));
if (Dorothee && Dorothee->IsAlive())
@@ -1293,7 +1293,7 @@ public:
void EnterCombat(Unit* /*who*/) override
{
Talk(SAY_ROMULO_AGGRO);
- if (JulianneGUID)
+ if (!JulianneGUID.IsEmpty())
{
Creature* Julianne = (ObjectAccessor::GetCreature((*me), JulianneGUID));
if (Julianne && Julianne->GetVictim())
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index 15d33256fb6..0b1292e6aae 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -919,7 +919,7 @@ void npc_head::npc_headAI::Disappear()
if (withbody)
return;
- if (bodyGUID)
+ if (!bodyGUID.IsEmpty())
{
Creature* body = ObjectAccessor::GetCreature((*me), bodyGUID);
if (body && body->IsAlive())