TrinityCore
Loading...
Searching...
No Matches
GmTicket Class Reference

#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
 

Detailed Description

Definition at line 90 of file TicketMgr.h.

Constructor & Destructor Documentation

◆ GmTicket() [1/2]

GmTicket::GmTicket ( )

Definition at line 38 of file TicketMgr.cpp.

◆ GmTicket() [2/2]

GmTicket::GmTicket ( Player *  player)

◆ ~GmTicket()

GmTicket::~GmTicket ( )

Definition at line 51 of file TicketMgr.cpp.

Member Function Documentation

◆ AppendResponse()

void GmTicket::AppendResponse ( std::string const &  response)
inline

◆ DeleteFromDB()

void GmTicket::DeleteFromDB ( )

◆ FormatMessageString() [1/2]

◆ FormatMessageString() [2/2]

std::string GmTicket::FormatMessageString ( ChatHandler &  handler,
char const *  szClosedName,
char const *  szAssignedToName,
char const *  szUnassignedName,
char const *  szDeletedName,
char const *  szCompletedName 
) const

◆ GetAssignedPlayer()

Player * GmTicket::GetAssignedPlayer ( ) const

◆ GetAssignedToGUID()

ObjectGuid GmTicket::GetAssignedToGUID ( ) const
inline

Definition at line 111 of file TicketMgr.h.

Referenced by ticket_commandscript::HandleGMTicketUnAssignCommand().

◆ GetAssignedToName()

std::string GmTicket::GetAssignedToName ( ) const

◆ GetChatLog()

std::string const & GmTicket::GetChatLog ( ) const
inline

Definition at line 149 of file TicketMgr.h.

◆ GetEscalatedStatus()

GMTicketEscalationStatus GmTicket::GetEscalatedStatus ( ) const
inline

◆ GetId()

◆ GetLastModifiedTime()

uint64 GmTicket::GetLastModifiedTime ( ) const
inline

Definition at line 113 of file TicketMgr.h.

Referenced by TicketMgr::SendTicket().

◆ GetMessage()

std::string const & GmTicket::GetMessage ( ) const
inline

Definition at line 108 of file TicketMgr.h.

Referenced by TicketMgr::SendTicket().

◆ GetNeedMoreHelp()

bool GmTicket::GetNeedMoreHelp ( ) const
inline

Definition at line 109 of file TicketMgr.h.

Referenced by TicketMgr::SendTicket().

◆ GetPlayer()

◆ GetPlayerName()

std::string const & GmTicket::GetPlayerName ( ) const
inline

Definition at line 107 of file TicketMgr.h.

◆ IsAssigned()

bool GmTicket::IsAssigned ( ) const
inline

Definition at line 100 of file TicketMgr.h.

Referenced by ticket_commandscript::HandleGMTicketUnAssignCommand().

◆ IsAssignedNotTo()

◆ IsAssignedTo()

bool GmTicket::IsAssignedTo ( ObjectGuid  guid) const
inline

Definition at line 101 of file TicketMgr.h.

Referenced by ticket_commandscript::HandleGMTicketAssignToCommand().

◆ IsClosed()

◆ IsCompleted()

◆ IsFromPlayer()

bool GmTicket::IsFromPlayer ( ObjectGuid  guid) const
inline

Definition at line 99 of file TicketMgr.h.

◆ IsViewed()

bool GmTicket::IsViewed ( ) const
inline

Definition at line 103 of file TicketMgr.h.

Referenced by TicketMgr::SendTicket().

◆ LoadFromDB()

◆ SaveToDB()

◆ SendResponse()

void GmTicket::SendResponse ( WorldSession *  session) const

◆ SetAssignedTo()

void GmTicket::SetAssignedTo ( ObjectGuid  guid,
bool  isAdmin 
)
inline

◆ SetChatLog()

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().

◆ SetClosedBy()

void GmTicket::SetClosedBy ( ObjectGuid  value)
inline

Definition at line 125 of file TicketMgr.h.

References TICKET_TYPE_CLOSED.

◆ SetComment()

void GmTicket::SetComment ( std::string const &  comment)
inline

Definition at line 129 of file TicketMgr.h.

Referenced by ticket_commandscript::HandleGMTicketCommentCommand().

◆ SetCompleted()

void GmTicket::SetCompleted ( )
inline

Definition at line 127 of file TicketMgr.h.

Referenced by ticket_commandscript::HandleGMTicketCompleteCommand().

◆ SetEscalatedStatus()

void GmTicket::SetEscalatedStatus ( GMTicketEscalationStatus  escalatedStatus)
inline

Definition at line 116 of file TicketMgr.h.

Referenced by ticket_commandscript::HandleGMTicketEscalateCommand().

◆ SetGmAction()

void GmTicket::SetGmAction ( uint32  needResponse,
bool  needMoreHelp 
)

