|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <CalendarMgr.h>
Private Member Functions | |
| CalendarMgr () | |
| ~CalendarMgr () | |
Private Attributes | |
| CalendarEventStore | _events |
| std::deque< uint64 > | _freeEventIds |
| std::deque< uint64 > | _freeInviteIds |
| CalendarEventInviteStore | _invites |
| uint64 | _maxEventId |
| uint64 | _maxInviteId |
Friends | |
| class | Skyfire::Singleton< CalendarMgr, Skyfire::NullMutex > |
Definition at line 259 of file CalendarMgr.h.
|
inlineprivate |
Definition at line 264 of file CalendarMgr.h.
References _maxEventId, _maxInviteId, and CalendarMgr().
Referenced by CalendarMgr().
|
private |
Definition at line 26 of file CalendarMgr.cpp.
| void CalendarMgr::AddEvent | ( | CalendarEvent * | calendarEvent, |
| CalendarSendEventType | sendType ) |
Definition at line 103 of file CalendarMgr.cpp.
References _events, CalendarEvent::GetCreatorGUID(), SendCalendarEvent(), and UpdateEvent().
| void CalendarMgr::AddInvite | ( | CalendarEvent * | calendarEvent, |
| CalendarInvite * | invite, | ||
| bool | sendEventInvitePacket = true, | ||
| bool | forceEventInviteAlertPacket = false ) |
Definition at line 110 of file CalendarMgr.cpp.
References _invites, CalendarEvent::GetCreatorGUID(), CalendarInvite::GetEventId(), CalendarInvite::GetInviteeGUID(), CalendarEvent::IsGuildAnnouncement(), CalendarEvent::IsGuildEvent(), SendCalendarEventInvite(), SendCalendarEventInviteAlert(), and UpdateInvite().
| void CalendarMgr::FreeEventId | ( | uint64 | id | ) |
Definition at line 280 of file CalendarMgr.cpp.
References _freeEventIds, and _maxEventId.
| void CalendarMgr::FreeInviteId | ( | uint64 | id | ) |
Definition at line 298 of file CalendarMgr.cpp.
References _freeInviteIds, and _maxInviteId.
| CalendarEvent * CalendarMgr::GetEvent | ( | uint64 | eventId | ) | const |
Definition at line 259 of file CalendarMgr.cpp.
References _events, SF_LOG_DEBUG, and UI64FMTD.
Referenced by GetPlayerEvents(), LoadFromDB(), RemoveEvent(), RemoveInvite(), RemovePlayerGuildEventsAndSignups(), and SendCalendarEventInvite().
| CalendarInviteStore const & CalendarMgr::GetEventInvites | ( | uint64 | eventId | ) |
Definition at line 333 of file CalendarMgr.cpp.
References _invites.
|
inline |
Definition at line 279 of file CalendarMgr.h.
References _events.
| uint64 CalendarMgr::GetFreeEventId | ( | ) |
Definition at line 288 of file CalendarMgr.cpp.
References _freeEventIds, and _maxEventId.
| uint64 CalendarMgr::GetFreeInviteId | ( | ) |
Definition at line 306 of file CalendarMgr.cpp.
References _freeInviteIds, and _maxInviteId.
| CalendarInvite * CalendarMgr::GetInvite | ( | uint64 | inviteId | ) | const |
Definition at line 269 of file CalendarMgr.cpp.
References _invites, SF_LOG_DEBUG, and UI64FMTD.
Referenced by LoadFromDB().
|
inline |
Definition at line 283 of file CalendarMgr.h.
References _invites.
| CalendarEventStore CalendarMgr::GetPlayerEvents | ( | uint64 | guid | ) |
Definition at line 316 of file CalendarMgr.cpp.
References _events, _invites, ObjectAccessor::FindPlayer(), and GetEvent().
| CalendarInviteStore CalendarMgr::GetPlayerInvites | ( | uint64 | guid | ) |
Definition at line 338 of file CalendarMgr.cpp.
References _invites.
Referenced by GetPlayerNumPending(), RemoveAllPlayerEventsAndInvites(), and RemovePlayerGuildEventsAndSignups().
Definition at line 350 of file CalendarMgr.cpp.
References CALENDAR_STATUS_INVITED, CALENDAR_STATUS_NOT_SIGNED_UP, CALENDAR_STATUS_TENTATIVE, and GetPlayerInvites().
| void CalendarMgr::LoadFromDB | ( | ) |
Definition at line 36 of file CalendarMgr.cpp.
References _events, _freeEventIds, _freeInviteIds, _invites, _maxEventId, _maxInviteId, CALENDAR_FLAG_GUILD_EVENT, CALENDAR_FLAG_WITHOUT_INVITES, CharacterDatabase, GetEvent(), Player::GetGuildIdFromDB(), Field::GetInt32(), GetInvite(), Field::GetString(), Field::GetUInt32(), Field::GetUInt64(), HIGHGUID_PLAYER, MAKE_NEW_GUID(), and SF_LOG_INFO.
| void CalendarMgr::RemoveAllPlayerEventsAndInvites | ( | uint64 | guid | ) |
Definition at line 235 of file CalendarMgr.cpp.
References _events, GetPlayerInvites(), RemoveEvent(), and RemoveInvite().
Definition at line 125 of file CalendarMgr.cpp.
References _events, _invites, CalendarEvent::BuildCalendarMailBody(), CalendarEvent::BuildCalendarMailSubject(), CALENDAR_ERROR_EVENT_INVALID, CHAR_DEL_CALENDAR_EVENT, CHAR_DEL_CALENDAR_INVITE, CharacterDatabase, GetEvent(), CalendarInvite::GetInviteeGUID(), CalendarInvite::GetInviteId(), MAIL_CHECK_MASK_COPIED, SendCalendarCommandResult(), SendCalendarEventRemovedAlert(), MailDraft::SendMailTo(), and PreparedStatement::setUInt64().
Referenced by RemoveAllPlayerEventsAndInvites(), and RemovePlayerGuildEventsAndSignups().
Definition at line 168 of file CalendarMgr.cpp.
References _invites, CALENDAR_STATUS_REMOVED, CHAR_DEL_CALENDAR_INVITE, CharacterDatabase, GetEvent(), CalendarEvent::GetFlags(), CalendarEvent::IsGuildEvent(), SendCalendarEventInviteRemove(), SendCalendarEventInviteRemoveAlert(), and PreparedStatement::setUInt64().
Referenced by RemoveAllPlayerEventsAndInvites(), and RemovePlayerGuildEventsAndSignups().
Definition at line 246 of file CalendarMgr.cpp.
References _events, GetEvent(), GetPlayerInvites(), RemoveEvent(), and RemoveInvite().
| void CalendarMgr::SendCalendarClearPendingAction | ( | uint64 | guid | ) |
Definition at line 780 of file CalendarMgr.cpp.
References ObjectAccessor::FindPlayer(), and SMSG_CALENDAR_CLEAR_PENDING_ACTION.
| void CalendarMgr::SendCalendarCommandResult | ( | uint64 | guid, |
| CalendarError | err, | ||
| std::string | param = "" ) |
Definition at line 789 of file CalendarMgr.cpp.
References CALENDAR_ERROR_ALREADY_INVITED_TO_EVENT_S, CALENDAR_ERROR_IGNORING_YOU_S, CALENDAR_ERROR_OTHER_INVITES_EXCEEDED, ObjectAccessor::FindPlayer(), ByteBuffer::FlushBits(), SMSG_CALENDAR_COMMAND_RESULT, ByteBuffer::WriteBit(), ByteBuffer::WriteBits(), and ByteBuffer::WriteString().
Referenced by RemoveEvent().
| void CalendarMgr::SendCalendarEvent | ( | uint64 | playerGuid, |
| CalendarEvent const & | calendarEvent, | ||
| CalendarSendEventType | sendType ) |
Definition at line 663 of file CalendarMgr.cpp.
References _invites, ByteBuffer::append(), ByteBuffer::AppendPackedTime(), ObjectAccessor::FindPlayer(), ByteBuffer::FlushBits(), CalendarEvent::GetCreatorGUID(), CalendarEvent::GetDescription(), CalendarEvent::GetDungeonId(), CalendarEvent::GetEventId(), CalendarEvent::GetEventTime(), CalendarEvent::GetFlags(), Guild::GetGUID(), CalendarEvent::GetGuildId(), Player::GetGuildId(), Player::GetGuildIdFromDB(), CalendarInvite::GetInviteeGUID(), CalendarInvite::GetInviteId(), Unit::getLevel(), Player::GetLevelFromDB(), CalendarInvite::GetRank(), CalendarInvite::GetStatus(), CalendarInvite::GetStatusTime(), CalendarInvite::GetText(), CalendarEvent::GetTitle(), CalendarEvent::GetType(), CalendarEvent::IsGuildEvent(), Player::SendDirectMessage(), sGuildMgr, SMSG_CALENDAR_SEND_EVENT, ByteBuffer::WriteBit(), ByteBuffer::WriteBits(), ByteBuffer::WriteByteSeq(), and ByteBuffer::WriteString().
Referenced by AddEvent().
| void CalendarMgr::SendCalendarEventInvite | ( | CalendarInvite const & | invite | ) |
Definition at line 392 of file CalendarMgr.cpp.
References ByteBuffer::AppendPackedTime(), ObjectAccessor::FindPlayer(), ByteBuffer::FlushBits(), CalendarEvent::GetCreatorGUID(), GetEvent(), CalendarInvite::GetEventId(), CalendarInvite::GetInviteeGUID(), CalendarInvite::GetInviteId(), Unit::getLevel(), Player::GetLevelFromDB(), CalendarInvite::GetSenderGUID(), CalendarInvite::GetStatus(), CalendarInvite::GetStatusTime(), Player::SendDirectMessage(), SendPacketToAllEventRelatives(), SMSG_CALENDAR_EVENT_INVITE, ByteBuffer::WriteBit(), and ByteBuffer::WriteByteSeq().
Referenced by AddInvite().
| void CalendarMgr::SendCalendarEventInviteAlert | ( | CalendarEvent const & | calendarEvent, |
| CalendarInvite const & | invite, | ||
| bool | broadcast ) |
Definition at line 585 of file CalendarMgr.cpp.
References ByteBuffer::AppendPackedTime(), Guild::BroadcastPacket(), ObjectAccessor::FindPlayer(), ByteBuffer::FlushBits(), CalendarEvent::GetCreatorGUID(), CalendarEvent::GetDungeonId(), CalendarEvent::GetEventId(), CalendarEvent::GetEventTime(), CalendarEvent::GetFlags(), Guild::GetGUID(), CalendarEvent::GetGuildId(), CalendarInvite::GetInviteeGUID(), CalendarInvite::GetInviteId(), CalendarInvite::GetRank(), CalendarInvite::GetSenderGUID(), CalendarInvite::GetStatus(), CalendarEvent::GetTitle(), CalendarEvent::GetType(), sGuildMgr, SMSG_CALENDAR_EVENT_INVITE_ALERT, ByteBuffer::WriteBit(), ByteBuffer::WriteBits(), ByteBuffer::WriteByteSeq(), and ByteBuffer::WriteString().
Referenced by AddInvite().
| void CalendarMgr::SendCalendarEventInviteRemove | ( | CalendarEvent const & | calendarEvent, |
| CalendarInvite const & | invite, | ||
| uint32 | flags ) |
Definition at line 527 of file CalendarMgr.cpp.
References ByteBuffer::FlushBits(), CalendarInvite::GetEventId(), CalendarInvite::GetInviteeGUID(), SendPacketToAllEventRelatives(), SMSG_CALENDAR_EVENT_INVITE_REMOVED, ByteBuffer::WriteBit(), and ByteBuffer::WriteByteSeq().
Referenced by RemoveInvite().
| void CalendarMgr::SendCalendarEventInviteRemoveAlert | ( | uint64 | guid, |
| CalendarEvent const & | calendarEvent, | ||
| CalendarInviteStatus | status ) |
Definition at line 766 of file CalendarMgr.cpp.
References ByteBuffer::AppendPackedTime(), ObjectAccessor::FindPlayer(), CalendarEvent::GetEventId(), CalendarEvent::GetEventTime(), CalendarEvent::GetFlags(), and SMSG_CALENDAR_EVENT_INVITE_REMOVED_ALERT.
Referenced by RemoveInvite().
| void CalendarMgr::SendCalendarEventModeratorStatus | ( | CalendarEvent const & | calendarEvent, |
| CalendarInvite const & | invite ) |
Definition at line 556 of file CalendarMgr.cpp.
References ByteBuffer::FlushBits(), CalendarInvite::GetEventId(), CalendarInvite::GetInviteeGUID(), CalendarInvite::GetRank(), SendPacketToAllEventRelatives(), SMSG_CALENDAR_EVENT_MODERATOR_STATUS, ByteBuffer::WriteBit(), and ByteBuffer::WriteByteSeq().
| void CalendarMgr::SendCalendarEventRemovedAlert | ( | CalendarEvent const & | calendarEvent | ) |
Definition at line 516 of file CalendarMgr.cpp.
References ByteBuffer::AppendPackedTime(), ByteBuffer::FlushBits(), CalendarEvent::GetEventId(), CalendarEvent::GetEventTime(), SendPacketToAllEventRelatives(), SMSG_CALENDAR_EVENT_REMOVED_ALERT, and ByteBuffer::WriteBit().
Referenced by RemoveEvent().
| void CalendarMgr::SendCalendarEventStatus | ( | CalendarEvent const & | calendarEvent, |
| CalendarInvite const & | invite ) |
Definition at line 467 of file CalendarMgr.cpp.
References ByteBuffer::AppendPackedTime(), ByteBuffer::FlushBits(), CalendarEvent::GetEventId(), CalendarEvent::GetEventTime(), CalendarEvent::GetFlags(), CalendarInvite::GetInviteeGUID(), CalendarInvite::GetStatus(), CalendarInvite::GetStatusTime(), SendPacketToAllEventRelatives(), SMSG_CALENDAR_EVENT_INVITE_STATUS, ByteBuffer::WriteBit(), and ByteBuffer::WriteByteSeq().
| void CalendarMgr::SendCalendarEventStatusAlert | ( | CalendarEvent const & | calendarEvent, |
| CalendarInvite const & | invite ) |
Definition at line 502 of file CalendarMgr.cpp.
References ByteBuffer::AppendPackedTime(), ObjectAccessor::FindPlayer(), CalendarEvent::GetEventId(), CalendarEvent::GetEventTime(), CalendarEvent::GetFlags(), CalendarInvite::GetInviteeGUID(), CalendarInvite::GetStatus(), and SMSG_CALENDAR_EVENT_INVITE_STATUS_ALERT.
| void CalendarMgr::SendCalendarEventUpdateAlert | ( | CalendarEvent const & | calendarEvent, |
| time_t | oldEventTime ) |
Definition at line 444 of file CalendarMgr.cpp.
References ByteBuffer::AppendPackedTime(), ByteBuffer::FlushBits(), CalendarEvent::GetDescription(), CalendarEvent::GetDungeonId(), CalendarEvent::GetEventId(), CalendarEvent::GetEventTime(), CalendarEvent::GetFlags(), CalendarEvent::GetTitle(), CalendarEvent::GetType(), SendPacketToAllEventRelatives(), SMSG_CALENDAR_EVENT_UPDATED_ALERT, ByteBuffer::WriteBit(), ByteBuffer::WriteBits(), and ByteBuffer::WriteString().
| void CalendarMgr::SendPacketToAllEventRelatives | ( | WorldPacket | packet, |
| CalendarEvent const & | calendarEvent ) |
Definition at line 816 of file CalendarMgr.cpp.
References _invites, ObjectAccessor::FindPlayer(), CalendarEvent::GetEventId(), CalendarEvent::GetGuildId(), CalendarEvent::IsGuildAnnouncement(), CalendarEvent::IsGuildEvent(), and sGuildMgr.
Referenced by SendCalendarEventInvite(), SendCalendarEventInviteRemove(), SendCalendarEventModeratorStatus(), SendCalendarEventRemovedAlert(), SendCalendarEventStatus(), and SendCalendarEventUpdateAlert().
| void CalendarMgr::UpdateEvent | ( | CalendarEvent * | calendarEvent | ) |
Definition at line 203 of file CalendarMgr.cpp.
References CHAR_REP_CALENDAR_EVENT, CharacterDatabase, CalendarEvent::GetCreatorGUID(), CalendarEvent::GetDescription(), CalendarEvent::GetDungeonId(), CalendarEvent::GetEventId(), CalendarEvent::GetEventTime(), CalendarEvent::GetFlags(), CalendarEvent::GetTitle(), CalendarEvent::GetType(), GUID_LOPART(), PreparedStatement::setInt32(), PreparedStatement::setString(), PreparedStatement::setUInt32(), PreparedStatement::setUInt64(), and PreparedStatement::setUInt8().
Referenced by AddEvent().
| void CalendarMgr::UpdateInvite | ( | CalendarInvite * | invite | ) |
Definition at line 219 of file CalendarMgr.cpp.
References CHAR_REP_CALENDAR_INVITE, CharacterDatabase, CalendarInvite::GetEventId(), CalendarInvite::GetInviteeGUID(), CalendarInvite::GetInviteId(), CalendarInvite::GetRank(), CalendarInvite::GetSenderGUID(), CalendarInvite::GetStatus(), CalendarInvite::GetStatusTime(), CalendarInvite::GetText(), GUID_LOPART(), PreparedStatement::setString(), PreparedStatement::setUInt32(), PreparedStatement::setUInt64(), and PreparedStatement::setUInt8().
Referenced by AddInvite().
|
friend |
Definition at line 253 of file CalendarMgr.h.
|
private |
Definition at line 267 of file CalendarMgr.h.
Referenced by AddEvent(), GetEvent(), GetEvents(), GetPlayerEvents(), LoadFromDB(), RemoveAllPlayerEventsAndInvites(), RemoveEvent(), RemovePlayerGuildEventsAndSignups(), and ~CalendarMgr().
|
private |
Definition at line 270 of file CalendarMgr.h.
Referenced by FreeEventId(), GetFreeEventId(), and LoadFromDB().
|
private |
Definition at line 271 of file CalendarMgr.h.
Referenced by FreeInviteId(), GetFreeInviteId(), and LoadFromDB().
|
private |
Definition at line 268 of file CalendarMgr.h.
Referenced by AddInvite(), GetEventInvites(), GetInvite(), GetInvites(), GetPlayerEvents(), GetPlayerInvites(), LoadFromDB(), RemoveEvent(), RemoveInvite(), SendCalendarEvent(), SendPacketToAllEventRelatives(), and ~CalendarMgr().
|
private |
Definition at line 272 of file CalendarMgr.h.
Referenced by CalendarMgr(), FreeEventId(), GetFreeEventId(), and LoadFromDB().
|
private |
Definition at line 273 of file CalendarMgr.h.
Referenced by CalendarMgr(), FreeInviteId(), GetFreeInviteId(), and LoadFromDB().