TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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::CalendarEvent ( CalendarEvent const calendarEvent,
uint64  eventId 
)
inline
195  {
196  _eventId = eventId;
197  _ownerGUID = calendarEvent.GetOwnerGUID();
198  _eventGuildId = calendarEvent.GetGuildId();
199  _eventType = calendarEvent.GetType();
200  _textureId = calendarEvent.GetTextureId();
201  _date = calendarEvent.GetDate();
202  _flags = calendarEvent.GetFlags();
203  _title = calendarEvent.GetTitle();
204  _description = calendarEvent.GetDescription();
205  _lockDate = calendarEvent.GetLockDate();
206  }
time_t _date
Definition: CalendarMgr.h:261
uint32 _flags
Definition: CalendarMgr.h:262
ObjectGuid _ownerGUID
Definition: CalendarMgr.h:257
std::string _description
Definition: CalendarMgr.h:264
time_t _lockDate
Definition: CalendarMgr.h:265
ObjectGuid::LowType _eventGuildId
Definition: CalendarMgr.h:258
uint64 _eventId
Definition: CalendarMgr.h:256
CalendarEventType _eventType
Definition: CalendarMgr.h:259
std::string _title
Definition: CalendarMgr.h:263
int32 _textureId
Definition: CalendarMgr.h:260

+ Here is the call graph for this function:

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
209  :
210  _eventId(eventId), _ownerGUID(ownerGUID), _eventGuildId(guildId), _eventType(type), _textureId(textureId),
211  _date(date), _flags(flags), _title(title), _description(description), _lockDate(lockDate) { }
time_t _date
Definition: CalendarMgr.h:261
uint32 _flags
Definition: CalendarMgr.h:262
ObjectGuid _ownerGUID
Definition: CalendarMgr.h:257
std::string _description
Definition: CalendarMgr.h:264
time_t _lockDate
Definition: CalendarMgr.h:265
ObjectGuid::LowType _eventGuildId
Definition: CalendarMgr.h:258
uint64 _eventId
Definition: CalendarMgr.h:256
CalendarEventType _eventType
Definition: CalendarMgr.h:259
std::string _title
Definition: CalendarMgr.h:263
uint8 flags
Definition: DisableMgr.cpp:44
int32 _textureId
Definition: CalendarMgr.h:260
CalendarEvent::CalendarEvent ( )
inline
214  _flags(0), _title(""), _description(""), _lockDate(0) { }
time_t _date
Definition: CalendarMgr.h:261
uint32 _flags
Definition: CalendarMgr.h:262
ObjectGuid _ownerGUID
Definition: CalendarMgr.h:257
std::string _description
Definition: CalendarMgr.h:264
time_t _lockDate
Definition: CalendarMgr.h:265
#define UI64LIT(N)
Definition: Define.h:138
Definition: CalendarMgr.h:62
ObjectGuid::LowType _eventGuildId
Definition: CalendarMgr.h:258
uint64 _eventId
Definition: CalendarMgr.h:256
CalendarEventType _eventType
Definition: CalendarMgr.h:259
std::string _title
Definition: CalendarMgr.h:263
int32 _textureId
Definition: CalendarMgr.h:260
CalendarEvent::~CalendarEvent ( )
33 {
34  sCalendarMgr->FreeEventId(_eventId);
35 }
#define sCalendarMgr
Definition: CalendarMgr.h:334
uint64 _eventId
Definition: CalendarMgr.h:256

Member Function Documentation

std::string CalendarEvent::BuildCalendarMailBody ( ) const
415 {
416  WorldPacket data;
417  uint32 time;
418  std::ostringstream strm;
419 
420  // we are supposed to send PackedTime so i used WorldPacket to pack it
421  data.AppendPackedTime(_date);
422  data >> time;
423  strm << time;
424  return strm.str();
425 }
time_t _date
Definition: CalendarMgr.h:261
uint32_t uint32
Definition: Define.h:150
void AppendPackedTime(time_t time)
Definition: ByteBuffer.h:680
Definition: WorldPacket.h:26

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string CalendarEvent::BuildCalendarMailSubject ( ObjectGuid  remover) const
408 {
409  std::ostringstream strm;
410  strm << remover << ':' << _title;
411  return strm.str();
412 }
std::string _title
Definition: CalendarMgr.h:263

+ Here is the caller graph for this function:

time_t CalendarEvent::GetDate ( ) const
inline
240 { return _date; }
time_t _date
Definition: CalendarMgr.h:261

+ Here is the caller graph for this function:

