TrinityCore
CalendarEvent Struct Reference

#include <CalendarMgr.h>

Public Member Functions

 CalendarEvent (CalendarEvent const &calendarEvent, uint64 eventId)
 
 CalendarEvent (uint64 eventId, ObjectGuid ownerGUID, ObjectGuid::LowType guildId, CalendarEventType type, int32 textureId, time_t date, uint32 flags, std::string title, std::string description, time_t lockDate)
 
 CalendarEvent ()
 
 ~CalendarEvent ()
 
void SetEventId (uint64 eventId)
 
uint64 GetEventId () const
 
void SetOwnerGUID (ObjectGuid guid)
 
ObjectGuid GetOwnerGUID () const
 
void SetGuildId (ObjectGuid::LowType guildId)
 
ObjectGuid::LowType GetGuildId () const
 
void SetTitle (std::string const &title)
 
std::string GetTitle () const
 
void SetDescription (std::string const &description)
 
std::string GetDescription () const
 
void SetType (CalendarEventType eventType)
 
CalendarEventType GetType () const
 
void SetTextureId (int32 textureId)
 
int32 GetTextureId () const
 
void SetDate (time_t date)
 
time_t GetDate () const
 
void SetFlags (uint32 flags)
 
uint32 GetFlags () const
 
bool IsGuildEvent () const
 
bool IsGuildAnnouncement () const
 
bool IsLocked () const
 
void SetLockDate (time_t lockDate)
 
time_t GetLockDate () const
 
std::string BuildCalendarMailSubject (ObjectGuid remover) const
 
std::string BuildCalendarMailBody () const
 

Private Attributes

uint64 _eventId
 
ObjectGuid _ownerGUID
 
ObjectGuid::LowType _eventGuildId
 
CalendarEventType _eventType
 
int32 _textureId
 
time_t _date
 
uint32 _flags
 
std::string _title
 
std::string _description
 
time_t _lockDate
 

Constructor & Destructor Documentation

◆ CalendarEvent() [1/3]

CalendarEvent::CalendarEvent ( CalendarEvent const &  calendarEvent,
uint64  eventId 
)
inline
199  {
200  _eventId = eventId;
201  _ownerGUID = calendarEvent.GetOwnerGUID();
202  _eventGuildId = calendarEvent.GetGuildId();
203  _eventType = calendarEvent.GetType();
204  _textureId = calendarEvent.GetTextureId();
205  _date = calendarEvent.GetDate();
206  _flags = calendarEvent.GetFlags();
207  _title = calendarEvent.GetTitle();
208  _description = calendarEvent.GetDescription();
209  _lockDate = calendarEvent.GetLockDate();
210  }
time_t _date
Definition: CalendarMgr.h:265
uint32 _flags
Definition: CalendarMgr.h:266
ObjectGuid _ownerGUID
Definition: CalendarMgr.h:261
std::string _description
Definition: CalendarMgr.h:268
time_t _lockDate
Definition: CalendarMgr.h:269
ObjectGuid::LowType _eventGuildId
Definition: CalendarMgr.h:262
uint64 _eventId
Definition: CalendarMgr.h:260
CalendarEventType _eventType
Definition: CalendarMgr.h:263
std::string _title
Definition: CalendarMgr.h:267
int32 _textureId
Definition: CalendarMgr.h:264
+ Here is the call graph for this function:

◆ CalendarEvent() [2/3]

CalendarEvent::CalendarEvent ( uint64  eventId,
ObjectGuid  ownerGUID,
ObjectGuid::LowType  guildId,
CalendarEventType  type,
int32  textureId,
time_t  date,
uint32  flags,
std::string  title,
std::string  description,
time_t  lockDate 
)
inline
213  :
214  _eventId(eventId), _ownerGUID(ownerGUID), _eventGuildId(guildId), _eventType(type), _textureId(textureId),
215  _date(date), _flags(flags), _title(title), _description(description), _lockDate(lockDate) { }
time_t _date
Definition: CalendarMgr.h:265
uint32 _flags
Definition: CalendarMgr.h:266
ObjectGuid _ownerGUID
Definition: CalendarMgr.h:261
std::string _description
Definition: CalendarMgr.h:268
time_t _lockDate
Definition: CalendarMgr.h:269
ObjectGuid::LowType _eventGuildId
Definition: CalendarMgr.h:262
uint64 _eventId
Definition: CalendarMgr.h:260
CalendarEventType _eventType
Definition: CalendarMgr.h:263
std::string _title
Definition: CalendarMgr.h:267
uint8 flags
Definition: DisableMgr.cpp:47
int32 _textureId
Definition: CalendarMgr.h:264

