Core/Maps: move pooling hand-off outside of Map::CheckRespawn (PR#25785)

fixes #25777
# Conflicts:
#	src/server/game/Maps/Map.cpp
This commit is contained in:
Treeston authored and Ovahlord committed 2021-01-03 09:44:08 +01:00
1 parent 5c0febcfb3
commit ee3956b44c
3 files changed
+69 -56

No files matched your search

+15
View File
@@ -847,3 +847,18 @@ void PoolMgr::UpdatePool(uint32 pool_id, uint32 db_guid_or_pool_id)
template void PoolMgr::UpdatePool<Pool>(uint32 pool_id, uint32 db_guid_or_pool_id);
template void PoolMgr::UpdatePool<GameObject>(uint32 pool_id, uint32 db_guid_or_pool_id);
template void PoolMgr::UpdatePool<Creature>(uint32 pool_id, uint32 db_guid_or_pool_id);
void PoolMgr::UpdatePool(uint32 pool_id, SpawnObjectType type, uint32 spawnId)
{
switch (type)
{
case SPAWN_TYPE_CREATURE:
UpdatePool<Creature>(pool_id, spawnId);
break;
case SPAWN_TYPE_GAMEOBJECT:
UpdatePool<GameObject>(pool_id, spawnId);
break;
default:
ABORT_MSG("Invalid spawn type %u passed to PoolMgr::IsPartOfPool (with spawnId %u)", uint32(type), spawnId);
}
}