From e21b2c9baa506a265fddd50f65a69d2bb297cc96 Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 19 Feb 2009 18:44:20 -0600 Subject: *Implemented gameobjects and creatures grouping (pools of them) *Groups (called pools) can be also member of any game event Author: Neo2003 --HG-- branch : trunk --- src/game/Creature.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/game/Creature.cpp') diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index e6fc9e394ba..6810b07de93 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -29,6 +29,7 @@ #include "QuestDef.h" #include "GossipDef.h" #include "Player.h" +#include "PoolHandler.h" #include "Opcodes.h" #include "Log.h" #include "LootMgr.h" @@ -423,7 +424,11 @@ void Creature::Update(uint32 diff) //Call AI respawn virtual function i_AI->JustRespawned(); - GetMap()->Add(this); + uint16 poolid = poolhandler.IsPartOfAPool(GetGUIDLow(), GetTypeId()); + if (poolid) + poolhandler.UpdatePool(poolid, GetGUIDLow(), GetTypeId()); + else + GetMap()->Add(this); } break; } -- cgit v1.2.3