Update to creature formations.

This is a big merge, it may cause problems. Use with caution, report bugs.

--HG--
branch : trunk
This commit is contained in:
raczman
2009-04-15 15:46:02 +02:00
parent c97a4519c5
commit 4fb720c7d1
8 changed files with 204 additions and 156 deletions
+6
View File
@@ -43,6 +43,7 @@ class InstanceData;
class Group;
class InstanceSave;
class WorldObject;
class CreatureGroup;
namespace ZThread
{
@@ -126,6 +127,8 @@ typedef UNORDERED_MAP<Creature*, CreatureMover> CreatureMoveList;
#define INVALID_HEIGHT -100000.0f // for check, must be equal to VMAP_INVALID_HEIGHT, real value for unknown height is VMAP_INVALID_HEIGHT_VALUE
#define MIN_UNLOAD_DELAY 1 // immediate unload
typedef std::map<uint32/*leaderDBGUID*/, CreatureGroup*> CreatureGroupHolderType;
class TRINITY_DLL_SPEC Map : public GridRefManager<NGridType>, public Trinity::ObjectLevelLockable<Map, ZThread::Mutex>
{
friend class MapReference;
@@ -274,6 +277,7 @@ class TRINITY_DLL_SPEC Map : public GridRefManager<NGridType>, public Trinity::O
template<class NOTIFIER> void VisitAll(const float &x, const float &y, float radius, NOTIFIER &notifier);
template<class NOTIFIER> void VisitWorld(const float &x, const float &y, float radius, NOTIFIER &notifier);
template<class NOTIFIER> void VisitGrid(const float &x, const float &y, float radius, NOTIFIER &notifier);
CreatureGroupHolderType CreatureGroupHolder;
private:
void LoadVMap(int pX, int pY);
void LoadMap(uint32 mapid, uint32 instanceid, int x,int y);
@@ -328,6 +332,8 @@ class TRINITY_DLL_SPEC Map : public GridRefManager<NGridType>, public Trinity::O
typedef std::set<WorldObject*> ActiveNonPlayers;
ActiveNonPlayers m_activeNonPlayers;
ActiveNonPlayers::iterator m_activeNonPlayersIter;
private:
typedef GridReadGuard ReadGuard;
typedef GridWriteGuard WriteGuard;