Files
azerothcore-wotlk/src/server/game/Guilds/GuildMgr.h
Kargatum 824a80005c Refactor(Core/Misc): Remove remaining COMPILER_HAS_CPP11_SUPPORT related macros (#1627)
* Delete macros UNORDERED_MAP
* Delete macros UNORDERED_SET
2019-03-26 00:01:56 +07:00

43 lines
1.1 KiB
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 _GUILDMGR_H
#define _GUILDMGR_H
#include "Guild.h"
class GuildMgr
{
friend class ACE_Singleton<GuildMgr, ACE_Null_Mutex>;
private:
GuildMgr();
~GuildMgr();
public:
Guild* GetGuildByLeader(uint64 guid) const;
Guild* GetGuildById(uint32 guildId) const;
Guild* GetGuildByName(std::string const& guildName) const;
std::string GetGuildNameById(uint32 guildId) const;
void LoadGuilds();
void AddGuild(Guild* guild);
void RemoveGuild(uint32 guildId);
uint32 GenerateGuildId();
void SetNextGuildId(uint32 Id) { NextGuildId = Id; }
void ResetTimes();
protected:
typedef std::unordered_map<uint32, Guild*> GuildContainer;
uint32 NextGuildId;
GuildContainer GuildStore;
};
#define sGuildMgr ACE_Singleton<GuildMgr, ACE_Null_Mutex>::instance()
#endif