From 0ce060ddd79fcb0290e8fc6c48ffda374499e10f Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 10 Apr 2009 12:46:40 -0500 Subject: *Make CreatureGroupHolder map-based to prevent crash when using multi-thread map. --HG-- branch : trunk --- src/game/Map.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/game/Map.h') 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 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 CreatureGroupHolderType; + class TRINITY_DLL_SPEC Map : public GridRefManager, public Trinity::ObjectLevelLockable { friend class MapReference; @@ -416,6 +419,9 @@ class TRINITY_DLL_SPEC Map : public GridRefManager, public Trinity::O template 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); -- cgit v1.2.3