refactor(Core): Make ObjectGuid const (#23170)

* cherry-pick commit (a7883380ce)

Co-Authored-By: Lucas Nascimento <keader.android@gmail.com>
This commit is contained in:
天鹭
2025-10-13 10:13:12 +08:00
committed by GitHub
parent 9c49349e1e
commit 8e2e30328f
51 changed files with 119 additions and 119 deletions

View File

@@ -1293,7 +1293,7 @@ public:
}
}
void SetGUID(ObjectGuid guid, int32 /*type*/) override
void SetGUID(ObjectGuid const& guid, int32 /*type*/) override
{
_chaseGUID = guid;
}

View File

@@ -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)
{

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -2536,7 +2536,7 @@ public:
}
}
void SetGUID(ObjectGuid guid, int32 /* = 0*/) override
void SetGUID(ObjectGuid const& guid, int32 /* = 0*/) override
{
_grabbedPlayer = guid;
}

View File

@@ -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)
{

View File

@@ -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;

View File

@@ -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;