19 #ifndef TRINITY_OBJECTACCESSOR_H
20 #define TRINITY_OBJECTACCESSOR_H
24 #include <unordered_map>
25 #include <boost/thread/locks.hpp>
26 #include <boost/thread/shared_mutex.hpp>
53 "Only Player and Transport can be registered in global HashMapHolder");
55 typedef std::unordered_map<ObjectGuid, T*> MapType;
63 static MapType& GetContainer();
65 static boost::shared_mutex* GetLock();
TC_GAME_API Pet * GetPet(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:179
bool Remove(ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:104
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
TC_GAME_API Player * FindConnectedPlayerByName(std::string const &name)
Definition: ObjectAccessor.cpp:240
TC_GAME_API DynamicObject * GetDynamicObject(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:153
Definition: Transport.h:28
TC_GAME_API void SaveAllPlayers()
Definition: ObjectAccessor.cpp:263
Definition: Creature.h:467
Definition: ObjectAccessor.h:68
TC_GAME_API WorldObject * GetWorldObject(WorldObject const &, ObjectGuid const &)
Definition: ObjectAccessor.cpp:79
HashMapHolder()
Definition: ObjectAccessor.h:48
TC_GAME_API Transport * GetTransport(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:148
TC_GAME_API HashMapHolder< Player >::MapType const & GetPlayers()
Definition: ObjectAccessor.cpp:258
TC_GAME_API AreaTrigger * GetAreaTrigger(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:158
Definition: DynamicObject.h:35
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
Definition: ObjectAccessor.cpp:209
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:184
void AddObject(T *object)
Definition: ObjectAccessor.h:98
uint32_t uint32
Definition: Define.h:150
TC_GAME_API Corpse * GetCorpse(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:138
Definition: GameObject.h:880
TC_GAME_API Player * FindPlayerByName(std::string const &name)
Definition: ObjectAccessor.cpp:220
bool Insert(ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *obj)
Definition: TypeContainerFunctions.h:38
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
SPECIFIC_TYPE * Find(ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > const &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:74
TC_GAME_API Creature * GetCreatureOrPetOrVehicle(WorldObject const &, ObjectGuid const &)
Definition: ObjectAccessor.cpp:198
#define TC_GAME_API
Definition: Define.h:134
TC_GAME_API GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:143
Definition: ObjectAccessor.h:45
TC_GAME_API Object * GetObjectByTypeMask(WorldObject const &, ObjectGuid const &, uint32 typemask)
Definition: ObjectAccessor.cpp:96
const FieldDescriptor value
Definition: descriptor.h:1522
Definition: ObjectGuid.h:189
TC_GAME_API Player * FindConnectedPlayer(ObjectGuid const &)
Definition: ObjectAccessor.cpp:215
void RemoveObject(T *object)
Definition: ObjectAccessor.h:104
Definition: AreaTrigger.h:26