[8701] Fixes and inprovements in pool system.

* Fixed object is removed from guid->object map but still spawned in world under some conditions
* Fixed possibility to spawn already spawned object
* Fixed objects despawning (missing part for explicitly chanced objects added)

Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
ApoC 2009-10-21 22:54:26 +02:00
parent f59f7d2a2e
commit b4ea5a6d19
5 changed files with 123 additions and 113 deletions

View file

@ -369,7 +369,7 @@ void Creature::Update(uint32 diff)
uint16 poolid = poolhandler.IsPartOfAPool(GetGUIDLow(), GetTypeId());
if (poolid)
poolhandler.UpdatePool(poolid, GetGUIDLow(), GetTypeId());
poolhandler.UpdatePool(poolid, GetGUIDLow(), TYPEID_UNIT);
else
GetMap()->Add(this);
}