AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
CalendarMgr.h File Reference
#include "Common.h"
#include "DatabaseEnv.h"
#include "ObjectGuid.h"
#include "WorldPacket.h"
#include <unordered_map>

Go to the source code of this file.

Classes

struct  CalendarInvite
 
struct  CalendarEvent
 
class  CalendarMgr
 

Macros

#define sCalendarMgr   CalendarMgr::instance()
 

Typedefs

typedef std::vector< CalendarInvite * > CalendarInviteStore
 
typedef std::unordered_set< CalendarEvent * > CalendarEventStore
 
typedef std::unordered_map< uint64, CalendarInviteStoreCalendarEventInviteStore
 

Enumerations

enum  CalendarMailAnswers {
  CALENDAR_EVENT_REMOVED_MAIL_SUBJECT = 0 ,
  CALENDAR_INVITE_REMOVED_MAIL_SUBJECT = 0x100
}
 
enum  CalendarFlags {
  CALENDAR_FLAG_ALL_ALLOWED = 0x001 ,
  CALENDAR_FLAG_INVITES_LOCKED = 0x010 ,
  CALENDAR_FLAG_WITHOUT_INVITES = 0x040 ,
  CALENDAR_FLAG_GUILD_EVENT = 0x400
}
 
enum  CalendarModerationRank {
  CALENDAR_RANK_PLAYER = 0 ,
  CALENDAR_RANK_MODERATOR = 1 ,
  CALENDAR_RANK_OWNER = 2
}
 
enum  CalendarSendEventType {
  CALENDAR_SENDTYPE_GET = 0 ,
  CALENDAR_SENDTYPE_ADD = 1 ,
  CALENDAR_SENDTYPE_COPY = 2
}
 
enum  CalendarEventType {
  CALENDAR_TYPE_RAID = 0 ,
  CALENDAR_TYPE_DUNGEON = 1 ,
  CALENDAR_TYPE_PVP = 2 ,
  CALENDAR_TYPE_MEETING = 3 ,
  CALENDAR_TYPE_OTHER = 4
}
 
enum  CalendarRepeatType {
  CALENDAR_REPEAT_NEVER = 0 ,
  CALENDAR_REPEAT_WEEKLY = 1 ,
  CALENDAR_REPEAT_BIWEEKLY = 2 ,
  CALENDAR_REPEAT_MONTHLY = 3
}
 
enum  CalendarInviteStatus {
  CALENDAR_STATUS_INVITED = 0 ,
  CALENDAR_STATUS_ACCEPTED = 1 ,
  CALENDAR_STATUS_DECLINED = 2 ,
  CALENDAR_STATUS_CONFIRMED = 3 ,
  CALENDAR_STATUS_OUT = 4 ,
  CALENDAR_STATUS_STANDBY = 5 ,
  CALENDAR_STATUS_SIGNED_UP = 6 ,
  CALENDAR_STATUS_NOT_SIGNED_UP = 7 ,
  CALENDAR_STATUS_TENTATIVE = 8 ,
  CALENDAR_STATUS_REMOVED = 9
}
 
enum  CalendarError {
  CALENDAR_OK = 0 ,
  CALENDAR_ERROR_GUILD_EVENTS_EXCEEDED = 1 ,
  CALENDAR_ERROR_EVENTS_EXCEEDED = 2 ,
  CALENDAR_ERROR_SELF_INVITES_EXCEEDED = 3 ,
  CALENDAR_ERROR_OTHER_INVITES_EXCEEDED = 4 ,
  CALENDAR_ERROR_PERMISSIONS = 5 ,
  CALENDAR_ERROR_EVENT_INVALID = 6 ,
  CALENDAR_ERROR_NOT_INVITED = 7 ,
  CALENDAR_ERROR_INTERNAL = 8 ,
  CALENDAR_ERROR_GUILD_PLAYER_NOT_IN_GUILD = 9 ,
  CALENDAR_ERROR_ALREADY_INVITED_TO_EVENT_S = 10 ,
  CALENDAR_ERROR_PLAYER_NOT_FOUND = 11 ,
  CALENDAR_ERROR_NOT_ALLIED = 12 ,
  CALENDAR_ERROR_IGNORING_YOU_S = 13 ,
  CALENDAR_ERROR_INVITES_EXCEEDED = 14 ,
  CALENDAR_ERROR_INVALID_DATE = 16 ,
  CALENDAR_ERROR_INVALID_TIME = 17 ,
  CALENDAR_ERROR_NEEDS_TITLE = 19 ,
  CALENDAR_ERROR_EVENT_PASSED = 20 ,
  CALENDAR_ERROR_EVENT_LOCKED = 21 ,
  CALENDAR_ERROR_DELETE_CREATOR_FAILED = 22 ,
  CALENDAR_ERROR_SYSTEM_DISABLED = 24 ,
  CALENDAR_ERROR_RESTRICTED_ACCOUNT = 25 ,
  CALENDAR_ERROR_ARENA_EVENTS_EXCEEDED = 26 ,
  CALENDAR_ERROR_RESTRICTED_LEVEL = 27 ,
  CALENDAR_ERROR_USER_SQUELCHED = 28 ,
  CALENDAR_ERROR_NO_INVITE = 29 ,
  CALENDAR_ERROR_EVENT_WRONG_SERVER = 36 ,
  CALENDAR_ERROR_INVITE_WRONG_SERVER = 37 ,
  CALENDAR_ERROR_NO_GUILD_INVITES = 38 ,
  CALENDAR_ERROR_INVALID_SIGNUP = 39 ,
  CALENDAR_ERROR_NO_MODERATOR = 40
}
 
