[7299] Implemented circular loop detection for pools in pools

As a result, the last relation that makes the loop is automatically removed.
An error message is displayed and core go on loading remaining records.

Signed-off-by: Neo2003 <neo.2003@hotmail.fr>
This commit is contained in:
Neo2003 2008-12-08 20:24:21 +01:00
parent 5da8bdf16e
commit 125bf4bfd6
3 changed files with 48 additions and 1 deletions

View file

@ -91,6 +91,7 @@ class PoolHandler::PoolGroup
void SpawnObject(uint32 limit, bool cache=false);
bool Spawn1Object(uint32 guid);
bool ReSpawn1Object(uint32 guid);
void RemoveOneRelation(uint16 child_pool_id);
private:
typedef std::vector<PoolObject> PoolObjectList;
uint32 CacheValue; // Store the guid of the removed creature/gameobject during a pool update