[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

@ -375,9 +375,9 @@ void Creature::Update(uint32 diff)
//Call AI respawn virtual function
i_AI->JustRespawned();
uint16 poolid = sPoolMgr.IsPartOfAPool(GetGUIDLow(), GetTypeId());
uint16 poolid = GetDBTableGUIDLow() ? sPoolMgr.IsPartOfAPool<Creature>(GetDBTableGUIDLow()) : 0;
if (poolid)
sPoolMgr.UpdatePool(poolid, GetGUIDLow(), TYPEID_UNIT);
sPoolMgr.UpdatePool<Creature>(poolid, GetDBTableGUIDLow());
else
GetMap()->Add(this);
}