enum  CalendarLimits {
  CALENDAR_MAX_EVENTS = 30 ,
  CALENDAR_MAX_GUILD_EVENTS = 100 ,
  CALENDAR_MAX_INVITES = 100 ,
  CALENDAR_CREATE_EVENT_COOLDOWN = 5 ,
  CALENDAR_OLD_EVENTS_DELETION_TIME = 1 * MONTH
}
 

Macro Definition Documentation

◆ sCalendarMgr

#define sCalendarMgr   CalendarMgr::instance()

Typedef Documentation

◆ CalendarEventInviteStore

typedef std::unordered_map<uint64 , CalendarInviteStore > CalendarEventInviteStore

◆ CalendarEventStore

typedef std::unordered_set<CalendarEvent*> CalendarEventStore

◆ CalendarInviteStore

typedef std::vector<CalendarInvite*> CalendarInviteStore

Enumeration Type Documentation

◆ CalendarError

Enumerator
CALENDAR_OK 
CALENDAR_ERROR_GUILD_EVENTS_EXCEEDED 
CALENDAR_ERROR_EVENTS_EXCEEDED 
CALENDAR_ERROR_SELF_INVITES_EXCEEDED 
CALENDAR_ERROR_OTHER_INVITES_EXCEEDED 
CALENDAR_ERROR_PERMISSIONS 
CALENDAR_ERROR_EVENT_INVALID 
CALENDAR_ERROR_NOT_INVITED 
CALENDAR_ERROR_INTERNAL 
CALENDAR_ERROR_GUILD_PLAYER_NOT_IN_GUILD 
CALENDAR_ERROR_ALREADY_INVITED_TO_EVENT_S 
CALENDAR_ERROR_PLAYER_NOT_FOUND 
CALENDAR_ERROR_NOT_ALLIED 
CALENDAR_ERROR_IGNORING_YOU_S 
CALENDAR_ERROR_INVITES_EXCEEDED 
CALENDAR_ERROR_INVALID_DATE 
CALENDAR_ERROR_INVALID_TIME 
CALENDAR_ERROR_NEEDS_TITLE 
CALENDAR_ERROR_EVENT_PASSED 
CALENDAR_ERROR_EVENT_LOCKED 
CALENDAR_ERROR_DELETE_CREATOR_FAILED 
CALENDAR_ERROR_SYSTEM_DISABLED 
CALENDAR_ERROR_RESTRICTED_ACCOUNT 
CALENDAR_ERROR_ARENA_EVENTS_EXCEEDED 
CALENDAR_ERROR_RESTRICTED_LEVEL 
CALENDAR_ERROR_USER_SQUELCHED 
CALENDAR_ERROR_NO_INVITE 
CALENDAR_ERROR_EVENT_WRONG_SERVER 
CALENDAR_ERROR_INVITE_WRONG_SERVER 
CALENDAR_ERROR_NO_GUILD_INVITES 
CALENDAR_ERROR_INVALID_SIGNUP 
CALENDAR_ERROR_NO_MODERATOR 
89{
90 CALENDAR_OK = 0,
107
118
124};
@ CALENDAR_ERROR_INTERNAL
Definition: CalendarMgr.h:98
@ CALENDAR_ERROR_INVALID_SIGNUP
Definition: CalendarMgr.h:122
@ CALENDAR_ERROR_NO_INVITE
Definition: CalendarMgr.h:117
@ CALENDAR_ERROR_SYSTEM_DISABLED
Definition: CalendarMgr.h:112
@ CALENDAR_ERROR_EVENT_PASSED
Definition: CalendarMgr.h:109
@ CALENDAR_ERROR_NOT_INVITED
Definition: CalendarMgr.h:97
@ CALENDAR_ERROR_EVENT_LOCKED
Definition: CalendarMgr.h:110
@ CALENDAR_ERROR_ARENA_EVENTS_EXCEEDED
Definition: CalendarMgr.h:114
@ CALENDAR_ERROR_OTHER_INVITES_EXCEEDED
Definition: CalendarMgr.h:94
@ CALENDAR_ERROR_SELF_INVITES_EXCEEDED
Definition: CalendarMgr.h:93
@ CALENDAR_ERROR_NOT_ALLIED
Definition: CalendarMgr.h:102
@ CALENDAR_ERROR_PERMISSIONS
Definition: CalendarMgr.h:95
@ CALENDAR_ERROR_EVENTS_EXCEEDED
Definition: CalendarMgr.h:92
@ CALENDAR_ERROR_NO_GUILD_INVITES
Definition: CalendarMgr.h:121
@ CALENDAR_ERROR_INVALID_DATE
Definition: CalendarMgr.h:105
@ CALENDAR_ERROR_NEEDS_TITLE
Definition: CalendarMgr.h:108
@ CALENDAR_ERROR_RESTRICTED_LEVEL
Definition: CalendarMgr.h:115
@ CALENDAR_ERROR_DELETE_CREATOR_FAILED
Definition: CalendarMgr.h:111
@ CALENDAR_ERROR_GUILD_EVENTS_EXCEEDED
Definition: CalendarMgr.h:91
@ CALENDAR_ERROR_NO_MODERATOR
Definition: CalendarMgr.h:123
@ CALENDAR_ERROR_INVITE_WRONG_SERVER
Definition: CalendarMgr.h:120
@ CALENDAR_ERROR_ALREADY_INVITED_TO_EVENT_S
Definition: CalendarMgr.h:100
@ CALENDAR_ERROR_INVITES_EXCEEDED
Definition: CalendarMgr.h:104
@ CALENDAR_ERROR_INVALID_TIME
Definition: CalendarMgr.h:106
@ CALENDAR_ERROR_EVENT_WRONG_SERVER
Definition: CalendarMgr.h:119
@ CALENDAR_ERROR_RESTRICTED_ACCOUNT
Definition: CalendarMgr.h:113
@ CALENDAR_ERROR_IGNORING_YOU_S
Definition: CalendarMgr.h:103
@ CALENDAR_ERROR_USER_SQUELCHED
Definition: CalendarMgr.h:116
@ CALENDAR_ERROR_PLAYER_NOT_FOUND
Definition: CalendarMgr.h:101
@ CALENDAR_OK
Definition: CalendarMgr.h:90
@ CALENDAR_ERROR_EVENT_INVALID
Definition: CalendarMgr.h:96
@ CALENDAR_ERROR_GUILD_PLAYER_NOT_IN_GUILD
Definition: CalendarMgr.h:99

