mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
chore(unit-object-accessor): add findConnectedPlayer to object accessor (#3155)
This commit is contained in:
@@ -169,7 +169,7 @@ Player* ObjectAccessor::FindPlayer(uint64 guid)
|
||||
|
||||
Player* ObjectAccessor::FindPlayerInOrOutOfWorld(uint64 guid)
|
||||
{
|
||||
return GetObjectInOrOutOfWorld(guid, (Player*)NULL);
|
||||
return GetObjectInOrOutOfWorld(guid, (Player*)NULL);
|
||||
}
|
||||
|
||||
Unit* ObjectAccessor::FindUnit(uint64 guid)
|
||||
@@ -177,6 +177,11 @@ Unit* ObjectAccessor::FindUnit(uint64 guid)
|
||||
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)
|
||||
{
|
||||
/*ACORE_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
|
||||
@@ -486,7 +491,7 @@ void ObjectAccessor::Update(uint32 /*diff*/)
|
||||
}
|
||||
|
||||
void Map::BuildAndSendUpdateForObjects()
|
||||
{
|
||||
{
|
||||
UpdateDataMapType update_players;
|
||||
UpdatePlayerSet player_set;
|
||||
|
||||
|
||||
@@ -188,8 +188,10 @@ class ObjectAccessor
|
||||
// ACCESS LIKE THAT IS NOT THREAD SAFE
|
||||
static Pet* FindPet(uint64);
|
||||
static Player* FindPlayer(uint64);
|
||||
static Player* FindPlayerInOrOutOfWorld(uint64 m_guid);
|
||||
static Player* FindPlayerInOrOutOfWorld(uint64 m_guid);
|
||||
|
||||
static Unit* FindUnit(uint64);
|
||||
static Player* FindConnectedPlayer(uint64 const&);
|
||||
static Player* FindPlayerByName(std::string const& name, bool checkInWorld = true);
|
||||
static std::map<std::string, Player*> playerNameToPlayerPointer; // pussywizard: optimization
|
||||
|
||||
|
||||
Reference in New Issue
Block a user