◆ CalendarEvent() [3/3]

CalendarEvent::CalendarEvent ( )
inline
218  _flags(0), _title(""), _description(""), _lockDate(0) { }
time_t _date
Definition: CalendarMgr.h:265
uint32 _flags
Definition: CalendarMgr.h:266
ObjectGuid _ownerGUID
Definition: CalendarMgr.h:261
std::string _description
Definition: CalendarMgr.h:268
time_t _lockDate
Definition: CalendarMgr.h:269
#define UI64LIT(N)
Definition: Define.h:140
Definition: CalendarMgr.h:67
ObjectGuid::LowType _eventGuildId
Definition: CalendarMgr.h:262
uint64 _eventId
Definition: CalendarMgr.h:260
CalendarEventType _eventType
Definition: CalendarMgr.h:263
std::string _title
Definition: CalendarMgr.h:267
int32 _textureId
Definition: CalendarMgr.h:264

◆ ~CalendarEvent()

CalendarEvent::~CalendarEvent ( )
39 {
40  sCalendarMgr->FreeEventId(_eventId);
41 }
#define sCalendarMgr
Definition: CalendarMgr.h:338
uint64 _eventId
Definition: CalendarMgr.h:260

Member Function Documentation

◆ BuildCalendarMailBody()

std::string CalendarEvent::BuildCalendarMailBody ( ) const
424 {
426  uint32 time;
427  std::ostringstream strm;
428 
429  // we are supposed to send PackedTime so i used WorldPacket to pack it
430  data.AppendPackedTime(_date);
431  data >> time;
432  strm << time;
433  return strm.str();
434 }
time_t _date
Definition: CalendarMgr.h:265
constexpr auto data(C &c)
Definition: advstd.h:96
uint32_t uint32
Definition: Define.h:152
void AppendPackedTime(time_t time)
Definition: ByteBuffer.cpp:99
Definition: WorldPacket.h:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildCalendarMailSubject()

std::string CalendarEvent::BuildCalendarMailSubject ( ObjectGuid  remover) const
417 {
418  std::ostringstream strm;
419  strm << remover.ToString() << ':' << _title;
420  return strm.str();
421 }
std::string ToString() const
Definition: ObjectGuid.cpp:238
std::string _title
Definition: CalendarMgr.h:267
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDate()

time_t CalendarEvent::GetDate ( ) const
inline
244 { return _date; }
time_t _date
Definition: CalendarMgr.h:265
+ Here is the caller graph for this function:

◆ GetDescription()

std::string CalendarEvent::GetDescription ( ) const
inline
235 { return _description; }
std::string _description
Definition: CalendarMgr.h:268
+ Here is the caller graph for this function:

◆ GetEventId()

uint64 CalendarEvent::GetEventId ( ) const
inline
223 { return _eventId; }
uint64 _eventId
Definition: CalendarMgr.h:260
+ Here is the caller graph for this function:

◆ GetFlags()

uint32 CalendarEvent::GetFlags ( ) const
inline
247 { return _flags; }
uint32 _flags
Definition: CalendarMgr.h:266
+ Here is the caller graph for this function:

◆ GetGuildId()

ObjectGuid::LowType CalendarEvent::GetGuildId ( ) const
inline
229 { return _eventGuildId; }
ObjectGuid::LowType _eventGuildId
Definition: CalendarMgr.h:262
+ Here is the caller graph for this function:

◆ GetLockDate()

time_t CalendarEvent::GetLockDate ( ) const
inline
254 { return _lockDate; }
time_t _lockDate
Definition: CalendarMgr.h:269
+ Here is the caller graph for this function:

◆ GetOwnerGUID()

ObjectGuid CalendarEvent::GetOwnerGUID ( ) const
inline
226 { return _ownerGUID; }
ObjectGuid _ownerGUID
Definition: CalendarMgr.h:261
+ Here is the caller graph for this function:

◆ GetTextureId()

int32 CalendarEvent::GetTextureId ( ) const
inline
241 { return _textureId; }
int32 _textureId
Definition: CalendarMgr.h:264
+ Here is the caller graph for this function:

