diff options
author | megamage <none@none> | 2009-04-10 12:46:40 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-10 12:46:40 -0500 |
commit | 0ce060ddd79fcb0290e8fc6c48ffda374499e10f (patch) | |
tree | 757c38f4695bb419221f075550bf92a8169a7e85 /src/game/Map.h | |
parent | d6f792d307bd30656943e072438533795d9a88b5 (diff) |
*Make CreatureGroupHolder map-based to prevent crash when using multi-thread map.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Map.h')
-rw-r--r-- | src/game/Map.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/Map.h b/src/game/Map.h index 4d00a287b03..3d533da1675 100644 --- a/src/game/Map.h +++ b/src/game/Map.h @@ -44,6 +44,7 @@ class Group; class InstanceSave; class WorldObject; class TempSummon; +class CreatureGroup; namespace ZThread { @@ -248,6 +249,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; @@ -416,6 +419,9 @@ class TRINITY_DLL_SPEC Map : public GridRefManager<NGridType>, public Trinity::O template<class NOTIFIER> void VisitGrid(const float &x, const float &y, float radius, NOTIFIER ¬ifier); TempSummon *SummonCreature(uint32 entry, float x, float y, float z, float angle, SummonPropertiesEntry const *properties = NULL, uint32 duration = 0, Unit *summoner = NULL); + + CreatureGroupHolderType CreatureGroupHolder; + private: void LoadMapAndVMap(int gx, int gy); void LoadVMap(int gx, int gy); |