![]() |
TrinityCore
|
#include <TicketMgr.h>
Public Member Functions | |
| void | LoadTickets () |
| void | LoadSurveys () |
| GmTicket * | GetTicket (uint32 ticketId) |
| GmTicket * | GetTicketByPlayer (ObjectGuid playerGuid) |
| GmTicket * | GetOldestOpenTicket () |
| void | AddTicket (GmTicket *ticket) |
| void | CloseTicket (uint32 ticketId, ObjectGuid source) |
| void | ResolveAndCloseTicket (uint32 ticketId, ObjectGuid source) |
| void | RemoveTicket (uint32 ticketId) |
| bool | GetStatus () const |
| void | SetStatus (bool status) |
| uint64 | GetLastChange () const |
| void | UpdateLastChange () |
| uint32 | GenerateTicketId () |
| uint32 | GetOpenTicketCount () const |
| uint32 | GetNextSurveyID () |
| void | Initialize () |
| void | ResetTickets () |
| void | ShowList (ChatHandler &handler, bool onlineOnly) const |
| void | ShowClosedList (ChatHandler &handler) const |
| void | ShowEscalatedList (ChatHandler &handler) const |
| void | SendTicket (WorldSession *session, GmTicket *ticket) const |
Static Public Member Functions | |
| static TicketMgr * | instance () |
Private Member Functions | |
| TicketMgr () | |
| ~TicketMgr () | |
Private Attributes | |
| GmTicketList | _ticketList |
| bool | _status |
| uint32 | _lastTicketId |
| uint32 | _lastSurveyId |
| uint32 | _openTicketCount |
| uint64 | _lastChange |
Definition at line 177 of file TicketMgr.h.
|
private |
Definition at line 254 of file TicketMgr.cpp.
|
private |
Definition at line 257 of file TicketMgr.cpp.
References _ticketList.
| void TicketMgr::AddTicket | ( | GmTicket * | ticket | ) |
Definition at line 354 of file TicketMgr.cpp.
References _openTicketCount, _ticketList, GmTicket::GetId(), GmTicket::IsClosed(), and GmTicket::SaveToDB().
| void TicketMgr::CloseTicket | ( | uint32 | ticketId, |
| ObjectGuid | source | ||
| ) |
Definition at line 363 of file TicketMgr.cpp.
References _openTicketCount, GetTicket(), and ObjectGuid::IsEmpty().
|
inline |
Definition at line 227 of file TicketMgr.h.
|
inline |
Definition at line 224 of file TicketMgr.h.
|
inline |
Definition at line 229 of file TicketMgr.h.
|
inline |
Definition at line 207 of file TicketMgr.h.
|
inline |
Definition at line 228 of file TicketMgr.h.
|
inline |
Definition at line 221 of file TicketMgr.h.
Definition at line 189 of file TicketMgr.h.
Referenced by CloseTicket(), RemoveTicket(), and ResolveAndCloseTicket().
|
inline |
Definition at line 198 of file TicketMgr.h.
| void TicketMgr::Initialize | ( | ) |
Definition at line 263 of file TicketMgr.cpp.
References CONFIG_ALLOW_TICKETS, SetStatus(), and sWorld.
|
static |
| void TicketMgr::LoadSurveys | ( | ) |
Definition at line 341 of file TicketMgr.cpp.
References _lastSurveyId, CharacterDatabase, getMSTime(), GetMSTimeDiffToNow(), and TC_LOG_INFO.
| void TicketMgr::LoadTickets | ( | ) |
Definition at line 295 of file TicketMgr.cpp.
References _lastTicketId, _openTicketCount, _ticketList, CHAR_SEL_GM_TICKETS, CharacterDatabase, GmTicket::GetId(), getMSTime(), GetMSTimeDiffToNow(), GmTicket::IsClosed(), GmTicket::LoadFromDB(), and TC_LOG_INFO.
| void TicketMgr::RemoveTicket | ( | uint32 | ticketId | ) |
Definition at line 388 of file TicketMgr.cpp.
References _ticketList, and GetTicket().
| void TicketMgr::ResetTickets | ( | ) |
Definition at line 268 of file TicketMgr.cpp.
References _lastTicketId, _ticketList, CHAR_DEL_ALL_GM_TICKETS, CharacterDatabase, and sTicketMgr.
| void TicketMgr::ResolveAndCloseTicket | ( | uint32 | ticketId, |
| ObjectGuid | source | ||
| ) |
Definition at line 375 of file TicketMgr.cpp.
References _openTicketCount, GetTicket(), and ObjectGuid::IsEmpty().
| void TicketMgr::SendTicket | ( | WorldSession * | session, |
| GmTicket * | ticket | ||
| ) | const |
Definition at line 428 of file TicketMgr.cpp.
References WorldPackets::Ticket::GMTicketInfo::AssignedToGM, WorldPackets::Ticket::GMTicketInfo::Category, GetAge(), GmTicket::GetEscalatedStatus(), GmTicket::GetId(), GmTicket::GetLastModifiedTime(), GmTicket::GetMessage(), GmTicket::GetNeedMoreHelp(), GMTICKET_OPENEDBYGM_STATUS_NOT_OPENED, GMTICKET_OPENEDBYGM_STATUS_OPENED, GMTICKET_STATUS_DEFAULT, GMTICKET_STATUS_HASTEXT, WorldPackets::Ticket::GMTicketGetTicketResponse::Info, GmTicket::IsViewed(), WorldPackets::Ticket::GMTicketInfo::OldestTicketTime, WorldPackets::Ticket::GMTicketInfo::OpenedByGM, WorldPackets::Ticket::GMTicketGetTicketResponse::Result, WorldSession::SendPacket(), sTicketMgr, TICKET_IN_ESCALATION_QUEUE, WorldPackets::Ticket::GMTicketInfo::TicketDescription, WorldPackets::Ticket::GMTicketInfo::TicketID, WorldPackets::Ticket::GMTicketInfo::TicketOpenTime, WorldPackets::Ticket::GMTicketInfo::UpdateTime, and WorldPackets::Ticket::GMTicketGetTicketResponse::Write().
|
inline |
Definition at line 222 of file TicketMgr.h.
Referenced by Initialize().
| void TicketMgr::ShowClosedList | ( | ChatHandler & | handler | ) | const |
Definition at line 412 of file TicketMgr.cpp.
References _ticketList, LANG_COMMAND_TICKETSHOWCLOSEDLIST, and ChatHandler::SendSysMessage().
| void TicketMgr::ShowEscalatedList | ( | ChatHandler & | handler | ) | const |
Definition at line 420 of file TicketMgr.cpp.
References _ticketList, LANG_COMMAND_TICKETSHOWESCALATEDLIST, ChatHandler::SendSysMessage(), and TICKET_IN_ESCALATION_QUEUE.
| void TicketMgr::ShowList | ( | ChatHandler & | handler, |
| bool | onlineOnly | ||
| ) | const |
Definition at line 403 of file TicketMgr.cpp.
References _ticketList, LANG_COMMAND_TICKETSHOWLIST, LANG_COMMAND_TICKETSHOWONLINELIST, and ChatHandler::SendSysMessage().
| void TicketMgr::UpdateLastChange | ( | ) |
Definition at line 398 of file TicketMgr.cpp.
References _lastChange, and GameTime::GetGameTime().
|
private |
Definition at line 247 of file TicketMgr.h.
Referenced by UpdateLastChange().
|
private |
Definition at line 245 of file TicketMgr.h.
Referenced by LoadSurveys().
|
private |
Definition at line 244 of file TicketMgr.h.
Referenced by LoadTickets(), and ResetTickets().
|
private |
Definition at line 246 of file TicketMgr.h.
Referenced by AddTicket(), CloseTicket(), LoadTickets(), and ResolveAndCloseTicket().
|
private |
Definition at line 243 of file TicketMgr.h.
|
private |
Definition at line 241 of file TicketMgr.h.
Referenced by AddTicket(), LoadTickets(), RemoveTicket(), ResetTickets(), ShowClosedList(), ShowEscalatedList(), ShowList(), and ~TicketMgr().