![]() |
TrinityCore
|
#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 |
| bool | IsViewed () const |
| uint32 | GetId () const |
| Player * | GetPlayer () const |
| std::string const & | GetPlayerName () const |
| std::string const & | GetMessage () const |
| bool | GetNeedMoreHelp () 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) |
| 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, char const *szClosedName, char const *szAssignedToName, char const *szUnassignedName, char const *szDeletedName, char const *szCompletedName) const |
| void | SetChatLog (std::list< uint32 > time, std::string const &log) |
| std::string const & | GetChatLog () const |
Private Attributes | |
| uint32 | _id |
| TicketType | _type |
| ObjectGuid | _playerGuid |
| 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 |
Definition at line 90 of file TicketMgr.h.
| GmTicket::GmTicket | ( | ) |
Definition at line 38 of file TicketMgr.cpp.
| GmTicket::GmTicket | ( | Player * | player | ) |
Definition at line 42 of file TicketMgr.cpp.
References _id, _playerGuid, _playerName, Object::GetGUID(), WorldObject::GetName(), and sTicketMgr.
| GmTicket::~GmTicket | ( | ) |
Definition at line 51 of file TicketMgr.cpp.
|
inline |
Definition at line 135 of file TicketMgr.h.
Referenced by ticket_commandscript::_HandleGMTicketResponseAppendCommand(), and ticket_commandscript::HandleGMTicketCompleteCommand().
| void GmTicket::DeleteFromDB | ( | ) |
Definition at line 122 of file TicketMgr.cpp.
References _id, CHAR_DEL_GM_TICKET, CharacterDatabase, and PreparedStatementBase::setUInt32().
| std::string GmTicket::FormatMessageString | ( | ChatHandler & | handler, |
| bool | detailed = false |
||
| ) | const |
Definition at line 156 of file TicketMgr.cpp.
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, secsToTimeString(), and ShortText.
Referenced by ticket_commandscript::HandleGMTicketAssignToCommand(), ticket_commandscript::HandleGMTicketCloseByIdCommand(), ticket_commandscript::HandleGMTicketCommentCommand(), ticket_commandscript::HandleGMTicketCompleteCommand(), ticket_commandscript::HandleGMTicketDeleteByIdCommand(), ticket_commandscript::HandleGMTicketGetByIdCommand(), ticket_commandscript::HandleGMTicketGetByNameCommand(), and ticket_commandscript::HandleGMTicketUnAssignCommand().
| std::string GmTicket::FormatMessageString | ( | ChatHandler & | handler, |
| char const * | szClosedName, | ||
| char const * | szAssignedToName, | ||
| char const * | szUnassignedName, | ||
| char const * | szDeletedName, | ||
| char const * | szCompletedName | ||
| ) | const |
Definition at line 181 of file TicketMgr.cpp.
References _id, _playerName, LANG_COMMAND_TICKETCLOSED, LANG_COMMAND_TICKETCOMPLETED, LANG_COMMAND_TICKETDELETED, LANG_COMMAND_TICKETLISTASSIGNEDTO, LANG_COMMAND_TICKETLISTGUID, LANG_COMMAND_TICKETLISTNAME, LANG_COMMAND_TICKETLISTUNASSIGNED, and ChatHandler::PGetParseString().
| Player * GmTicket::GetAssignedPlayer | ( | ) | const |
Definition at line 60 of file TicketMgr.cpp.
References _assignedTo, and ObjectAccessor::FindPlayer().
Referenced by ticket_commandscript::HandleGMTicketUnAssignCommand().
|
inline |
Definition at line 111 of file TicketMgr.h.
Referenced by ticket_commandscript::HandleGMTicketUnAssignCommand().
| std::string GmTicket::GetAssignedToName | ( | ) | const |
Definition at line 454 of file TicketMgr.cpp.
References _assignedTo, ObjectGuid::IsEmpty(), and sCharacterCache.
Referenced by ticket_commandscript::HandleGMTicketCommentCommand(), and ticket_commandscript::HandleGMTicketUnAssignCommand().
|
inline |
Definition at line 149 of file TicketMgr.h.
|
inline |
Definition at line 114 of file TicketMgr.h.
Referenced by ticket_commandscript::HandleGMTicketEscalateCommand(), and TicketMgr::SendTicket().
|
inline |
Definition at line 105 of file TicketMgr.h.
Referenced by ticket_commandscript::_HandleGMTicketResponseAppendCommand(), TicketMgr::AddTicket(), Player::DeleteFromDB(), ticket_commandscript::HandleGMTicketAssignToCommand(), ticket_commandscript::HandleGMTicketCloseByIdCommand(), ticket_commandscript::HandleGMTicketCommentCommand(), ticket_commandscript::HandleGMTicketCompleteCommand(), WorldSession::HandleGMTicketCreateOpcode(), ticket_commandscript::HandleGMTicketDeleteByIdCommand(), ticket_commandscript::HandleGMTicketUnAssignCommand(), TicketMgr::LoadTickets(), and TicketMgr::SendTicket().
|
inline |
Definition at line 113 of file TicketMgr.h.
Referenced by TicketMgr::SendTicket().
|
inline |
Definition at line 108 of file TicketMgr.h.
Referenced by TicketMgr::SendTicket().
|
inline |
Definition at line 109 of file TicketMgr.h.
Referenced by TicketMgr::SendTicket().
| Player * GmTicket::GetPlayer | ( | ) | const |
Definition at line 55 of file TicketMgr.cpp.
References _playerGuid, and ObjectAccessor::FindPlayer().
Referenced by ticket_commandscript::HandleGMTicketCloseByIdCommand(), ticket_commandscript::HandleGMTicketCompleteCommand(), ticket_commandscript::HandleGMTicketDeleteByIdCommand(), and ticket_commandscript::HandleGMTicketEscalateCommand().
|
inline |
Definition at line 107 of file TicketMgr.h.
|
inline |
Definition at line 100 of file TicketMgr.h.
Referenced by ticket_commandscript::HandleGMTicketUnAssignCommand().
|
inline |
Definition at line 102 of file TicketMgr.h.
Referenced by ticket_commandscript::_HandleGMTicketResponseAppendCommand(), ticket_commandscript::HandleGMTicketAssignToCommand(), ticket_commandscript::HandleGMTicketCloseByIdCommand(), ticket_commandscript::HandleGMTicketCommentCommand(), and ticket_commandscript::HandleGMTicketCompleteCommand().
|
inline |
Definition at line 101 of file TicketMgr.h.
Referenced by ticket_commandscript::HandleGMTicketAssignToCommand().
|
inline |
Definition at line 97 of file TicketMgr.h.
References TICKET_TYPE_OPEN.
Referenced by ticket_commandscript::_HandleGMTicketResponseAppendCommand(), TicketMgr::AddTicket(), ticket_commandscript::HandleGMTicketAssignToCommand(), ticket_commandscript::HandleGMTicketCloseByIdCommand(), ticket_commandscript::HandleGMTicketCommentCommand(), ticket_commandscript::HandleGMTicketCompleteCommand(), WorldSession::HandleGMTicketCreateOpcode(), ticket_commandscript::HandleGMTicketDeleteByIdCommand(), ticket_commandscript::HandleGMTicketEscalateCommand(), ticket_commandscript::HandleGMTicketGetByIdCommand(), ticket_commandscript::HandleGMTicketUnAssignCommand(), and TicketMgr::LoadTickets().
|
inline |
Definition at line 98 of file TicketMgr.h.
Referenced by ticket_commandscript::HandleGMTicketCloseByIdCommand(), ticket_commandscript::HandleGMTicketCompleteCommand(), WorldSession::HandleGMTicketCreateOpcode(), ticket_commandscript::HandleGMTicketEscalateCommand(), and ticket_commandscript::HandleGMTicketGetByIdCommand().
|
inline |
Definition at line 99 of file TicketMgr.h.
|
inline |
Definition at line 103 of file TicketMgr.h.
Referenced by TicketMgr::SendTicket().
| bool GmTicket::LoadFromDB | ( | Field * | fields | ) |
Definition at line 65 of file TicketMgr.cpp.
References _assignedTo, _closedBy, _comment, _completed, _createTime, _escalatedStatus, _id, _lastModifiedTime, _mapId, _message, _needMoreHelp, _playerGuid, _playerName, _posX, _posY, _posZ, _response, _type, _viewed, ObjectGuid::Empty, Field::GetBool(), Field::GetFloat(), Field::GetString(), Field::GetUInt16(), and Field::GetUInt32().
Referenced by TicketMgr::LoadTickets().
| void GmTicket::SaveToDB | ( | CharacterDatabaseTransaction | trans | ) | const |
Definition at line 92 of file TicketMgr.cpp.
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(), PreparedStatementBase::setBool(), PreparedStatementBase::setFloat(), PreparedStatementBase::setInt32(), PreparedStatementBase::setString(), PreparedStatementBase::setUInt16(), PreparedStatementBase::setUInt32(), and PreparedStatementBase::setUInt8().
Referenced by ticket_commandscript::_HandleGMTicketResponseAppendCommand(), TicketMgr::AddTicket(), ticket_commandscript::HandleGMTicketAssignToCommand(), ticket_commandscript::HandleGMTicketCommentCommand(), ticket_commandscript::HandleGMTicketCompleteCommand(), ticket_commandscript::HandleGMTicketGetByIdCommand(), ticket_commandscript::HandleGMTicketGetByNameCommand(), and ticket_commandscript::HandleGMTicketUnAssignCommand().
| void GmTicket::SendResponse | ( | WorldSession * | session | ) | const |
Definition at line 129 of file TicketMgr.cpp.
References _id, _message, _response, ByteBuffer::append(), WorldSession::SendPacket(), ByteBuffer::size(), and SMSG_GMRESPONSE_RECEIVED.
Referenced by ticket_commandscript::HandleGMTicketCompleteCommand().
|
inline |
Definition at line 117 of file TicketMgr.h.
References 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 | ||
| ) |
Definition at line 238 of file TicketMgr.cpp.
References _chatLog, and secsToTimeString().
Referenced by WorldSession::HandleGMTicketCreateOpcode().
|
inline |
Definition at line 125 of file TicketMgr.h.
References TICKET_TYPE_CLOSED.
|
inline |
Definition at line 129 of file TicketMgr.h.
Referenced by ticket_commandscript::HandleGMTicketCommentCommand().
|
inline |
Definition at line 127 of file TicketMgr.h.
Referenced by ticket_commandscript::HandleGMTicketCompleteCommand().
|
inline |
Definition at line 116 of file TicketMgr.h.
Referenced by ticket_commandscript::HandleGMTicketEscalateCommand().
| void GmTicket::SetGmAction | ( | uint32 | needResponse, |
| bool | needMoreHelp | ||
| ) |
Definition at line 227 of file TicketMgr.cpp.
References _needMoreHelp, and _needResponse.
Referenced by WorldSession::HandleGMTicketCreateOpcode().
| void GmTicket::SetMessage | ( | std::string const & | message | ) |
Definition at line 199 of file TicketMgr.cpp.
References _lastModifiedTime, _message, and GameTime::GetGameTime().
Referenced by WorldSession::HandleGMTicketCreateOpcode().
| void GmTicket::SetPosition | ( | uint32 | mapId, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Definition at line 219 of file TicketMgr.cpp.
References _mapId, _posX, _posY, and _posZ.
Referenced by WorldSession::HandleGMTicketCreateOpcode().
|
inline |
Definition at line 126 of file TicketMgr.h.
Referenced by ticket_commandscript::HandleGMTicketCompleteCommand().
| void GmTicket::SetUnassigned | ( | ) |
Definition at line 205 of file TicketMgr.cpp.
References _assignedTo, _escalatedStatus, ObjectGuid::Clear(), TICKET_ASSIGNED, TICKET_ESCALATED_ASSIGNED, TICKET_IN_ESCALATION_QUEUE, and TICKET_UNASSIGNED.
Referenced by ticket_commandscript::HandleGMTicketUnAssignCommand().
|
inline |
Definition at line 130 of file TicketMgr.h.
Referenced by ticket_commandscript::HandleGMTicketGetByIdCommand(), and ticket_commandscript::HandleGMTicketGetByNameCommand().
| void GmTicket::TeleportTo | ( | Player * | player | ) | const |
Definition at line 233 of file TicketMgr.cpp.
References _mapId, _posX, _posY, _posZ, and Player::TeleportTo().
Referenced by go_commandscript::HandleGoTicketCommand().
| void GmTicket::WritePacket | ( | WorldPacket & | data | ) | const |
|
private |
Definition at line 165 of file TicketMgr.h.
Referenced by FormatMessageString(), GetAssignedPlayer(), GetAssignedToName(), LoadFromDB(), SaveToDB(), and SetUnassigned().
|
private |
Definition at line 173 of file TicketMgr.h.
Referenced by SetChatLog().
|
private |
Definition at line 163 of file TicketMgr.h.
Referenced by LoadFromDB(), and SaveToDB().
|
private |
Definition at line 166 of file TicketMgr.h.
Referenced by FormatMessageString(), LoadFromDB(), and SaveToDB().
|
private |
Definition at line 167 of file TicketMgr.h.
Referenced by LoadFromDB(), and SaveToDB().
|
private |
Definition at line 161 of file TicketMgr.h.
Referenced by FormatMessageString(), LoadFromDB(), and SaveToDB().
|
private |
Definition at line 168 of file TicketMgr.h.
Referenced by LoadFromDB(), SaveToDB(), and SetUnassigned().
|
private |
Definition at line 152 of file TicketMgr.h.
Referenced by DeleteFromDB(), FormatMessageString(), FormatMessageString(), GmTicket(), LoadFromDB(), SaveToDB(), and SendResponse().
|
private |
Definition at line 162 of file TicketMgr.h.
Referenced by FormatMessageString(), LoadFromDB(), SaveToDB(), and SetMessage().
|
private |
Definition at line 159 of file TicketMgr.h.
Referenced by LoadFromDB(), SaveToDB(), SetPosition(), and TeleportTo().
|
private |
Definition at line 160 of file TicketMgr.h.
Referenced by FormatMessageString(), LoadFromDB(), SaveToDB(), SendResponse(), and SetMessage().
|
private |
Definition at line 171 of file TicketMgr.h.
Referenced by LoadFromDB(), SaveToDB(), and SetGmAction().
|
private |
Definition at line 170 of file TicketMgr.h.
Referenced by SetGmAction().
|
private |
Definition at line 154 of file TicketMgr.h.
Referenced by GetPlayer(), GmTicket(), LoadFromDB(), and SaveToDB().
|
private |
Definition at line 155 of file TicketMgr.h.
Referenced by FormatMessageString(), FormatMessageString(), GmTicket(), LoadFromDB(), and SaveToDB().
|
private |
Definition at line 156 of file TicketMgr.h.
Referenced by LoadFromDB(), SaveToDB(), SetPosition(), and TeleportTo().
|
private |
Definition at line 157 of file TicketMgr.h.
Referenced by LoadFromDB(), SaveToDB(), SetPosition(), and TeleportTo().
|
private |
Definition at line 158 of file TicketMgr.h.
Referenced by LoadFromDB(), SaveToDB(), SetPosition(), and TeleportTo().
|
private |
Definition at line 164 of file TicketMgr.h.
Referenced by SaveToDB().
|
private |
Definition at line 172 of file TicketMgr.h.
Referenced by FormatMessageString(), LoadFromDB(), SaveToDB(), and SendResponse().
|
private |
Definition at line 153 of file TicketMgr.h.
Referenced by LoadFromDB(), and SaveToDB().
|
private |
Definition at line 169 of file TicketMgr.h.
Referenced by LoadFromDB(), and SaveToDB().