◆ GetTitle()

std::string CalendarEvent::GetTitle ( ) const
inline
232 { return _title; }
std::string _title
Definition: CalendarMgr.h:267
+ Here is the caller graph for this function:

◆ GetType()

CalendarEventType CalendarEvent::GetType ( ) const
inline
238 { return _eventType; }
CalendarEventType _eventType
Definition: CalendarMgr.h:263
+ Here is the caller graph for this function:

◆ IsGuildAnnouncement()

bool CalendarEvent::IsGuildAnnouncement ( ) const
inline
250 { return (_flags & CALENDAR_FLAG_WITHOUT_INVITES) != 0; }
uint32 _flags
Definition: CalendarMgr.h:266
Definition: CalendarMgr.h:43
+ Here is the caller graph for this function:

◆ IsGuildEvent()

bool CalendarEvent::IsGuildEvent ( ) const
inline
249 { return (_flags & CALENDAR_FLAG_GUILD_EVENT) != 0; }
uint32 _flags
Definition: CalendarMgr.h:266
Definition: CalendarMgr.h:44
+ Here is the caller graph for this function:

◆ IsLocked()

bool CalendarEvent::IsLocked ( ) const
inline
251 { return (_flags & CALENDAR_FLAG_INVITES_LOCKED) != 0; }
uint32 _flags
Definition: CalendarMgr.h:266
Definition: CalendarMgr.h:42

◆ SetDate()

void CalendarEvent::SetDate ( time_t  date)
inline
243 { _date = date; }
time_t _date
Definition: CalendarMgr.h:265
+ Here is the caller graph for this function:

◆ SetDescription()

void CalendarEvent::SetDescription ( std::string const &  description)
inline
234 { _description = description; }
std::string _description
Definition: CalendarMgr.h:268

◆ SetEventId()

void CalendarEvent::SetEventId ( uint64  eventId)
inline
222 { _eventId = eventId; }
uint64 _eventId
Definition: CalendarMgr.h:260

◆ SetFlags()

void CalendarEvent::SetFlags ( uint32  flags)
inline
246 { _flags = flags; }
uint32 _flags
Definition: CalendarMgr.h:266
uint8 flags
Definition: DisableMgr.cpp:47

◆ SetGuildId()

void CalendarEvent::SetGuildId ( ObjectGuid::LowType  guildId)
inline
228 { _eventGuildId = guildId; }
ObjectGuid::LowType _eventGuildId
Definition: CalendarMgr.h:262
+ Here is the caller graph for this function:

◆ SetLockDate()

void CalendarEvent::SetLockDate ( time_t  lockDate)
inline
253 { _lockDate = lockDate; }
time_t _lockDate
Definition: CalendarMgr.h:269

◆ SetOwnerGUID()

void CalendarEvent::SetOwnerGUID ( ObjectGuid  guid)
inline
225 { _ownerGUID = guid; }
ObjectGuid _ownerGUID
Definition: CalendarMgr.h:261

◆ SetTextureId()

void CalendarEvent::SetTextureId ( int32  textureId)
inline
240 { _textureId = textureId; }
int32 _textureId
Definition: CalendarMgr.h:264

◆ SetTitle()

void CalendarEvent::SetTitle ( std::string const &  title)
inline
231 { _title = title; }
std::string _title
Definition: CalendarMgr.h:267

◆ SetType()

void CalendarEvent::SetType ( CalendarEventType  eventType)
inline
237 { _eventType = eventType; }
CalendarEventType _eventType
Definition: CalendarMgr.h:263

Member Data Documentation

◆ _date

time_t CalendarEvent::_date
private

◆ _description

std::string CalendarEvent::_description
private

◆ _eventGuildId

ObjectGuid::LowType CalendarEvent::_eventGuildId
private

◆ _eventId

uint64 CalendarEvent::_eventId
private

◆ _eventType

CalendarEventType CalendarEvent::_eventType
private

◆ _flags

uint32 CalendarEvent::_flags
private

◆ _lockDate

time_t CalendarEvent::_lockDate
private

◆ _ownerGUID

ObjectGuid CalendarEvent::_ownerGUID
private

◆ _textureId

int32 CalendarEvent::_textureId
private

◆ _title

std::string CalendarEvent::_title
private

The documentation for this struct was generated from the following files: