AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "TicketMgr.h"
Public Member Functions | |
GmTicket () | |
GmTicket (Player *player) | |
~GmTicket () | |
bool | IsClosed () const |
bool | IsCompleted () const |
bool | IsFromPlayer (ObjectGuid guid) const |
bool | IsAssigned () const |
bool | IsAssignedTo (ObjectGuid guid) const |
bool | IsAssignedNotTo (ObjectGuid guid) const |
uint32 | GetId () const |
Player * | GetPlayer () const |
std::string const & | GetPlayerName () const |
std::string const & | GetMessage () const |
Player * | GetAssignedPlayer () const |
ObjectGuid | GetAssignedToGUID () const |
std::string | GetAssignedToName () const |
uint64 | GetLastModifiedTime () const |
GMTicketEscalationStatus | GetEscalatedStatus () const |
void | SetEscalatedStatus (GMTicketEscalationStatus escalatedStatus) |
void | SetAssignedTo (ObjectGuid guid, bool isAdmin) |
void | SetClosedBy (ObjectGuid value) |
void | SetResolvedBy (ObjectGuid value) |
void | SetCompleted () |
void | SetMessage (std::string const &message) |
void | SetComment (std::string const &comment) |
void | SetViewed () |
void | SetUnassigned () |
void | SetPosition (uint32 mapId, float x, float y, float z) |
void | SetGmAction (uint32 needResponse, bool needMoreHelp) |
void | AppendResponse (std::string const &response) |
std::string | GetResponse () |
void | DeleteResponse () |
bool | LoadFromDB (Field *fields) |
void | SaveToDB (CharacterDatabaseTransaction trans) const |
void | DeleteFromDB () |
void | WritePacket (WorldPacket &data) const |
void | SendResponse (WorldSession *session) const |
void | TeleportTo (Player *player) const |
std::string | FormatMessageString (ChatHandler &handler, bool detailed=false) const |
std::string | FormatMessageString (ChatHandler &handler, const char *szClosedName, const char *szAssignedToName, const char *szUnassignedName, const char *szDeletedName) const |
void | SetChatLog (std::list< uint32 > time, std::string const &log) |
std::string const & | GetChatLog () const |
Private Attributes | |
uint32 | _id |
ObjectGuid | _playerGuid |
TicketType | _type |
std::string | _playerName |
float | _posX |
float | _posY |
float | _posZ |
uint16 | _mapId |
std::string | _message |
uint64 | _createTime |
uint64 | _lastModifiedTime |
ObjectGuid | _closedBy |
ObjectGuid | _resolvedBy |
ObjectGuid | _assignedTo |
std::string | _comment |
bool | _completed |
GMTicketEscalationStatus | _escalatedStatus |
bool | _viewed |
bool | _needResponse |
bool | _needMoreHelp |
std::string | _response |
std::string | _chatLog |
GmTicket::GmTicket | ( | ) |
GmTicket::GmTicket | ( | Player * | player | ) |
References _id, _playerGuid, _playerName, Object::GetGUID(), WorldObject::GetName(), and sTicketMgr.
GmTicket::~GmTicket | ( | ) |
|
inline |
References _response.
Referenced by ticket_commandscript::HandleGMTicketCompleteCommand(), and ticket_commandscript::TicketResponseAppend().
void GmTicket::DeleteFromDB | ( | ) |
References _id, CHAR_DEL_GM_TICKET, CharacterDatabase, and PreparedStatementBase::SetData().
|
inline |
std::string GmTicket::FormatMessageString | ( | ChatHandler & | handler, |
bool | detailed = false |
||
) | const |
References _assignedTo, _comment, _createTime, _id, _lastModifiedTime, _message, _playerName, _response, GameTime::GetGameTime(), LANG_COMMAND_TICKETLISTAGE, LANG_COMMAND_TICKETLISTAGECREATE, LANG_COMMAND_TICKETLISTASSIGNEDTO, LANG_COMMAND_TICKETLISTCOMMENT, LANG_COMMAND_TICKETLISTGUID, LANG_COMMAND_TICKETLISTMESSAGE, LANG_COMMAND_TICKETLISTNAME, LANG_COMMAND_TICKETLISTRESPONSE, ChatHandler::PGetParseString(), sCharacterCache, and secsToTimeString().
Referenced by ticket_commandscript::HandleGMTicketAssignToCommand(), ticket_commandscript::HandleGMTicketCloseByIdCommand(), ticket_commandscript::HandleGMTicketCommentCommand(), ticket_commandscript::HandleGMTicketCompleteCommand(), ticket_commandscript::HandleGMTicketDeleteByIdCommand(), ticket_commandscript::HandleGMTicketGetByIdCommand(), ticket_commandscript::HandleGMTicketGetByNameCommand(), ticket_commandscript::HandleGMTicketResponseDeleteCommand(), ticket_commandscript::HandleGMTicketResponseShowCommand(), ticket_commandscript::HandleGMTicketUnAssignCommand(), and ticket_commandscript::TicketResponseAppend().
std::string GmTicket::FormatMessageString | ( | ChatHandler & | handler, |
const char * | szClosedName, | ||
const char * | szAssignedToName, | ||
const char * | szUnassignedName, | ||
const char * | szDeletedName | ||
) | const |
References _id, _playerName, LANG_COMMAND_TICKETCLOSED, LANG_COMMAND_TICKETDELETED, LANG_COMMAND_TICKETLISTASSIGNEDTO, LANG_COMMAND_TICKETLISTGUID, LANG_COMMAND_TICKETLISTNAME, LANG_COMMAND_TICKETLISTUNASSIGNED, and ChatHandler::PGetParseString().
|
inline |
References _assignedTo, and ObjectAccessor::FindConnectedPlayer().
Referenced by ticket_commandscript::HandleGMTicketUnAssignCommand().
|
inline |
|
inline |
References _assignedTo, and sCharacterCache.
Referenced by ticket_commandscript::HandleGMTicketCommentCommand(), and ticket_commandscript::HandleGMTicketUnAssignCommand().
|
inline |
References _chatLog.
|
inline |
|
inline |
References _id.
Referenced by TicketMgr::AddTicket(), Player::DeleteFromDB(), ticket_commandscript::HandleGMTicketAssignToCommand(), ticket_commandscript::HandleGMTicketCloseByIdCommand(), ticket_commandscript::HandleGMTicketCommentCommand(), ticket_commandscript::HandleGMTicketCompleteCommand(), WorldSession::HandleGMTicketCreateOpcode(), ticket_commandscript::HandleGMTicketDeleteByIdCommand(), ticket_commandscript::HandleGMTicketResponseDeleteCommand(), ticket_commandscript::HandleGMTicketUnAssignCommand(), TicketMgr::LoadTickets(), and ticket_commandscript::TicketResponseAppend().
|
inline |
References _lastModifiedTime.
|
inline |
|
inline |
References _playerGuid, and ObjectAccessor::FindConnectedPlayer().
Referenced by ticket_commandscript::HandleGMTicketCloseByIdCommand(), ticket_commandscript::HandleGMTicketCompleteCommand(), ticket_commandscript::HandleGMTicketDeleteByIdCommand(), and ticket_commandscript::HandleGMTicketEscalateCommand().
|
inline |
References _playerName.
|
inline |
|
inline |
References _assignedTo.
Referenced by ticket_commandscript::HandleGMTicketUnAssignCommand(), and IsAssignedNotTo().
|
inline |
References IsAssigned(), and IsAssignedTo().
Referenced by ticket_commandscript::HandleGMTicketAssignToCommand(), ticket_commandscript::HandleGMTicketCloseByIdCommand(), ticket_commandscript::HandleGMTicketCommentCommand(), ticket_commandscript::HandleGMTicketCompleteCommand(), ticket_commandscript::HandleGMTicketResponseDeleteCommand(), and ticket_commandscript::TicketResponseAppend().
|
inline |
References _assignedTo.
Referenced by ticket_commandscript::HandleGMTicketAssignToCommand(), and IsAssignedNotTo().
|
inline |
References _type, and TICKET_TYPE_OPEN.
Referenced by TicketMgr::AddTicket(), ticket_commandscript::HandleGMTicketAssignToCommand(), ticket_commandscript::HandleGMTicketCloseByIdCommand(), ticket_commandscript::HandleGMTicketCompleteCommand(), WorldSession::HandleGMTicketCreateOpcode(), ticket_commandscript::HandleGMTicketDeleteByIdCommand(), ticket_commandscript::HandleGMTicketEscalateCommand(), ticket_commandscript::HandleGMTicketGetByIdCommand(), ticket_commandscript::HandleGMTicketResponseDeleteCommand(), ticket_commandscript::HandleGMTicketUnAssignCommand(), TicketMgr::LoadTickets(), and ticket_commandscript::TicketResponseAppend().
|
inline |
References _completed.
Referenced by ticket_commandscript::HandleGMTicketCloseByIdCommand(), ticket_commandscript::HandleGMTicketCompleteCommand(), WorldSession::HandleGMTicketCreateOpcode(), ticket_commandscript::HandleGMTicketEscalateCommand(), and ticket_commandscript::HandleGMTicketGetByIdCommand().
|
inline |
References _playerGuid.
bool GmTicket::LoadFromDB | ( | Field * | fields | ) |
References _assignedTo, _closedBy, _comment, _completed, _createTime, _escalatedStatus, _id, _lastModifiedTime, _mapId, _message, _needMoreHelp, _playerGuid, _playerName, _posX, _posY, _posZ, _resolvedBy, _response, _type, _viewed, and Field::Get().
Referenced by TicketMgr::LoadTickets().
void GmTicket::SaveToDB | ( | CharacterDatabaseTransaction | trans | ) | const |
References _assignedTo, _closedBy, _comment, _completed, _createTime, _escalatedStatus, _id, _lastModifiedTime, _mapId, _message, _needMoreHelp, _playerGuid, _playerName, _posX, _posY, _posZ, _resolvedBy, _response, _type, _viewed, CHAR_REP_GM_TICKET, CharacterDatabase, ObjectGuid::GetCounter(), and PreparedStatementBase::SetData().
Referenced by TicketMgr::AddTicket(), ticket_commandscript::HandleGMTicketAssignToCommand(), ticket_commandscript::HandleGMTicketCommentCommand(), ticket_commandscript::HandleGMTicketCompleteCommand(), ticket_commandscript::HandleGMTicketGetByIdCommand(), ticket_commandscript::HandleGMTicketGetByNameCommand(), ticket_commandscript::HandleGMTicketResponseDeleteCommand(), ticket_commandscript::HandleGMTicketUnAssignCommand(), and ticket_commandscript::TicketResponseAppend().
void GmTicket::SendResponse | ( | WorldSession * | session | ) | const |
References _id, _message, _response, ByteBuffer::append(), WorldSession::SendPacket(), and SMSG_GMRESPONSE_RECEIVED.
Referenced by ticket_commandscript::HandleGMTicketCompleteCommand().
|
inline |
References _assignedTo, _escalatedStatus, TICKET_ASSIGNED, TICKET_ESCALATED_ASSIGNED, TICKET_IN_ESCALATION_QUEUE, and TICKET_UNASSIGNED.
Referenced by ticket_commandscript::HandleGMTicketAssignToCommand().
void GmTicket::SetChatLog | ( | std::list< uint32 > | time, |
std::string const & | log | ||
) |
References _chatLog, and secsToTimeString().
Referenced by WorldSession::HandleGMTicketCreateOpcode().
|
inline |
References _closedBy, _type, and TICKET_TYPE_CLOSED.
|
inline |
References _comment.
Referenced by ticket_commandscript::HandleGMTicketCommentCommand().
|
inline |
|
inline |
References _escalatedStatus.
Referenced by ticket_commandscript::HandleGMTicketEscalateCommand().
void GmTicket::SetGmAction | ( | uint32 | needResponse, |
bool | needMoreHelp | ||
) |
References _needMoreHelp, and _needResponse.
Referenced by WorldSession::HandleGMTicketCreateOpcode().
void GmTicket::SetMessage | ( | std::string const & | message | ) |
References _lastModifiedTime, _message, and GameTime::GetGameTime().
Referenced by WorldSession::HandleGMTicketCreateOpcode().
void GmTicket::SetPosition | ( | uint32 | mapId, |
float | x, | ||
float | y, | ||
float | z | ||
) |
|
inline |
References _resolvedBy.
Referenced by ticket_commandscript::HandleGMTicketCompleteCommand().
void GmTicket::SetUnassigned | ( | ) |
References _assignedTo, _escalatedStatus, ObjectGuid::Clear(), TICKET_ASSIGNED, TICKET_ESCALATED_ASSIGNED, TICKET_IN_ESCALATION_QUEUE, and TICKET_UNASSIGNED.
Referenced by ticket_commandscript::HandleGMTicketUnAssignCommand().
|
inline |
References _viewed.
Referenced by ticket_commandscript::HandleGMTicketGetByIdCommand(), and ticket_commandscript::HandleGMTicketGetByNameCommand().
void GmTicket::TeleportTo | ( | Player * | player | ) | const |
References _mapId, _posX, _posY, _posZ, and Player::TeleportTo().
Referenced by go_commandscript::HandleGoTicketCommand().
void GmTicket::WritePacket | ( | WorldPacket & | data | ) | const |
References _escalatedStatus, _id, _lastModifiedTime, _message, _needMoreHelp, _viewed, GetAge(), GMTICKET_OPENEDBYGM_STATUS_NOT_OPENED, GMTICKET_OPENEDBYGM_STATUS_OPENED, GMTICKET_STATUS_HASTEXT, sTicketMgr, and TICKET_IN_ESCALATION_QUEUE.
Referenced by TicketMgr::SendTicket().
|
private |
|
private |
Referenced by GetChatLog(), and SetChatLog().
|
private |
Referenced by LoadFromDB(), SaveToDB(), and SetClosedBy().
|
private |
Referenced by FormatMessageString(), LoadFromDB(), SaveToDB(), and SetComment().
|
private |
Referenced by IsCompleted(), LoadFromDB(), SaveToDB(), and SetCompleted().
|
private |
Referenced by FormatMessageString(), LoadFromDB(), and SaveToDB().
|
private |
Referenced by GetEscalatedStatus(), LoadFromDB(), SaveToDB(), SetAssignedTo(), SetEscalatedStatus(), SetUnassigned(), and WritePacket().
|
private |
Referenced by DeleteFromDB(), FormatMessageString(), GetId(), GmTicket(), LoadFromDB(), SaveToDB(), SendResponse(), and WritePacket().
|
private |
Referenced by FormatMessageString(), GetLastModifiedTime(), LoadFromDB(), SaveToDB(), SetMessage(), and WritePacket().
|
private |
Referenced by LoadFromDB(), SaveToDB(), SetPosition(), and TeleportTo().
|
private |
Referenced by FormatMessageString(), GetMessage(), LoadFromDB(), SaveToDB(), SendResponse(), SetMessage(), and WritePacket().
|
private |
Referenced by LoadFromDB(), SaveToDB(), SetGmAction(), and WritePacket().
|
private |
Referenced by SetGmAction().
|
private |
Referenced by GetPlayer(), GmTicket(), IsFromPlayer(), LoadFromDB(), and SaveToDB().
|
private |
Referenced by FormatMessageString(), GetPlayerName(), GmTicket(), LoadFromDB(), and SaveToDB().
|
private |
Referenced by LoadFromDB(), SaveToDB(), SetPosition(), and TeleportTo().
|
private |
Referenced by LoadFromDB(), SaveToDB(), SetPosition(), and TeleportTo().
|
private |
Referenced by LoadFromDB(), SaveToDB(), SetPosition(), and TeleportTo().
|
private |
Referenced by LoadFromDB(), SaveToDB(), and SetResolvedBy().
|
private |
Referenced by AppendResponse(), DeleteResponse(), FormatMessageString(), GetResponse(), LoadFromDB(), SaveToDB(), and SendResponse().
|
private |
Referenced by IsClosed(), LoadFromDB(), SaveToDB(), and SetClosedBy().
|
private |
Referenced by LoadFromDB(), SaveToDB(), SetViewed(), and WritePacket().