◆ CalendarEventType

Enumerator
CALENDAR_TYPE_RAID 
CALENDAR_TYPE_DUNGEON 
CALENDAR_TYPE_PVP 
CALENDAR_TYPE_MEETING 
CALENDAR_TYPE_OTHER 
58{
64};
@ CALENDAR_TYPE_OTHER
Definition: CalendarMgr.h:63
@ CALENDAR_TYPE_RAID
Definition: CalendarMgr.h:59
@ CALENDAR_TYPE_MEETING
Definition: CalendarMgr.h:62
@ CALENDAR_TYPE_PVP
Definition: CalendarMgr.h:61
@ CALENDAR_TYPE_DUNGEON
Definition: CalendarMgr.h:60

◆ CalendarFlags

Enumerator
CALENDAR_FLAG_ALL_ALLOWED 
CALENDAR_FLAG_INVITES_LOCKED 
CALENDAR_FLAG_WITHOUT_INVITES 
CALENDAR_FLAG_GUILD_EVENT 
36{
41};
@ CALENDAR_FLAG_WITHOUT_INVITES
Definition: CalendarMgr.h:39
@ CALENDAR_FLAG_INVITES_LOCKED
Definition: CalendarMgr.h:38
@ CALENDAR_FLAG_GUILD_EVENT
Definition: CalendarMgr.h:40
@ CALENDAR_FLAG_ALL_ALLOWED
Definition: CalendarMgr.h:37

◆ CalendarInviteStatus

