// Call to update the pool when a gameobject/creature part of pool [pool_id] is ready to respawn // Here we cache only the creature/gameobject whose guid is passed as parameter // Then the spawn pool call will use this cache to decide void PoolHandler::UpdatePool(uint16 pool_id, uint32 guid, uint32 type) { if (uint16 motherpoolid = IsPartOfAPool(pool_id, 0)) SpawnPool(motherpoolid, 0, 0); else SpawnPool(pool_id, guid, type); }
// Call to update the pool when a gameobject/creature part of pool [pool_id] is ready to respawn // Here we cache only the creature/gameobject whose guid is passed as parameter // Then the spawn pool call will use this cache to decide void PoolHandler::UpdatePool(uint16 pool_id, uint32 guid, uint32 type) { uint16 motherpoolid = IsPartOfAPool(pool_id, 0); if (motherpoolid) mPoolPoolGroups[motherpoolid].DespawnObject(pool_id); else if (type == TYPEID_GAMEOBJECT && !mPoolGameobjectGroups[pool_id].isEmpty()) mPoolGameobjectGroups[pool_id].DespawnObject(guid); else if (type != TYPEID_GAMEOBJECT && !mPoolCreatureGroups[pool_id].isEmpty()) mPoolCreatureGroups[pool_id].DespawnObject(guid); if (motherpoolid) SpawnPool(motherpoolid, true); else SpawnPool(pool_id, true); }