mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[11938] Replace use of HashMapFolder.Find<Player> with ObjectAccessor::FindPlayer wrapper
This commit is contained in:
parent
feb139de71
commit
95ce0c927c
3 changed files with 5 additions and 5 deletions
|
|
@ -78,7 +78,7 @@ Player* ObjectAccessor::FindPlayer(ObjectGuid guid, bool inWorld /*= true*/)
|
|||
if (!guid)
|
||||
return NULL;
|
||||
|
||||
Player* plr = HashMapHolder<Player>::Find(guid);;
|
||||
Player* plr = HashMapHolder<Player>::Find(guid);
|
||||
if (!plr || (!plr->IsInWorld() && inWorld))
|
||||
return NULL;
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ ObjectAccessor::SaveAllPlayers()
|
|||
|
||||
void ObjectAccessor::KickPlayer(ObjectGuid guid)
|
||||
{
|
||||
if (Player* p = HashMapHolder<Player>::Find(guid))
|
||||
if (Player* p = ObjectAccessor::FindPlayer(guid, false))
|
||||
{
|
||||
WorldSession* s = p->GetSession();
|
||||
s->KickPlayer(); // mark session to remove at next session list update
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue