mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[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:
parent
edfec630e8
commit
4d90a2e1f2
7 changed files with 134 additions and 85 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue