aboutsummaryrefslogtreecommitdiff
path: root/src/game/CreatureGroups.h
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-10 12:46:40 -0500
committermegamage <none@none>2009-04-10 12:46:40 -0500
commit0ce060ddd79fcb0290e8fc6c48ffda374499e10f (patch)
tree757c38f4695bb419221f075550bf92a8169a7e85 /src/game/CreatureGroups.h
parentd6f792d307bd30656943e072438533795d9a88b5 (diff)
*Make CreatureGroupHolder map-based to prevent crash when using multi-thread map.
--HG-- branch : trunk
Diffstat (limited to 'src/game/CreatureGroups.h')
-rw-r--r--src/game/CreatureGroups.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/game/CreatureGroups.h b/src/game/CreatureGroups.h
index aba86ffcaac..8c345aadd40 100644
--- a/src/game/CreatureGroups.h
+++ b/src/game/CreatureGroups.h
@@ -41,10 +41,8 @@ class CreatureGroupManager
void LoadCreatureFormations();
};
-typedef std::multimap<uint32/*leaderDBGUID*/, CreatureGroup*> CreatureGroupHolderType;
typedef UNORDERED_MAP<uint32/*memberDBGUID*/, FormationInfo*> CreatureGroupInfoType;
-extern CreatureGroupHolderType CreatureGroupHolder;
extern CreatureGroupInfoType CreatureGroupMap;
class CreatureGroup
@@ -54,17 +52,16 @@ class CreatureGroup
typedef std::map<Creature*, FormationInfo*> CreatureGroupMemberType;
CreatureGroupMemberType m_members;
- uint32 m_groupID, mInstanceID;
+ uint32 m_groupID;
bool m_Formed;
public:
//Group cannot be created empty
- explicit CreatureGroup(uint32 id, uint32 InstanceID) : m_groupID(id), m_leader(NULL), mInstanceID(InstanceID), m_Formed(false) {}
- ~CreatureGroup(){sLog.outDebug("Destroying group");}
+ explicit CreatureGroup(uint32 id) : m_groupID(id), m_leader(NULL), m_Formed(false) {}
+ ~CreatureGroup() { sLog.outDebug("Destroying group"); }
Creature* getLeader() const { return m_leader; }
uint32 GetId() const { return m_groupID; }
- uint32 getInstanceID() const { return mInstanceID; }
bool isEmpty() const { return m_members.empty(); }
bool isFormed() const { return m_Formed; }