[7555] Check pool_id bafire access to pool data in PoolHandler::CheckPool

This commit is contained in:
VladimirMangos 2009-03-28 00:03:40 +03:00
parent cc19245ce4
commit c5d9b6cf7b
2 changed files with 3 additions and 2 deletions

View file

@ -699,7 +699,8 @@ uint16 PoolHandler::IsPartOfAPool(uint32 guid, uint32 type)
// Method that check chance integrity of the creatures and gameobjects in this pool
bool PoolHandler::CheckPool(uint16 pool_id)
{
return mPoolGameobjectGroups[pool_id].CheckPool() &&
return pool_id <= max_pool_id &&
mPoolGameobjectGroups[pool_id].CheckPool() &&
mPoolCreatureGroups[pool_id].CheckPool() &&
mPoolPoolGroups[pool_id].CheckPool();
}