📄 guildmanager.h
字号:
//////////////////////////////////////////////////////////////////////////////// Filename : GuildManager.h// Written By : 辫己刮// Description : //////////////////////////////////////////////////////////////////////////////#ifndef __GUILDMANAGER_H__#define __GUILDMANAGER_H__#include "Types.h"#include "Assert.h"#include "Exception.h"#include "Mutex.h"#include "Timeval.h"#include <hash_map>//////////////////////////////////////////////////////////////////////////////// class GuildManager// 泅犁 劝悼吝牢 辨靛客 殿废 措扁吝牢 辨靛甫 皋葛府俊 map 屈怕肺 啊瘤绊 乐绊,// 货肺款 辨靛狼 殿废/昏力甫 淬寸茄促.////////////////////////////////////////////////////////////////////////////////class Guild;typedef hash_map<GuildID_t, Guild*> HashMapGuild;typedef hash_map<GuildID_t, Guild*>::iterator HashMapGuildItor;typedef hash_map<GuildID_t, Guild*>::const_iterator HashMapGuildConstItor;#ifdef __SHARED_SERVER__class SGGuildInfo;#endifclass GCWaitGuildList;class GCActiveGuildList;class PlayerCreature;class GuildManager{///// Member methods ///// public: // constructor & destructor GuildManager() throw(); ~GuildManager() throw();public: // initializing related methods void init() throw(); void load() throw();public: // memory related methods void addGuild(Guild* pGuild) throw(DuplicatedException); void addGuild_NOBLOCKED(Guild* pGuild) throw(DuplicatedException); void deleteGuild(GuildID_t id) throw(NoSuchElementException); Guild* getGuild(GuildID_t id) throw(); Guild* getGuild_NOBLOCKED(GuildID_t id) throw(); void clear() throw(); void clear_NOBLOCKED();public: // misc methods ushort getGuildSize() const throw() { return m_Guilds.size(); } HashMapGuild& getGuilds() throw() { return m_Guilds; } const HashMapGuild& getGuilds_const() const throw() { return m_Guilds; }#ifdef __SHARED_SERVER__public: void makeSGGuildInfo( SGGuildInfo& sgGuildInfo ) throw();#endif void makeWaitGuildList( GCWaitGuildList& gcWaitGuildList, GuildRace_t race ) throw(); void makeActiveGuildList( GCActiveGuildList& gcWaitGuildList, GuildRace_t race ) throw();public: void lock() { m_Mutex.lock(); } void unlock() { m_Mutex.unlock(); }public: void heartbeat() throw(Error);public: bool isGuildMaster( GuildID_t guildID, PlayerCreature* pPC ) throw(Error); string getGuildName( GuildID_t guildID ) throw (Error); // 辨靛啊 己阑 啊脸唱? bool hasCastle( GuildID_t guildID ) throw(Error); bool hasCastle( GuildID_t guildID, ServerID_t& serverID, ZoneID_t& zoneID ) throw(Error); // 辨靛啊 傈里脚没阑 沁唱? bool hasWarSchedule( GuildID_t guildID ) throw(Error); // 泅犁 柳青吝牢 傈里捞 乐绰啊? bool hasActiveWar( GuildID_t guidlID ) throw(Error);public: // debug string toString(void) const throw();///// Member data ///// protected: hash_map<GuildID_t, Guild*> m_Guilds; // 辨靛 器牢磐 甘 Timeval m_WaitMemberClearTime; // heartbeat 俊辑 Wait 吝牢 辨靛糕滚 沥府 矫埃 // mutex mutable Mutex m_Mutex;};extern GuildManager* g_pGuildManager;#endif // __GUILDINFO_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -