diff options
Diffstat (limited to 'src/server/game/Calendar/CalendarMgr.h')
-rw-r--r-- | src/server/game/Calendar/CalendarMgr.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/server/game/Calendar/CalendarMgr.h b/src/server/game/Calendar/CalendarMgr.h index eceeda62581..8d744988a76 100644 --- a/src/server/game/Calendar/CalendarMgr.h +++ b/src/server/game/Calendar/CalendarMgr.h @@ -18,7 +18,6 @@ #ifndef TRINITY_CALENDARMGR_H #define TRINITY_CALENDARMGR_H -#include <ace/Singleton.h> #include "Common.h" #include "DatabaseEnv.h" #include "WorldPacket.h" @@ -245,8 +244,8 @@ struct CalendarEvent void SetTimeZoneTime(time_t timezoneTime) { _timezoneTime = timezoneTime; } time_t GetTimeZoneTime() const { return _timezoneTime; } - bool IsGuildEvent() const { return _flags & CALENDAR_FLAG_GUILD_EVENT; } - bool IsGuildAnnouncement() const { return _flags & CALENDAR_FLAG_WITHOUT_INVITES; } + bool IsGuildEvent() const { return (_flags & CALENDAR_FLAG_GUILD_EVENT) != 0; } + bool IsGuildAnnouncement() const { return (_flags & CALENDAR_FLAG_WITHOUT_INVITES) != 0; } std::string BuildCalendarMailSubject(uint64 remover) const; std::string BuildCalendarMailBody() const; @@ -269,8 +268,6 @@ typedef std::map<uint64 /* eventId */, CalendarInviteStore > CalendarEventInvite class CalendarMgr { - friend class ACE_Singleton<CalendarMgr, ACE_Null_Mutex>; - private: CalendarMgr(); ~CalendarMgr(); @@ -284,6 +281,12 @@ class CalendarMgr uint64 _maxInviteId; public: + static CalendarMgr* instance() + { + static CalendarMgr* instance = new CalendarMgr(); + return instance; + } + void LoadFromDB(); CalendarEvent* GetEvent(uint64 eventId) const; @@ -330,6 +333,6 @@ class CalendarMgr void SendPacketToAllEventRelatives(WorldPacket packet, CalendarEvent const& calendarEvent); }; -#define sCalendarMgr ACE_Singleton<CalendarMgr, ACE_Null_Mutex>::instance() +#define sCalendarMgr CalendarMgr::instance() #endif |