Definition at line 227 of file TicketMgr.cpp.

References _needMoreHelp, and _needResponse.

Referenced by WorldSession::HandleGMTicketCreateOpcode().

◆ SetMessage()

void GmTicket::SetMessage ( std::string const &  message)

◆ SetPosition()

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().

◆ SetResolvedBy()

void GmTicket::SetResolvedBy ( ObjectGuid  value)
inline

Definition at line 126 of file TicketMgr.h.

Referenced by ticket_commandscript::HandleGMTicketCompleteCommand().

◆ SetUnassigned()

◆ SetViewed()

void GmTicket::SetViewed ( )
inline

◆ TeleportTo()

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().

◆ WritePacket()

void GmTicket::WritePacket ( WorldPacket &  data) const

Member Data Documentation

◆ _assignedTo

ObjectGuid GmTicket::_assignedTo
private

◆ _chatLog

std::string GmTicket::_chatLog
private

Definition at line 173 of file TicketMgr.h.

Referenced by SetChatLog().

◆ _closedBy

ObjectGuid GmTicket::_closedBy
private

Definition at line 163 of file TicketMgr.h.

Referenced by LoadFromDB(), and SaveToDB().

◆ _comment

std::string GmTicket::_comment
private

Definition at line 166 of file TicketMgr.h.

Referenced by FormatMessageString(), LoadFromDB(), and SaveToDB().

◆ _completed

bool GmTicket::_completed
private

Definition at line 167 of file TicketMgr.h.

Referenced by LoadFromDB(), and SaveToDB().

◆ _createTime

uint64 GmTicket::_createTime
private

Definition at line 161 of file TicketMgr.h.

Referenced by FormatMessageString(), LoadFromDB(), and SaveToDB().

◆ _escalatedStatus

GMTicketEscalationStatus GmTicket::_escalatedStatus
private

Definition at line 168 of file TicketMgr.h.

Referenced by LoadFromDB(), SaveToDB(), and SetUnassigned().

◆ _id

uint32 GmTicket::_id
private

◆ _lastModifiedTime

uint64 GmTicket::_lastModifiedTime
private

Definition at line 162 of file TicketMgr.h.

Referenced by FormatMessageString(), LoadFromDB(), SaveToDB(), and SetMessage().

◆ _mapId

uint16 GmTicket::_mapId
private

Definition at line 159 of file TicketMgr.h.

Referenced by LoadFromDB(), SaveToDB(), SetPosition(), and TeleportTo().

◆ _message

std::string GmTicket::_message
private

Definition at line 160 of file TicketMgr.h.

Referenced by FormatMessageString(), LoadFromDB(), SaveToDB(), SendResponse(), and SetMessage().

◆ _needMoreHelp

bool GmTicket::_needMoreHelp
private
Todo:
find out the use of this, and then store it in DB

Definition at line 171 of file TicketMgr.h.

Referenced by LoadFromDB(), SaveToDB(), and SetGmAction().

◆ _needResponse

bool GmTicket::_needResponse
private

Definition at line 170 of file TicketMgr.h.

Referenced by SetGmAction().

◆ _playerGuid

ObjectGuid GmTicket::_playerGuid
private

Definition at line 154 of file TicketMgr.h.

Referenced by GetPlayer(), GmTicket(), LoadFromDB(), and SaveToDB().

◆ _playerName

std::string GmTicket::_playerName
private

Definition at line 155 of file TicketMgr.h.

Referenced by FormatMessageString(), FormatMessageString(), GmTicket(), LoadFromDB(), and SaveToDB().

◆ _posX

float GmTicket::_posX
private

Definition at line 156 of file TicketMgr.h.

Referenced by LoadFromDB(), SaveToDB(), SetPosition(), and TeleportTo().

◆ _posY

float GmTicket::_posY
private

Definition at line 157 of file TicketMgr.h.

Referenced by LoadFromDB(), SaveToDB(), SetPosition(), and TeleportTo().

◆ _posZ

float GmTicket::_posZ
private

Definition at line 158 of file TicketMgr.h.

Referenced by LoadFromDB(), SaveToDB(), SetPosition(), and TeleportTo().

◆ _resolvedBy

ObjectGuid GmTicket::_resolvedBy
private

Definition at line 164 of file TicketMgr.h.

Referenced by SaveToDB().

◆ _response

std::string GmTicket::_response
private

Definition at line 172 of file TicketMgr.h.

Referenced by FormatMessageString(), LoadFromDB(), SaveToDB(), and SendResponse().

◆ _type

TicketType GmTicket::_type
private

Definition at line 153 of file TicketMgr.h.

Referenced by LoadFromDB(), and SaveToDB().

◆ _viewed

bool GmTicket::_viewed
private

Definition at line 169 of file TicketMgr.h.

Referenced by LoadFromDB(), and SaveToDB().


The documentation for this class was generated from the following files: