fix(Core/InstanceMap): Stop using deleted player in RemovePlayerFromMap (#17069)
This commit is contained in:
committed by
GitHub
parent
1ed1cd0c73
commit
52d07bbfae
@@ -3034,7 +3034,10 @@ void InstanceMap::RemovePlayerFromMap(Player* player, bool remove)
|
|||||||
//if (!m_unloadTimer && m_mapRefMgr.getSize() == 1)
|
//if (!m_unloadTimer && m_mapRefMgr.getSize() == 1)
|
||||||
// m_unloadTimer = m_unloadWhenEmpty ? MIN_UNLOAD_DELAY : std::max(sWorld->getIntConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY);
|
// m_unloadTimer = m_unloadWhenEmpty ? MIN_UNLOAD_DELAY : std::max(sWorld->getIntConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY);
|
||||||
Map::RemovePlayerFromMap(player, remove);
|
Map::RemovePlayerFromMap(player, remove);
|
||||||
player->SetPendingBind(0, 0);
|
|
||||||
|
// If remove == true - player already deleted.
|
||||||
|
if (!remove)
|
||||||
|
player->SetPendingBind(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstanceMap::AfterPlayerUnlinkFromMap()
|
void InstanceMap::AfterPlayerUnlinkFromMap()
|
||||||
|
|||||||
Reference in New Issue
Block a user