mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
43 lines
963 B
C++
43 lines
963 B
C++
/*
|
|
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-GPL2
|
|
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
|
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
|
*/
|
|
|
|
#ifndef _GROUPMGR_H
|
|
#define _GROUPMGR_H
|
|
|
|
#include "Group.h"
|
|
|
|
class GroupMgr
|
|
{
|
|
private:
|
|
GroupMgr();
|
|
~GroupMgr();
|
|
|
|
public:
|
|
static GroupMgr* instance();
|
|
|
|
typedef std::map<uint32, Group*> GroupContainer;
|
|
|
|
Group* GetGroupByGUID(uint32 guid) const;
|
|
|
|
void InitGroupIds();
|
|
void RegisterGroupId(uint32 groupId);
|
|
uint32 GenerateGroupId();
|
|
|
|
void LoadGroups();
|
|
void AddGroup(Group* group);
|
|
void RemoveGroup(Group* group);
|
|
|
|
protected:
|
|
typedef std::vector<bool> GroupIds;
|
|
GroupIds _groupIds;
|
|
uint32 _nextGroupId;
|
|
GroupContainer GroupStore;
|
|
};
|
|
|
|
#define sGroupMgr GroupMgr::instance()
|
|
|
|
#endif
|