[8705] Move DynamicObject guid counting from global levle to map.

This is first step in guid counting for map local object types at map level.
Map local countin let
1) have more wide guid space and then more seldom have problems with guid counter overflow
2) possible implement (later) restart map at guid overflow without server shutdown.
3) let use static guids (not for DynamicOPbject that not stored in DB anyway) in instances instead dynamic allocated.
This commit is contained in:
VladimirMangos 2009-10-22 06:44:05 +04:00
parent ae9ae781fc
commit d482193cea
6 changed files with 32 additions and 15 deletions

View file

@ -133,7 +133,6 @@ ObjectMgr::ObjectMgr()
m_hiVehicleGuid = 1;
m_hiItemGuid = 1;
m_hiGoGuid = 1;
m_hiDoGuid = 1;
m_hiCorpseGuid = 1;
m_hiPetNumber = 1;
m_ItemTextId = 1;
@ -5714,13 +5713,6 @@ uint32 ObjectMgr::GenerateLowGuid(HighGuid guidhigh)
World::StopNow(ERROR_EXIT_CODE);
}
return m_hiCorpseGuid++;
case HIGHGUID_DYNAMICOBJECT:
if(m_hiDoGuid>=0xFFFFFFFE)
{
sLog.outError("DynamicObject guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
return m_hiDoGuid++;
default:
ASSERT(0);
}