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

@@ -60,18 +60,18 @@ public:
namespace ObjectAccessor
{
// these functions return objects only if in map of specified object
WorldObject* GetWorldObject(WorldObject const&, ObjectGuid const guid);
Object* GetObjectByTypeMask(WorldObject const&, ObjectGuid const guid, uint32 typemask);
Corpse* GetCorpse(WorldObject const& u, ObjectGuid const guid);
GameObject* GetGameObject(WorldObject const& u, ObjectGuid const guid);
Transport* GetTransport(WorldObject const& u, ObjectGuid const guid);
DynamicObject* GetDynamicObject(WorldObject const& u, ObjectGuid const guid);
Unit* GetUnit(WorldObject const&, ObjectGuid const guid);
Creature* GetCreature(WorldObject const& u, ObjectGuid const guid);
Pet* GetPet(WorldObject const&, ObjectGuid const guid);
Player* GetPlayer(Map const*, ObjectGuid const guid);
Player* GetPlayer(WorldObject const&, ObjectGuid const guid);
Creature* GetCreatureOrPetOrVehicle(WorldObject const&, ObjectGuid const);
WorldObject* GetWorldObject(WorldObject const&, ObjectGuid const& guid);
Object* GetObjectByTypeMask(WorldObject const&, ObjectGuid const& guid, uint32 typemask);
Corpse* GetCorpse(WorldObject const& u, ObjectGuid const& guid);
GameObject* GetGameObject(WorldObject const& u, ObjectGuid const& guid);
Transport* GetTransport(WorldObject const& u, ObjectGuid const& guid);
DynamicObject* GetDynamicObject(WorldObject const& u, ObjectGuid const& guid);
Unit* GetUnit(WorldObject const&, ObjectGuid const& guid);
Creature* GetCreature(WorldObject const& u, ObjectGuid const& guid);
Pet* GetPet(WorldObject const&, ObjectGuid const& guid);
Player* GetPlayer(Map const*, ObjectGuid const& guid);
Player* GetPlayer(WorldObject const&, ObjectGuid const& guid);
Creature* GetCreatureOrPetOrVehicle(WorldObject const&, ObjectGuid const&);
// these functions return objects if found in whole world
// ACCESS LIKE THAT IS NOT THREAD SAFE