aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2014-09-15 00:23:47 +0200
committerShauren <shauren.trinity@gmail.com>2014-09-15 00:23:47 +0200
commit6ce0a3107d06cb5485e09afca42dbef4baa9553b (patch)
treef2640c707e183ce5b7dc63200daf4713f3f24d1c /src
parent56f46e3ce543af8ffdc708eaa4ceecc173a5eb29 (diff)
Core/Scripts: Changed GetGUID/SetGUID script hooks to operate on ObjectGuid class
Fixed compile for boss scripts starting with letters B, C and D
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.h4
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp4
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.h4
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp10
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp8
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp40
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp4
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp37
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp2
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp2
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp12
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp20
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp4
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp6
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp4
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp4
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp6
-rw-r--r--src/server/scripts/Outland/boss_doomwalker.cpp2
-rw-r--r--src/server/scripts/Outland/zone_blades_edge_mountains.cpp4
27 files changed, 88 insertions, 105 deletions
diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h
index 979fe4fe558..5d67c9546aa 100644
--- a/src/server/game/AI/CoreAI/UnitAI.h
+++ b/src/server/game/AI/CoreAI/UnitAI.h
@@ -137,8 +137,8 @@ class UnitAI
virtual void DoAction(int32 /*param*/) { }
virtual uint32 GetData(uint32 /*id = 0*/) const { return 0; }
virtual void SetData(uint32 /*id*/, uint32 /*value*/) { }
- virtual void SetGUID(uint64 /*guid*/, int32 /*id*/ = 0) { }
- virtual uint64 GetGUID(int32 /*id*/ = 0) const { return 0; }
+ virtual void SetGUID(ObjectGuid /*guid*/, int32 /*id*/ = 0) { }
+ virtual ObjectGuid GetGUID(int32 /*id*/ = 0) const { return ObjectGuid::Empty; }
Unit* SelectTarget(SelectAggroTarget targetType, uint32 position = 0, float dist = 0.0f, bool playerOnly = false, int32 aura = 0);
// Select the targets satisfying the predicate.
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 71e48029dee..edb2b589dc1 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -694,9 +694,9 @@ void SmartAI::SetData(uint32 id, uint32 value)
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, NULL, id, value);
}
-void SmartAI::SetGUID(uint64 /*guid*/, int32 /*id*/) { }
+void SmartAI::SetGUID(ObjectGuid /*guid*/, int32 /*id*/) { }
-uint64 SmartAI::GetGUID(int32 /*id*/) const
+ObjectGuid SmartAI::GetGUID(int32 /*id*/) const
{
return 0;
}
diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h
index 05a2154da6f..a5abf2a33e3 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.h
+++ b/src/server/game/AI/SmartScripts/SmartAI.h
@@ -154,10 +154,10 @@ class SmartAI : public CreatureAI
void SetData(uint32 id, uint32 value) override;
// Used in scripts to share variables
- void SetGUID(uint64 guid, int32 id = 0) override;
+ void SetGUID(ObjectGuid guid, int32 id = 0) override;
// Used in scripts to share variables
- uint64 GetGUID(int32 id = 0) const override;
+ ObjectGuid GetGUID(int32 id = 0) const override;
//core related
static int Permissible(const Creature*);
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index 58ebef77425..3799dde3ce1 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -300,17 +300,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;
}
@@ -1148,7 +1148,7 @@ class npc_scarlet_miner : public CreatureScript
}
}
- void SetGUID(uint64 guid, int32 /*id = 0*/) override
+ void SetGUID(ObjectGuid guid, int32 /*id = 0*/) override
{
InitWaypoint();
Start(false, false, guid);
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
index dc0429d94fd..d6640b5a0ab 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
@@ -76,8 +76,8 @@ class boss_buru : public CreatureScript
{
BossAI::EnterEvadeMode();
- for (std::list<uint64>::iterator i = Eggs.begin(); i != Eggs.end(); ++i)
- if (Creature* egg = me->GetMap()->GetCreature(*Eggs.begin()))
+ for (ObjectGuid eggGuid : Eggs)
+ if (Creature* egg = me->GetMap()->GetCreature(eggGuid))
egg->Respawn();
Eggs.clear();
@@ -127,7 +127,7 @@ class boss_buru : public CreatureScript
}
}
- void ManageRespawn(uint64 EggGUID)
+ void ManageRespawn(ObjectGuid EggGUID)
{
ChaseNewVictim();
Eggs.push_back(EggGUID);
@@ -183,8 +183,8 @@ class boss_buru : public CreatureScript
DoMeleeAttackIfReady();
}
private:
+ GuidList Eggs;
uint8 _phase;
- std::list<uint64> Eggs;
};
CreatureAI* GetAI(Creature* creature) const override
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
index c9795133d14..218aa69304c 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -307,7 +307,7 @@ public:
me->SetReactState(REACT_PASSIVE);
//Remove any target
- me->SetTarget(0);
+ me->SetTarget(ObjectGuid::Empty);
//Select random target for dark beam to start on
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
@@ -384,7 +384,7 @@ public:
//Transition phase
case PHASE_CTHUN_TRANSITION:
//Remove any target
- me->SetTarget(0);
+ me->SetTarget(ObjectGuid::Empty);
me->SetHealth(0);
me->SetVisible(false);
break;
@@ -420,7 +420,7 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
//Remove Target field
- me->SetTarget(0);
+ me->SetTarget(ObjectGuid::Empty);
//Death animation/respawning;
instance->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_TRANSITION);
@@ -475,7 +475,7 @@ public:
PhaseTimer = 10000; //Emerge in 10 seconds
//No hold player for transition
- HoldPlayer = 0;
+ HoldPlayer.Clear();
//Body Phase
EyeTentacleTimer = 30000;
@@ -485,7 +485,7 @@ public:
StomachAcidTimer = 4000; //Every 4 seconds
StomachEnterTimer = 10000; //Every 10 seconds
StomachEnterVisTimer = 0; //Always 3.5 seconds after Stomach Enter Timer
- StomachEnterTarget = 0; //Target to be teleported to stomach
+ StomachEnterTarget.Clear(); //Target to be teleported to stomach
}
InstanceScript* instance;
@@ -499,7 +499,7 @@ public:
//-------------------
//Phase transition
- uint64 HoldPlayer;
+ ObjectGuid HoldPlayer;
//Body Phase
uint32 EyeTentacleTimer;
@@ -509,10 +509,10 @@ public:
uint32 StomachAcidTimer;
uint32 StomachEnterTimer;
uint32 StomachEnterVisTimer;
- uint64 StomachEnterTarget;
+ ObjectGuid StomachEnterTarget;
//Stomach map, bool = true then in stomach
- std::unordered_map<uint64, bool> Stomach_Map;
+ std::unordered_map<ObjectGuid, bool> Stomach_Map;
void Reset() override
{
@@ -548,7 +548,7 @@ public:
if (Stomach_Map.empty())
return NULL;
- std::unordered_map<uint64, bool>::const_iterator i = Stomach_Map.begin();
+ std::unordered_map<ObjectGuid, bool>::const_iterator i = Stomach_Map.begin();
std::list<Unit*> temp;
std::list<Unit*>::const_iterator j;
@@ -610,7 +610,7 @@ public:
return;
}
- me->SetTarget(0);
+ me->SetTarget(ObjectGuid::Empty);
uint32 currentPhase = instance->GetData(DATA_CTHUN_PHASE);
if (currentPhase == PHASE_CTHUN_STOMACH || currentPhase == PHASE_CTHUN_WEAK)
@@ -680,7 +680,7 @@ public:
//Body Phase
case PHASE_CTHUN_STOMACH:
//Remove Target field
- me->SetTarget(0);
+ me->SetTarget(ObjectGuid::Empty);
//Weaken
if (FleshTentaclesKilled > 1)
@@ -692,7 +692,7 @@ public:
DoCast(me, SPELL_PURPLE_COLORATION, true);
- std::unordered_map<uint64, bool>::iterator i = Stomach_Map.begin();
+ std::unordered_map<ObjectGuid, bool>::iterator i = Stomach_Map.begin();
//Kick all players out of stomach
while (i != Stomach_Map.end())
@@ -724,7 +724,7 @@ public:
if (StomachAcidTimer <= diff)
{
//Apply aura to all players in stomach
- std::unordered_map<uint64, bool>::iterator i = Stomach_Map.begin();
+ std::unordered_map<ObjectGuid, bool>::iterator i = Stomach_Map.begin();
while (i != Stomach_Map.end())
{
@@ -786,7 +786,7 @@ public:
DoTeleportPlayer(unit, STOMACH_X, STOMACH_Y, STOMACH_Z, STOMACH_O);
}
- StomachEnterTarget = 0;
+ StomachEnterTarget.Clear();
StomachEnterVisTimer = 0;
} else StomachEnterVisTimer -= diff;
}
@@ -913,7 +913,6 @@ public:
MindflayTimer = 500;
KillSelfTimer = 35000;
- Portal = 0;
if (Creature* pPortal = me->SummonCreature(NPC_SMALL_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
{
pPortal->SetReactState(REACT_PASSIVE);
@@ -925,7 +924,7 @@ public:
uint32 MindflayTimer;
uint32 KillSelfTimer;
- uint64 Portal;
+ ObjectGuid Portal;
void JustDied(Unit* /*killer*/) override
{
@@ -995,7 +994,6 @@ public:
SetCombatMovement(false);
- Portal = 0;
if (Creature* pPortal = me->SummonCreature(NPC_SMALL_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
{
pPortal->SetReactState(REACT_PASSIVE);
@@ -1006,7 +1004,7 @@ public:
uint32 GroundRuptureTimer;
uint32 HamstringTimer;
uint32 EvadeTimer;
- uint64 Portal;
+ ObjectGuid Portal;
void JustDied(Unit* /*killer*/) override
{
@@ -1111,7 +1109,6 @@ public:
SetCombatMovement(false);
- Portal = 0;
if (Creature* pPortal = me->SummonCreature(NPC_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
{
pPortal->SetReactState(REACT_PASSIVE);
@@ -1123,7 +1120,7 @@ public:
uint32 ThrashTimer;
uint32 HamstringTimer;
uint32 EvadeTimer;
- uint64 Portal;
+ ObjectGuid Portal;
void JustDied(Unit* /*killer*/) override
{
@@ -1233,7 +1230,6 @@ public:
SetCombatMovement(false);
- Portal = 0;
if (Creature* pPortal = me->SummonCreature(NPC_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
{
pPortal->SetReactState(REACT_PASSIVE);
@@ -1242,7 +1238,7 @@ public:
}
uint32 BeamTimer;
- uint64 Portal;
+ ObjectGuid Portal;
void JustDied(Unit* /*killer*/) override
{
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
index 89c9253a610..637bdd71455 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
@@ -302,7 +302,7 @@ class npc_prince_taldaram_flame_sphere : public CreatureScript
_events.ScheduleEvent(EVENT_DESPAWN, 13 * IN_MILLISECONDS);
}
- void SetGUID(uint64 guid, int32 /*id = 0*/) override
+ void SetGUID(ObjectGuid guid, int32 /*id = 0*/) override
{
_flameSphereTargetGUID = guid;
}
@@ -364,7 +364,7 @@ class npc_prince_taldaram_flame_sphere : public CreatureScript
private:
EventMap _events;
- uint64 _flameSphereTargetGUID;
+ ObjectGuid _flameSphereTargetGUID;
};
CreatureAI* GetAI(Creature* creature) const override
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
index e342b3bbfb1..60b25a649ca 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
@@ -81,7 +81,7 @@ public:
struct boss_black_knightAI : public ScriptedAI
{
- boss_black_knightAI(Creature* creature) : ScriptedAI(creature)
+ boss_black_knightAI(Creature* creature) : ScriptedAI(creature), summons(creature)
{
Initialize();
instance = creature->GetInstanceScript();
@@ -110,7 +110,7 @@ public:
InstanceScript* instance;
- std::list<uint64> SummonList;
+ SummonList summons;
bool bEventInProgress;
bool bEvent;
@@ -132,31 +132,22 @@ public:
void Reset() override
{
- RemoveSummons();
+ summons.DespawnAll();
me->SetDisplayId(me->GetNativeDisplayId());
me->ClearUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED);
Initialize();
}
- void RemoveSummons()
+ void JustSummoned(Creature* summon) override
{
- if (SummonList.empty())
- return;
-
- for (std::list<uint64>::const_iterator itr = SummonList.begin(); itr != SummonList.end(); ++itr)
- {
- if (Creature* temp = ObjectAccessor::GetCreature(*me, *itr))
- if (temp)
- temp->DisappearAndDie();
- }
- SummonList.clear();
+ summons.Summon(summon);
+ summon->AI()->AttackStart(me->GetVictim());
}
- void JustSummoned(Creature* summon) override
+ void SummonedCreatureDespawn(Creature* summon) override
{
- SummonList.push_back(summon->GetGUID());
- summon->AI()->AttackStart(me->GetVictim());
+ summons.Despawn(summon);
}
void UpdateAI(uint32 uiDiff) override
@@ -281,7 +272,7 @@ public:
uiDamage = 0;
me->SetHealth(0);
me->AddUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED);
- RemoveSummons();
+ summons.DespawnAll();
switch (uiPhase)
{
case PHASE_UNDEAD:
@@ -367,20 +358,16 @@ public:
{
npc_black_knight_skeletal_gryphonAI(Creature* creature) : npc_escortAI(creature)
{
- Start(false, true, 0, NULL);
+ Start(false, true);
}
- void WaypointReached(uint32 /*waypointId*/) override
- {
-
- }
+ void WaypointReached(uint32 /*waypointId*/) override { }
void UpdateAI(uint32 uiDiff) override
{
npc_escortAI::UpdateAI(uiDiff);
- if (!UpdateVictim())
- return;
+ UpdateVictim();
}
};
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
index 4b4fd398e72..32590135f27 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
@@ -301,7 +301,7 @@ class boss_devourer_of_souls : public CreatureScript
me->SetReactState(REACT_PASSIVE);
//Remove any target
- me->SetTarget(0);
+ me->SetTarget(ObjectGuid::Empty);
me->GetMotionMaster()->Clear();
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
index f71c414b4b0..81d80dc55d4 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
@@ -330,7 +330,7 @@ class boss_rimefang : public CreatureScript
_EnterEvadeMode();
}
- void SetGUID(uint64 guid, int32 type) override
+ void SetGUID(ObjectGuid guid, int32 type) override
{
if (type == GUID_HOARFROST)
{
diff --git a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
index 5db49415604..998ce64f08a 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
@@ -199,7 +199,7 @@ public:
lSummons.Summon(summoned);
}
- void SetGUID(uint64 guid, int32 type) override
+ void SetGUID(ObjectGuid guid, int32 type) override
{
if (type == DATA_SNAKES_WHYD_IT_HAVE_TO_BE_SNAKES)
lWrappedPlayers.insert(guid);
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
index 1bc2e842292..640c06b1c28 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
@@ -335,12 +335,12 @@ class boss_blood_council_controller : public CreatureScript
private:
struct InvocationData
{
- uint64 guid;
+ ObjectGuid guid;
uint32 spellId;
uint32 textId;
uint32 visualSpell;
- InvocationData(uint64 _guid, uint32 _spellId, uint32 _textId, uint32 _visualSpell)
+ InvocationData(ObjectGuid _guid, uint32 _spellId, uint32 _textId, uint32 _visualSpell)
{
guid = _guid;
spellId = _spellId;
@@ -348,7 +348,7 @@ class boss_blood_council_controller : public CreatureScript
visualSpell = _visualSpell;
}
- InvocationData() : guid(0), spellId(0), textId(0), visualSpell(0) { }
+ InvocationData() : spellId(0), textId(0), visualSpell(0) { }
} _invocationOrder[3];
uint32 _invocationStage;
@@ -1167,13 +1167,13 @@ class npc_ball_of_flame : public CreatureScript
me->RemoveAurasDueToSpell(SPELL_BALL_OF_FLAMES_PERIODIC);
DoCast(me, SPELL_FLAMES);
_despawnTimer = 1000;
- _chaseGUID = 0;
+ _chaseGUID.Clear();
}
}
- void SetGUID(uint64 guid, int32 /*type*/) override
+ void SetGUID(ObjectGuid guid, int32 /*type*/) override
{
- _chaseGUID.Set(guid);
+ _chaseGUID = guid;
}
void DoAction(int32 action) override
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
index 7bc8b59060e..8a325dee7b4 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
@@ -148,7 +148,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
void Initialize()
{
- _offtankGUID = 0;
+ _offtankGUID.Clear();
_creditBloodQuickening = false;
_killMinchar = false;
}
@@ -210,7 +210,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
minchar->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND);
minchar->SetCanFly(false);
minchar->RemoveAllAuras();
- minchar->GetMotionMaster()->MoveCharge(4629.3711f, 2782.6089f, 401.5301f, SPEED_CHARGE/3.0f);
+ minchar->GetMotionMaster()->MoveCharge(4629.3711f, 2782.6089f, 401.5301f, SPEED_CHARGE / 3.0f);
}
}
}
@@ -278,7 +278,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
Talk(SAY_KILL);
}
- void SetGUID(uint64 guid, int32 type = 0) override
+ void SetGUID(ObjectGuid guid, int32 type = 0) override
{
switch (type)
{
@@ -390,7 +390,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
}
}
else
- _offtankGUID = 0;
+ _offtankGUID.Clear();
}
events.ScheduleEvent(EVENT_BLOOD_MIRROR, 2500, EVENT_GROUP_CANCELLABLE);
break;
@@ -458,12 +458,12 @@ class boss_blood_queen_lana_thel : public CreatureScript
DoMeleeAttackIfReady();
}
- bool WasVampire(uint64 guid)
+ bool WasVampire(ObjectGuid guid) const
{
return _vampires.count(guid) != 0;
}
- bool WasBloodbolted(uint64 guid)
+ bool WasBloodbolted(ObjectGuid guid) const
{
return _bloodboltedPlayers.count(guid) != 0;
}
@@ -501,9 +501,9 @@ class boss_blood_queen_lana_thel : public CreatureScript
return Trinity::Containers::SelectRandomContainerElement(tempTargets);
}
- std::set<uint64> _vampires;
- std::set<uint64> _bloodboltedPlayers;
- uint64 _offtankGUID;
+ GuidSet _vampires;
+ GuidSet _bloodboltedPlayers;
+ ObjectGuid _offtankGUID;
bool _creditBloodQuickening;
bool _killMinchar;
};
@@ -554,7 +554,7 @@ class spell_blood_queen_vampiric_bite : public SpellScriptLoader
return;
uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_FRENZIED_BLOODTHIRST, GetCaster());
- GetCaster()->RemoveAura(spellId, 0, 0, AURA_REMOVE_BY_ENEMY_SPELL);
+ GetCaster()->RemoveAura(spellId, ObjectGuid::Empty, 0, AURA_REMOVE_BY_ENEMY_SPELL);
GetCaster()->CastSpell(GetCaster(), SPELL_ESSENCE_OF_THE_BLOOD_QUEEN_PLR, TRIGGERED_FULL_MASK);
// Shadowmourne questline
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
index 0e0571ef989..de3e3a360ac 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
@@ -796,7 +796,7 @@ class npc_gunship : public CreatureScript
}
}
- void SetGUID(uint64 guid, int32 id/* = 0*/) override
+ void SetGUID(ObjectGuid guid, int32 id/* = 0*/) override
{
if (id != ACTION_SHIP_VISITS)
return;
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
index bbdca1fa8c5..3a7bb771c79 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
@@ -554,7 +554,7 @@ class boss_lady_deathwhisper : public CreatureScript
summon->CastSpell(summon, SPELL_TELEPORT_VISUAL);
}
- void SetGUID(uint64 guid, int32 id/* = 0*/) override
+ void SetGUID(ObjectGuid guid, int32 id/* = 0*/) override
{
if (id != GUID_CULTIST)
return;
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
index b7bf27177ea..a8fa6dc1b3c 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
@@ -289,7 +289,7 @@ class boss_lord_marrowgar : public CreatureScript
return &_coldflameLastPos;
}
- uint64 GetGUID(int32 type /*= 0 */) const override
+ ObjectGuid GetGUID(int32 type /*= 0 */) const override
{
switch (type)
{
@@ -310,7 +310,7 @@ class boss_lord_marrowgar : public CreatureScript
return 0LL;
}
- void SetGUID(uint64 guid, int32 type /*= 0 */) override
+ void SetGUID(ObjectGuid guid, int32 type /*= 0 */) override
{
switch (type)
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
index fcab016e6fe..cb8fa6a2bf6 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
@@ -573,7 +573,7 @@ class npc_ice_tomb : public CreatureScript
me->SetReactState(REACT_PASSIVE);
}
- void SetGUID(uint64 guid, int32 type/* = 0 */) override
+ void SetGUID(ObjectGuid guid, int32 type/* = 0 */) override
{
if (type == DATA_TRAPPED_PLAYER)
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
index 0d9ab3114fa..36bf874b9ea 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
@@ -1518,7 +1518,7 @@ class npc_valkyr_shadowguard : public CreatureScript
}
}
- void SetGUID(uint64 guid, int32 /* = 0*/) override
+ void SetGUID(ObjectGuid guid, int32 /* = 0*/) override
{
_grabbedPlayer = guid;
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
index 0189ce2d124..3adad9f93da 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
@@ -1000,7 +1000,7 @@ class npc_crok_scourgebane : public CreatureScript
}
}
- void SetGUID(uint64 guid, int32 type/* = 0*/) override
+ void SetGUID(ObjectGuid guid, int32 type/* = 0*/) override
{
if (type == ACTION_VRYKUL_DEATH)
{
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
index 5b02b7a2009..10b74ca938d 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
@@ -157,11 +157,11 @@ public:
struct npc_webwrapAI : public NullCreatureAI
{
- npc_webwrapAI(Creature* creature) : NullCreatureAI(creature), victimGUID(0) { }
+ npc_webwrapAI(Creature* creature) : NullCreatureAI(creature) { }
- uint64 victimGUID;
+ ObjectGuid victimGUID;
- void SetGUID(uint64 guid, int32 /*param*/) override
+ void SetGUID(ObjectGuid guid, int32 /*param*/) override
{
victimGUID = guid;
if (me->m_spells[0] && victimGUID)
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
index 06b8bfb7254..0d40eea5397 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
@@ -417,7 +417,7 @@ public:
}
}
- uint64 GetGUID(int32 type) const override
+ ObjectGuid GetGUID(int32 type) const override
{
if (type >= DATA_FIRST_SURGE_TARGET_GUID && type < DATA_FIRST_SURGE_TARGET_GUID + NUM_MAX_SURGE_TARGETS)
return _surgeTargetGUID[type - DATA_FIRST_SURGE_TARGET_GUID];
@@ -427,7 +427,7 @@ public:
return 0;
}
- void SetGUID(uint64 guid, int32 type) override
+ void SetGUID(ObjectGuid guid, int32 type) override
{
switch (type)
{
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
index d05fd02838a..73756119d78 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
@@ -157,7 +157,7 @@ public:
}
}
- void SetGUID(uint64 guid, int32 id/* = 0 */) override
+ void SetGUID(ObjectGuid guid, int32 id/* = 0 */) override
{
if (id == DATA_INTENSE_COLD)
intenseColdList.push_back(guid);
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp
index 13ac39f36f8..b4a95239df2 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp
@@ -108,7 +108,6 @@ public:
{
instance = creature->GetInstanceScript();
m_uiStance = STANCE_DEFENSIVE;
- memset(&m_auiStormforgedLieutenantGUID, 0, sizeof(m_auiStormforgedLieutenantGUID));
canBuff = true;
}
@@ -135,7 +134,7 @@ public:
uint32 m_uiMortalStrike_Timer;
uint32 m_uiSlam_Timer;
- uint64 m_auiStormforgedLieutenantGUID[2];
+ ObjectGuid m_auiStormforgedLieutenantGUID[2];
void Reset() override
{
@@ -164,6 +163,7 @@ public:
for (uint8 i = 0; i < 2; ++i)
{
+ // Something isn't right here - m_auiStormforgedLieutenantGUID is never assinged to
if (Creature* pStormforgedLieutenant = ObjectAccessor::GetCreature(*me, m_auiStormforgedLieutenantGUID[i]))
if (!pStormforgedLieutenant->IsAlive())
pStormforgedLieutenant->Respawn();
diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp
index f02edbb5584..cddcdce8c2d 100644
--- a/src/server/scripts/Northrend/zone_borean_tundra.cpp
+++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp
@@ -2225,7 +2225,7 @@ public:
uiEventPhase = 1;
}
- void SetGUID(uint64 uiGuid, int32 /*iId*/) override
+ void SetGUID(ObjectGuid uiGuid, int32 /*iId*/) override
{
uiPlayerGUID = uiGuid;
}
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 9d29577406c..119c59e6a64 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
@@ -97,17 +97,17 @@ public:
Link_Timer = 1000;
}
- void SetGUID(uint64 guid, int32 id/* = 0 */) override
+ void SetGUID(ObjectGuid guid, int32 id/* = 0 */) override
{
if (id == INNER_DEMON_VICTIM)
victimGUID = guid;
}
- uint64 GetGUID(int32 id/* = 0 */) const override
+ ObjectGuid GetGUID(int32 id/* = 0 */) const override
{
if (id == INNER_DEMON_VICTIM)
return victimGUID;
- return 0;
+ return ObjectGuid::Empty;
}
void JustDied(Unit* /*killer*/) override
diff --git a/src/server/scripts/Outland/boss_doomwalker.cpp b/src/server/scripts/Outland/boss_doomwalker.cpp
index a193e8ff880..7b72da0b02e 100644
--- a/src/server/scripts/Outland/boss_doomwalker.cpp
+++ b/src/server/scripts/Outland/boss_doomwalker.cpp
@@ -94,7 +94,7 @@ class boss_doomwalker : public CreatureScript
{
if (who && who->GetTypeId() == TYPEID_PLAYER && me->IsValidAttackTarget(who))
- if (who->HasAura(SPELL_MARK_DEATH, 0))
+ if (who->HasAura(SPELL_MARK_DEATH))
who->CastSpell(who, SPELL_AURA_DEATH, 1);
}
diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
index 03b8e7e69c8..86b5fa6f8c1 100644
--- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
+++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
@@ -617,7 +617,7 @@ class npc_simon_bunny : public CreatureScript
uint8 gameLevel;
uint8 fails;
uint8 gameTicks;
- uint64 playerGUID;
+ ObjectGuid playerGUID;
uint32 clusterIds[SIMON_MAX_COLORS];
float zCoordCorrection;
float searchDistance;
@@ -727,7 +727,7 @@ class npc_simon_bunny : public CreatureScript
}
// Used for getting involved player guid. Parameter id is used for defining if is a large(Monument) or small(Relic) node
- void SetGUID(uint64 guid, int32 id) override
+ void SetGUID(ObjectGuid guid, int32 id) override
{
me->SetCanFly(true);