mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7282] Store guilds in map for fast search by id, some other guild/arenateam related cleanups.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
1fb8a52032
commit
cdfee0fdfc
5 changed files with 51 additions and 39 deletions
|
|
@ -280,9 +280,10 @@ class ObjectMgr
|
|||
typedef UNORDERED_MAP<uint32, Item*> ItemMap;
|
||||
|
||||
typedef std::set< Group * > GroupSet;
|
||||
typedef std::set< Guild * > GuildSet;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, ArenaTeam* > ArenaTeamMap;
|
||||
typedef UNORDERED_MAP<uint32, Guild *> GuildMap;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, ArenaTeam*> ArenaTeamMap;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, Quest*> QuestMap;
|
||||
|
||||
|
|
@ -311,17 +312,17 @@ class ObjectMgr
|
|||
void RemoveGroup(Group* group) { mGroupSet.erase( group ); }
|
||||
|
||||
Guild* GetGuildByLeader(uint64 const&guid) const;
|
||||
Guild* GetGuildById(const uint32 GuildId) const;
|
||||
Guild* GetGuildById(uint32 GuildId) const;
|
||||
Guild* GetGuildByName(const std::string& guildname) const;
|
||||
std::string GetGuildNameById(const uint32 GuildId) const;
|
||||
void AddGuild(Guild* guild) { mGuildSet.insert( guild ); }
|
||||
void RemoveGuild(Guild* guild) { mGuildSet.erase( guild ); }
|
||||
std::string GetGuildNameById(uint32 GuildId) const;
|
||||
void AddGuild(Guild* guild);
|
||||
void RemoveGuild(uint32 Id);
|
||||
|
||||
ArenaTeam* GetArenaTeamById(const uint32 arenateamid) const;
|
||||
ArenaTeam* GetArenaTeamById(uint32 arenateamid) const;
|
||||
ArenaTeam* GetArenaTeamByName(const std::string& arenateamname) const;
|
||||
ArenaTeam* GetArenaTeamByCaptain(uint64 const& guid) const;
|
||||
void AddArenaTeam(ArenaTeam* arenaTeam);
|
||||
void RemoveArenaTeam(ArenaTeam* arenaTeam);
|
||||
void RemoveArenaTeam(uint32 Id);
|
||||
ArenaTeamMap::iterator GetArenaTeamMapBegin() { return mArenaTeamMap.begin(); }
|
||||
ArenaTeamMap::iterator GetArenaTeamMapEnd() { return mArenaTeamMap.end(); }
|
||||
|
||||
|
|
@ -754,7 +755,7 @@ class ObjectMgr
|
|||
typedef std::set<uint32> GameObjectForQuestSet;
|
||||
|
||||
GroupSet mGroupSet;
|
||||
GuildSet mGuildSet;
|
||||
GuildMap mGuildMap;
|
||||
ArenaTeamMap mArenaTeamMap;
|
||||
|
||||
ItemMap mItems;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue