[9146] More poolmgr cleanps.

* Replace mixed values used type args by function template specializations
* More explcilty show fact that poolmgr work only with db guids.
This commit is contained in:
VladimirMangos 2010-01-11 12:20:49 +03:00
parent edfec630e8
commit 4d90a2e1f2
7 changed files with 134 additions and 85 deletions

View file

@ -258,9 +258,9 @@ void GameObject::Update(uint32 /*p_time*/)
return;
}
// respawn timer
uint16 poolid = sPoolMgr.IsPartOfAPool(GetGUIDLow(), TYPEID_GAMEOBJECT);
uint16 poolid = GetDBTableGUIDLow() ? sPoolMgr.IsPartOfAPool<GameObject>(GetDBTableGUIDLow()) : 0;
if (poolid)
sPoolMgr.UpdatePool(poolid, GetGUIDLow(), TYPEID_GAMEOBJECT);
sPoolMgr.UpdatePool<GameObject>(poolid, GetDBTableGUIDLow());
else
GetMap()->Add(this);
break;
@ -473,9 +473,9 @@ void GameObject::Delete()
SetGoState(GO_STATE_READY);
SetUInt32Value(GAMEOBJECT_FLAGS, GetGOInfo()->flags);
uint16 poolid = sPoolMgr.IsPartOfAPool(GetGUIDLow(), TYPEID_GAMEOBJECT);
uint16 poolid = GetDBTableGUIDLow() ? sPoolMgr.IsPartOfAPool<GameObject>(GetDBTableGUIDLow()) : 0;
if (poolid)
sPoolMgr.UpdatePool(poolid, GetGUIDLow(), TYPEID_GAMEOBJECT);
sPoolMgr.UpdatePool<GameObject>(poolid, GetDBTableGUIDLow());
else
AddObjectToRemoveList();
}