std::string CalendarEvent::GetDescription ( ) const
inline
231 { return _description; }
std::string _description
Definition: CalendarMgr.h:264

+ Here is the caller graph for this function:

uint64 CalendarEvent::GetEventId ( ) const
inline
219 { return _eventId; }
uint64 _eventId
Definition: CalendarMgr.h:256

+ Here is the caller graph for this function:

uint32 CalendarEvent::GetFlags ( ) const
inline
243 { return _flags; }
uint32 _flags
Definition: CalendarMgr.h:262

+ Here is the caller graph for this function:

ObjectGuid::LowType CalendarEvent::GetGuildId ( ) const
inline
225 { return _eventGuildId; }
ObjectGuid::LowType _eventGuildId
Definition: CalendarMgr.h:258

+ Here is the caller graph for this function:

time_t CalendarEvent::GetLockDate ( ) const
inline
250 { return _lockDate; }
time_t _lockDate
Definition: CalendarMgr.h:265

+ Here is the caller graph for this function:

ObjectGuid CalendarEvent::GetOwnerGUID ( ) const
inline
222 { return _ownerGUID; }
ObjectGuid _ownerGUID
Definition: CalendarMgr.h:257

+ Here is the caller graph for this function:

int32 CalendarEvent::GetTextureId ( ) const
inline
237 { return _textureId; }
int32 _textureId
Definition: CalendarMgr.h:260

+ Here is the caller graph for this function:

std::string CalendarEvent::GetTitle ( ) const
inline
228 { return _title; }
std::string _title
Definition: CalendarMgr.h:263

+ Here is the caller graph for this function:

CalendarEventType CalendarEvent::GetType ( ) const
inline
234 { return _eventType; }
CalendarEventType _eventType
Definition: CalendarMgr.h:259

+ Here is the caller graph for this function:

bool CalendarEvent::IsGuildAnnouncement ( ) const
inline
246 { return (_flags & CALENDAR_FLAG_WITHOUT_INVITES) != 0; }
uint32 _flags
Definition: CalendarMgr.h:262
Definition: CalendarMgr.h:38

+ Here is the caller graph for this function:

bool CalendarEvent::IsGuildEvent ( ) const
inline
245 { return (_flags & CALENDAR_FLAG_GUILD_EVENT) != 0; }
uint32 _flags
Definition: CalendarMgr.h:262
Definition: CalendarMgr.h:39

+ Here is the caller graph for this function:

bool CalendarEvent::IsLocked ( ) const
inline
247 { return (_flags & CALENDAR_FLAG_INVITES_LOCKED) != 0; }
uint32 _flags
Definition: CalendarMgr.h:262
Definition: CalendarMgr.h:37
void CalendarEvent::SetDate ( time_t  date)
inline
239 { _date = date; }
time_t _date
Definition: CalendarMgr.h:261

+ Here is the caller graph for this function:

void CalendarEvent::SetDescription ( std::string const description)
inline
230 { _description = description; }
std::string _description
Definition: CalendarMgr.h:264
void CalendarEvent::SetEventId ( uint64  eventId)
inline
218 { _eventId = eventId; }
uint64 _eventId
Definition: CalendarMgr.h:256
void CalendarEvent::SetFlags ( uint32  flags)
inline
242 { _flags = flags; }
uint32 _flags
Definition: CalendarMgr.h:262
uint8 flags
Definition: DisableMgr.cpp:44
void CalendarEvent::SetGuildId ( ObjectGuid::LowType  guildId)
inline
224 { _eventGuildId = guildId; }
ObjectGuid::LowType _eventGuildId
Definition: CalendarMgr.h:258

+ Here is the caller graph for this function:

void CalendarEvent::SetLockDate ( time_t  lockDate)
inline
249 { _lockDate = lockDate; }
time_t _lockDate
Definition: CalendarMgr.h:265
void CalendarEvent::SetOwnerGUID ( ObjectGuid  guid)
inline
221 { _ownerGUID = guid; }
ObjectGuid _ownerGUID
Definition: CalendarMgr.h:257
void CalendarEvent::SetTextureId ( int32  textureId)
inline
236 { _textureId = textureId; }
int32 _textureId
Definition: CalendarMgr.h:260
void CalendarEvent::SetTitle ( std::string const title)
inline
227 { _title = title; }
std::string _title
Definition: CalendarMgr.h:263
void CalendarEvent::SetType ( CalendarEventType  eventType)
inline
233 { _eventType = eventType; }
CalendarEventType _eventType
Definition: CalendarMgr.h:259

Member Data Documentation

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

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