Enumerator
CALENDAR_STATUS_INVITED 
CALENDAR_STATUS_ACCEPTED 
CALENDAR_STATUS_DECLINED 
CALENDAR_STATUS_CONFIRMED 
CALENDAR_STATUS_OUT 
CALENDAR_STATUS_STANDBY 
CALENDAR_STATUS_SIGNED_UP 
CALENDAR_STATUS_NOT_SIGNED_UP 
CALENDAR_STATUS_TENTATIVE 
CALENDAR_STATUS_REMOVED 
75{
85 CALENDAR_STATUS_REMOVED = 9 // correct name?
86};
@ CALENDAR_STATUS_TENTATIVE
Definition: CalendarMgr.h:84
@ CALENDAR_STATUS_NOT_SIGNED_UP
Definition: CalendarMgr.h:83
@ CALENDAR_STATUS_STANDBY
Definition: CalendarMgr.h:81
@ CALENDAR_STATUS_INVITED
Definition: CalendarMgr.h:76
@ CALENDAR_STATUS_ACCEPTED
Definition: CalendarMgr.h:77
@ CALENDAR_STATUS_SIGNED_UP
Definition: CalendarMgr.h:82
@ CALENDAR_STATUS_REMOVED
Definition: CalendarMgr.h:85
@ CALENDAR_STATUS_DECLINED
Definition: CalendarMgr.h:78
@ CALENDAR_STATUS_CONFIRMED
Definition: CalendarMgr.h:79
@ CALENDAR_STATUS_OUT
Definition: CalendarMgr.h:80

◆ CalendarLimits

Enumerator
CALENDAR_MAX_EVENTS 
CALENDAR_MAX_GUILD_EVENTS 
CALENDAR_MAX_INVITES 
CALENDAR_CREATE_EVENT_COOLDOWN 
CALENDAR_OLD_EVENTS_DELETION_TIME 
127{
133};
constexpr auto MONTH
Definition: Common.h:51
@ CALENDAR_OLD_EVENTS_DELETION_TIME
Definition: CalendarMgr.h:132
@ CALENDAR_MAX_EVENTS
Definition: CalendarMgr.h:128
@ CALENDAR_MAX_INVITES
Definition: CalendarMgr.h:130
@ CALENDAR_MAX_GUILD_EVENTS
Definition: CalendarMgr.h:129
@ CALENDAR_CREATE_EVENT_COOLDOWN
Definition: CalendarMgr.h:131

◆ CalendarMailAnswers

Enumerator
CALENDAR_EVENT_REMOVED_MAIL_SUBJECT 
CALENDAR_INVITE_REMOVED_MAIL_SUBJECT 
28{
29 // else
31 // if (*(_DWORD *)(a1 + 8292) & 0x100 )
33};
@ CALENDAR_EVENT_REMOVED_MAIL_SUBJECT
Definition: CalendarMgr.h:30
@ CALENDAR_INVITE_REMOVED_MAIL_SUBJECT
Definition: CalendarMgr.h:32

◆ CalendarModerationRank

Enumerator
CALENDAR_RANK_PLAYER 
CALENDAR_RANK_MODERATOR 
CALENDAR_RANK_OWNER 
44{
48};
@ CALENDAR_RANK_PLAYER
Definition: CalendarMgr.h:45
@ CALENDAR_RANK_MODERATOR
Definition: CalendarMgr.h:46
@ CALENDAR_RANK_OWNER
Definition: CalendarMgr.h:47

◆ CalendarRepeatType

Enumerator
CALENDAR_REPEAT_NEVER 
CALENDAR_REPEAT_WEEKLY 
CALENDAR_REPEAT_BIWEEKLY 
CALENDAR_REPEAT_MONTHLY 
67{
72};
@ CALENDAR_REPEAT_BIWEEKLY
Definition: CalendarMgr.h:70
@ CALENDAR_REPEAT_WEEKLY
Definition: CalendarMgr.h:69
@ CALENDAR_REPEAT_NEVER
Definition: CalendarMgr.h:68
@ CALENDAR_REPEAT_MONTHLY
Definition: CalendarMgr.h:71

◆ CalendarSendEventType

Enumerator
CALENDAR_SENDTYPE_GET 
CALENDAR_SENDTYPE_ADD 
CALENDAR_SENDTYPE_COPY 
51{
55};
@ CALENDAR_SENDTYPE_GET
Definition: CalendarMgr.h:52
@ CALENDAR_SENDTYPE_COPY
Definition: CalendarMgr.h:54
@ CALENDAR_SENDTYPE_ADD
Definition: CalendarMgr.h:53