mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 10:00:28 +00:00
refactor(Core): Make ObjectGuid const (#23170)
* cherry-pick commit (a7883380ce)
Co-Authored-By: Lucas Nascimento <keader.android@gmail.com>
This commit is contained in:
@@ -118,7 +118,7 @@ public:
|
||||
return !victim->HasAura(SPELL_TIMELAPSE);
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 id) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 id) override
|
||||
{
|
||||
if (id == GUID_LEVER_USER)
|
||||
{
|
||||
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid const guid, int32 /*id*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||
{
|
||||
_charmerGUID = guid;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 index) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 index) override
|
||||
{
|
||||
if (index == GO_LAVA_BURST)
|
||||
{
|
||||
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
uint32 checkTimer;
|
||||
ObjectGuid playerGUID;
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32) override
|
||||
void SetGUID(ObjectGuid const& guid, int32) override
|
||||
{
|
||||
playerGUID = guid;
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ struct boss_shade_of_aran : public BossAI
|
||||
return me->GetDistance2d(roomCenter.GetPositionX(), roomCenter.GetPositionY()) < 45.0f;
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 id) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 id) override
|
||||
{
|
||||
if (id == ACTION_ATIESH_REACT && !_atieshReaction)
|
||||
{
|
||||
|
||||
@@ -396,7 +396,7 @@ public:
|
||||
AttackStart(attacker);
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32) override
|
||||
void SetGUID(ObjectGuid const& guid, int32) override
|
||||
{
|
||||
gothikGUID = guid;
|
||||
events.ScheduleEvent(EVENT_GHOUL_MOVE_TO_PIT, 3s);
|
||||
@@ -806,7 +806,7 @@ public:
|
||||
|
||||
ObjectGuid prisonerGUID;
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 /*id*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||
{
|
||||
if (!prisonerGUID)
|
||||
prisonerGUID = guid;
|
||||
@@ -866,7 +866,7 @@ public:
|
||||
|
||||
ObjectGuid minerGUID;
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 /*id*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||
{
|
||||
minerGUID = guid;
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid const guid, int32 type) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 type) override
|
||||
{
|
||||
if (type == ACTION_CHARGE)
|
||||
{
|
||||
@@ -564,7 +564,7 @@ public:
|
||||
RevivePlayer(victim, reviveGUID);
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid const guid, int32 /*type = 0 */) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*type = 0 */) override
|
||||
{
|
||||
reviveGUID = guid;
|
||||
}
|
||||
@@ -612,7 +612,7 @@ public:
|
||||
revivePlayerGUID.Clear();
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid const guid, int32 /*id*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||
{
|
||||
revivePlayerGUID = guid;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
_faction = faction;
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32) override
|
||||
void SetGUID(ObjectGuid const& guid, int32) override
|
||||
{
|
||||
_playerGUID = guid;
|
||||
me->ReplaceAllNpcFlags(UNIT_NPC_FLAG_NONE);
|
||||
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
_events.ScheduleEvent(EVENT_MULTI_SHOT, 10s);
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 type) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 type) override
|
||||
{
|
||||
if (type == GUID_EVENT_INVOKER)
|
||||
{
|
||||
|
||||
@@ -1743,7 +1743,7 @@ struct npc_coren_direbrew_sisters : public ScriptedAI
|
||||
{
|
||||
npc_coren_direbrew_sisters(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 id) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 id) override
|
||||
{
|
||||
if (id == DATA_TARGET_GUID)
|
||||
{
|
||||
|
||||
@@ -335,7 +335,7 @@ struct boss_archimonde : public BossAI
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 type) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 type) override
|
||||
{
|
||||
if (type == GUID_GAIN_SOUL_CHARGE_PLAYER)
|
||||
{
|
||||
|
||||
@@ -154,7 +154,7 @@ struct boss_ossirian : public BossAI
|
||||
}
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 action) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 action) override
|
||||
{
|
||||
if (action == ACTION_TRIGGER_WEAKNESS && guid != _firstCrystalGUID)
|
||||
{
|
||||
@@ -317,7 +317,7 @@ public:
|
||||
{
|
||||
go_ossirian_crystalAI(GameObject* go) : GameObjectAI(go), _instance(go->GetInstanceScript()) { }
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 type) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 type) override
|
||||
{
|
||||
if (type == GUID_TRIGGER_PAIR)
|
||||
{
|
||||
|
||||
@@ -552,7 +552,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid /*guid*/, int32 type) override
|
||||
void SetGUID(ObjectGuid const& /*guid*/, int32 type) override
|
||||
{
|
||||
if (type == GUID_SCRIPT_INVOKER && _scriptRunning == false)
|
||||
{
|
||||
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
ImmuneFlagSet(false, _faction);
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid playerGUID, int32 faction) override
|
||||
void SetGUID(ObjectGuid const& playerGUID, int32 faction) override
|
||||
{
|
||||
_playerGUID = playerGUID;
|
||||
_faction = faction;
|
||||
|
||||
@@ -1293,7 +1293,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 /*type*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*type*/) override
|
||||
{
|
||||
_chaseGUID = guid;
|
||||
}
|
||||
|
||||
@@ -533,7 +533,7 @@ public:
|
||||
return _bloodboltedPlayers.count(guid) != 0;
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 type = 0) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 type = 0) override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -703,7 +703,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 id/* = 0*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 id/* = 0*/) override
|
||||
{
|
||||
if (id != ACTION_SHIP_VISITS_ENEMY && id != ACTION_SHIP_VISITS_SELF)
|
||||
return;
|
||||
|
||||
@@ -745,7 +745,7 @@ public:
|
||||
|
||||
ObjectGuid targetGUID;
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 type) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 type) override
|
||||
{
|
||||
if (type == -1)
|
||||
targetGUID = guid;
|
||||
|
||||
@@ -698,7 +698,7 @@ public:
|
||||
uint32 _existenceCheckTimer;
|
||||
uint16 _asphyxiationTimer;
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 type) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 type) override
|
||||
{
|
||||
if (type == DATA_TRAPPED_PLAYER)
|
||||
_trappedPlayerGUID = guid;
|
||||
|
||||
@@ -2536,7 +2536,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 /* = 0*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 /* = 0*/) override
|
||||
{
|
||||
_grabbedPlayer = guid;
|
||||
}
|
||||
|
||||
@@ -772,7 +772,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 type/* = 0*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 type/* = 0*/) override
|
||||
{
|
||||
if (type == ACTION_VRYKUL_DEATH)
|
||||
{
|
||||
|
||||
@@ -1421,7 +1421,7 @@ public:
|
||||
_playerGUID.Clear();
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 /*action*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*action*/) override
|
||||
{
|
||||
if (_playerGUID)
|
||||
return;
|
||||
|
||||
@@ -1093,7 +1093,7 @@ public:
|
||||
me->GetMotionMaster()->Clear();
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 /*id*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||
{
|
||||
if (playerGUID || events.HasTimeUntilEvent(998) || events.HasTimeUntilEvent(2))
|
||||
return;
|
||||
|
||||
@@ -241,7 +241,7 @@ struct npc_stolen_soul : public ScriptedAI
|
||||
});
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 /*id*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||
{
|
||||
_targetGuid = guid;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ struct boss_murmur : public BossAI
|
||||
return true;
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 index) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 index) override
|
||||
{
|
||||
if (index == GUID_MURMUR_NPCS)
|
||||
{
|
||||
|
||||
@@ -670,7 +670,7 @@ public:
|
||||
}
|
||||
|
||||
// Used for getting involved player guid. Parameter id is used for defining if is a large(Monument) or small(Relic) node
|
||||
void SetGUID(ObjectGuid guid, int32 id) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 id) override
|
||||
{
|
||||
me->SetCanFly(true);
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@ public:
|
||||
uint32 HealTimer;
|
||||
uint32 FrostShockTimer;
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 /*questId*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*questId*/) override
|
||||
{
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
Start(true, false, guid);
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
npc_escortAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid playerGUID, int32 type) override
|
||||
void SetGUID(ObjectGuid const& playerGUID, int32 type) override
|
||||
{
|
||||
if (type == DATA_START_ENCOUNTER)
|
||||
{
|
||||
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
});
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 type) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 type) override
|
||||
{
|
||||
if (type == GUID_DRAGON)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user