mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Core/ObjectAccessor: Use FindConnectedPlayerByName in FindPlayerByName (#31137)
This commit is contained in:
@@ -241,7 +241,7 @@ Player* ObjectAccessor::FindPlayer(ObjectGuid const& guid)
|
||||
|
||||
Player* ObjectAccessor::FindPlayerByName(std::string_view name)
|
||||
{
|
||||
Player* player = PlayerNameMapHolder::Find(name);
|
||||
Player* player = FindConnectedPlayerByName(name);
|
||||
if (!player || !player->IsInWorld())
|
||||
return nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user