18 #ifndef SupportMgr_h__
19 #define SupportMgr_h__
60 bool IsClosed()
const {
return !_closedBy.IsEmpty(); }
62 bool IsAssigned()
const {
return !_assignedTo.IsEmpty(); }
72 if (!_playerGuid.IsEmpty())
82 if (!_assignedTo.IsEmpty())
87 std::string
const&
GetComment()
const {
return _comment; }
92 void SetComment(std::string
const& comment) { _comment = comment; }
100 virtual void SaveToDB()
const = 0;
101 virtual void DeleteFromDB() = 0;
103 void TeleportTo(
Player* player)
const;
105 virtual std::string FormatViewMessageString(
ChatHandler& handler,
bool detailed =
false)
const = 0;
106 virtual std::string FormatViewMessageString(
ChatHandler& handler,
const char* szClosedName,
const char* szAssignedToName,
const char* szUnassignedName,
const char* szDeletedName)
const;
126 std::string
const&
GetNote()
const {
return _note; }
129 void SetNote(std::string
const& note) { _note = note; }
152 std::string
const&
GetNote()
const {
return _note; }
157 _targetCharacterGuid = targetCharacterGuid;
161 void SetNote(std::string
const& note) { _note = note; }
164 void LoadChatLineFromDB(
Field* fields);
186 std::string
const&
GetNote()
const {
return _note; }
187 void SetNote(std::string
const& note) { _note = note; }
217 T* GetTicket(
uint32 ticketId);
222 for (
auto const& c : _complaintTicketList)
223 if (c.second->GetPlayerGuid() == playerGuid)
238 uint32 GetOpenTicketCount()
const;
246 void LoadBugTickets();
247 void LoadComplaintTickets();
248 void LoadSuggestionTickets();
255 void RemoveTicket(
uint32 ticketId);
267 void ShowList(
ChatHandler& handler,
bool onlineOnly)
const;
296 #define sSupportMgr SupportMgr::instance()
298 #endif // SupportMgr_h__
Definition: SupportMgr.h:39
bool IsClosed() const
Definition: SupportMgr.h:60
bool GetSupportSystemStatus() const
Definition: SupportMgr.h:231
SuggestionTicketList _suggestionTicketList
Definition: SupportMgr.h:286
std::string const & GetComment() const
Definition: SupportMgr.h:87
Definition: SupportMgr.h:179
uint32 _id
Definition: SupportMgr.h:109
void SetNote(std::string const ¬e)
Definition: SupportMgr.h:161
Definition: SupportMgr.h:47
Definition: SupportMgr.h:143
float _facing
Definition: SupportMgr.h:199
void SetTargetCharacterGuid(ObjectGuid targetCharacterGuid)
Definition: SupportMgr.h:155
Definition: SupportMgr.h:53
uint64 _lastChange
Definition: SupportMgr.h:290
ObjectGuid GetAssignedToGUID() const
Definition: SupportMgr.h:78
void SetChatLog(ChatLog const &log)
Definition: SupportMgr.h:160
GMTicketSystemStatus
Definition: SupportMgr.h:28
void UpdateLastChange()
Definition: SupportMgr.h:272
ObjectGuid _closedBy
Definition: SupportMgr.h:114
Definition: SupportMgr.h:207
bool _supportSystemStatus
Definition: SupportMgr.h:279
bool GetComplaintSystemStatus() const
Definition: SupportMgr.h:234
ObjectGuid GetTargetCharacterGuid() const
Definition: SupportMgr.h:150
Class used to access individual fields of database query result.
Definition: Field.h:56
void LoadFromDB()
Definition: AddonMgr.cpp:40
SupportSpamType
Definition: SupportMgr.h:44
virtual void SetAssignedTo(ObjectGuid guid, bool=false)
Definition: SupportMgr.h:89
TC_SHARED_API::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FieldOptions,::google::protobuf::internal::EnumTypeTraits< ::bgs::protocol::LogOption,::bgs::protocol::LogOption_IsValid >, 14, false > log
bool IsFromPlayer(ObjectGuid guid) const
Definition: SupportMgr.h:61
virtual void LoadFromDB(Field *fields)=0
void SetSupportSystemStatus(bool status)
Definition: SupportMgr.h:240
bool _bugSystemStatus
Definition: SupportMgr.h:281
ComplaintTicketList GetComplaintsByPlayerGuid(ObjectGuid playerGuid) const
Definition: SupportMgr.h:219
bool GetBugSystemStatus() const
Definition: SupportMgr.h:233
bool GetTicketSystemStatus() const
Definition: SupportMgr.h:232
Definition: SupportMgr.h:46
Definition: SupportMgr.h:36
bool _ticketSystemStatus
Definition: SupportMgr.h:280
uint64_t uint64
Definition: g3dmath.h:170
bool GetSuggestionSystemStatus() const
Definition: SupportMgr.h:235
uint32 GenerateComplaintId()
Definition: SupportMgr.h:275
Definition: SupportMgr.h:37
ObjectGuid _assignedTo
Definition: SupportMgr.h:115
uint32 _lastBugId
Definition: SupportMgr.h:287
std::string _note
Definition: SupportMgr.h:176
std::string _note
Definition: SupportMgr.h:200
uint32 GetId() const
Definition: SupportMgr.h:66
uint32 GenerateSuggestionId()
Definition: SupportMgr.h:276
void SetPosition(uint32 mapId, G3D::Vector3 &pos)
Definition: SupportMgr.h:93
std::string const & GetNote() const
Definition: SupportMgr.h:126
std::string const & GetNote() const
Definition: SupportMgr.h:186
uint32 _openSuggestionTicketCount
Definition: SupportMgr.h:293
float _facing
Definition: SupportMgr.h:139
Definition: SupportMgr.h:31
std::map< uint32, BugTicket * > BugTicketList
Definition: SupportMgr.h:203
std::map< uint32, ComplaintTicket * > ComplaintTicketList
Definition: SupportMgr.h:204
Player * GetPlayer() const
Definition: SupportMgr.h:68
void SetSuggestionSystemStatus(bool status)
Definition: SupportMgr.h:244
ComplaintTicketList _complaintTicketList
Definition: SupportMgr.h:285
Definition: TicketPackets.h:128
std::string GetPlayerName() const
Definition: SupportMgr.h:69
GMSupportComplaintType _complaintType
Definition: SupportMgr.h:174
Definition: SupportMgr.h:119
uint32 GenerateBugId()
Definition: SupportMgr.h:274
uint64 _createTime
Definition: SupportMgr.h:113
void SetTicketSystemStatus(bool status)
Definition: SupportMgr.h:241
uint32_t uint32
Definition: Define.h:150
void SetNote(std::string const ¬e)
Definition: SupportMgr.h:129
static void Initialize(PCASC_SALSA20 pState, LPBYTE pbKey, DWORD cbKeyLength, LPBYTE pbVector)
Definition: CascDecrypt.cpp:81
uint64_t uint64
Definition: Define.h:149
uint16_t uint16
Definition: Define.h:151
uint16 _mapId
Definition: SupportMgr.h:111
ObjectGuid _playerGuid
Definition: SupportMgr.h:110
std::string _comment
Definition: SupportMgr.h:116
Definition: SupportMgr.h:38
Definition: SupportMgr.h:30
uint32 _lastSuggestionId
Definition: SupportMgr.h:289
virtual void SetUnassigned()
Definition: SupportMgr.h:90
void SetFacing(float facing)
Definition: SupportMgr.h:128
GMSupportComplaintType GetComplaintType() const
Definition: SupportMgr.h:151
virtual void SaveToDB() const =0
uint32 _lastComplaintId
Definition: SupportMgr.h:288
float _facing
Definition: SupportMgr.h:172
uint32 _openBugTicketCount
Definition: SupportMgr.h:291
static bool GetPlayerNameByGUID(ObjectGuid const &guid, std::string &name)
Definition: ObjectMgr.cpp:2258
void SetBugSystemStatus(bool status)
Definition: SupportMgr.h:242
Definition: SupportMgr.h:41
bool _complaintSystemStatus
Definition: SupportMgr.h:282
Player * GetAssignedPlayer() const
Definition: SupportMgr.h:77
Definition: SupportMgr.h:48
#define TC_GAME_API
Definition: Define.h:134
virtual void DeleteFromDB()=0
BugTicketList _bugTicketList
Definition: SupportMgr.h:284
virtual std::string FormatViewMessageString(ChatHandler &handler, bool detailed=false) const =0
std::map< uint32, SuggestionTicket * > SuggestionTicketList
Definition: SupportMgr.h:205
void SetComplaintType(GMSupportComplaintType type)
Definition: SupportMgr.h:159
uint64 GetLastChange() const
Definition: SupportMgr.h:236
const FieldDescriptor value
Definition: descriptor.h:1522
Definition: ObjectGuid.h:189
std::string _note
Definition: SupportMgr.h:140
void SetComment(std::string const &comment)
Definition: SupportMgr.h:92
ChatLog _chatLog
Definition: SupportMgr.h:175
std::string const & GetNote() const
Definition: SupportMgr.h:152
bool IsAssignedNotTo(ObjectGuid guid) const
Definition: SupportMgr.h:64
void SetFacing(float facing)
Definition: SupportMgr.h:189
void SetClosedBy(ObjectGuid value)
Definition: SupportMgr.h:91
GMSupportComplaintType
Definition: SupportMgr.h:34
void SetFacing(float facing)
Definition: SupportMgr.h:154
G3D::Vector3 _pos
Definition: SupportMgr.h:112
TC_GAME_API Player * FindConnectedPlayer(ObjectGuid const &)
Definition: ObjectAccessor.cpp:215
Definition: SupportMgr.h:40
void SetComplaintSystemStatus(bool status)
Definition: SupportMgr.h:243
ObjectGuid GetPlayerGuid() const
Definition: SupportMgr.h:67
ObjectGuid _targetCharacterGuid
Definition: SupportMgr.h:173
bool IsAssignedTo(ObjectGuid guid) const
Definition: SupportMgr.h:63
bool _suggestionSystemStatus
Definition: SupportMgr.h:283
bool IsAssigned() const
Definition: SupportMgr.h:62
std::string GetAssignedToName() const
Definition: SupportMgr.h:79
uint32 _openComplaintTicketCount
Definition: SupportMgr.h:292
void SetNote(std::string const ¬e)
Definition: SupportMgr.h:187