chore(unit-object-accessor): add findConnectedPlayer to object accessor (#3155)
This commit is contained in:
@@ -177,6 +177,11 @@ Unit* ObjectAccessor::FindUnit(uint64 guid)
|
|||||||
return GetObjectInWorld(guid, (Unit*)NULL);
|
return GetObjectInWorld(guid, (Unit*)NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Player* ObjectAccessor::FindConnectedPlayer(uint64 const& guid)
|
||||||
|
{
|
||||||
|
return HashMapHolder<Player>::Find(guid);
|
||||||
|
}
|
||||||
|
|
||||||
Player* ObjectAccessor::FindPlayerByName(std::string const& name, bool checkInWorld)
|
Player* ObjectAccessor::FindPlayerByName(std::string const& name, bool checkInWorld)
|
||||||
{
|
{
|
||||||
/*ACORE_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
|
/*ACORE_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
|
||||||
|
|||||||
@@ -189,7 +189,9 @@ class ObjectAccessor
|
|||||||
static Pet* FindPet(uint64);
|
static Pet* FindPet(uint64);
|
||||||
static Player* FindPlayer(uint64);
|
static Player* FindPlayer(uint64);
|
||||||
static Player* FindPlayerInOrOutOfWorld(uint64 m_guid);
|
static Player* FindPlayerInOrOutOfWorld(uint64 m_guid);
|
||||||
|
|
||||||
static Unit* FindUnit(uint64);
|
static Unit* FindUnit(uint64);
|
||||||
|
static Player* FindConnectedPlayer(uint64 const&);
|
||||||
static Player* FindPlayerByName(std::string const& name, bool checkInWorld = true);
|
static Player* FindPlayerByName(std::string const& name, bool checkInWorld = true);
|
||||||
static std::map<std::string, Player*> playerNameToPlayerPointer; // pussywizard: optimization
|
static std::map<std::string, Player*> playerNameToPlayerPointer; // pussywizard: optimization
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user