Implemented gameobjects and creatures grouping (pools of them)

Groups (called pools) can be also member of any game event

Signed-off-by: Neo2003 <neo.2003@hotmail.fr>
Signed-off-by: freghar <compmancz@gmail.com>
This commit is contained in:
Neo2003 2008-12-06 00:31:42 +01:00
parent 1932ce1ae7
commit 7d8dc0eeef
14 changed files with 879 additions and 39 deletions

View file

@ -27,6 +27,7 @@
#include "QuestDef.h"
#include "GossipDef.h"
#include "Player.h"
#include "PoolHandler.h"
#include "Opcodes.h"
#include "Log.h"
#include "LootMgr.h"
@ -349,7 +350,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;
}