Fix crash when using a pool template with an entry > 65535, fixes issue #3632

--HG--
branch : trunk
This commit is contained in:
Shocker
2010-08-26 06:49:31 +03:00
parent aa768001a7
commit 2748f86bdb
8 changed files with 56 additions and 55 deletions
@@ -1604,7 +1604,7 @@ void Creature::Respawn(bool force)
if (IsAIEnabled)
AI()->JustRespawned();
uint16 poolid = GetDBTableGUIDLow() ? sPoolMgr.IsPartOfAPool<Creature>(GetDBTableGUIDLow()) : 0;
uint32 poolid = GetDBTableGUIDLow() ? sPoolMgr.IsPartOfAPool<Creature>(GetDBTableGUIDLow()) : 0;
if (poolid)
sPoolMgr.UpdatePool<Creature>(poolid, GetDBTableGUIDLow());
@@ -318,7 +318,7 @@ void GameObject::Update(uint32 diff)
return;
}
// respawn timer
uint16 poolid = GetDBTableGUIDLow() ? sPoolMgr.IsPartOfAPool<GameObject>(GetDBTableGUIDLow()) : 0;
uint32 poolid = GetDBTableGUIDLow() ? sPoolMgr.IsPartOfAPool<GameObject>(GetDBTableGUIDLow()) : 0;
if (poolid)
sPoolMgr.UpdatePool<GameObject>(poolid, GetDBTableGUIDLow());
else
@@ -560,7 +560,7 @@ void GameObject::Delete()
SetGoState(GO_STATE_READY);
SetUInt32Value(GAMEOBJECT_FLAGS, GetGOInfo()->flags);
uint16 poolid = GetDBTableGUIDLow() ? sPoolMgr.IsPartOfAPool<GameObject>(GetDBTableGUIDLow()) : 0;
uint32 poolid = GetDBTableGUIDLow() ? sPoolMgr.IsPartOfAPool<GameObject>(GetDBTableGUIDLow()) : 0;
if (poolid)
sPoolMgr.UpdatePool<GameObject>(poolid, GetDBTableGUIDLow());
else