TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SupportMgr Class Reference

#include <SupportMgr.h>

Public Member Functions

template<typename T >
T * GetTicket (uint32 ticketId)
 
ComplaintTicketList GetComplaintsByPlayerGuid (ObjectGuid playerGuid) const
 
void Initialize ()
 
bool GetSupportSystemStatus () const
 
bool GetTicketSystemStatus () const
 
bool GetBugSystemStatus () const
 
bool GetComplaintSystemStatus () const
 
bool GetSuggestionSystemStatus () const
 
uint64 GetLastChange () const
 
template<typename T >
uint32 GetOpenTicketCount () const
 
void SetSupportSystemStatus (bool status)
 
void SetTicketSystemStatus (bool status)
 
void SetBugSystemStatus (bool status)
 
void SetComplaintSystemStatus (bool status)
 
void SetSuggestionSystemStatus (bool status)
 
void LoadBugTickets ()
 
void LoadComplaintTickets ()
 
void LoadSuggestionTickets ()
 
void AddTicket (BugTicket *ticket)
 
void AddTicket (ComplaintTicket *ticket)
 
void AddTicket (SuggestionTicket *ticket)
 
template<typename T >
void RemoveTicket (uint32 ticketId)
 
template<typename T >
void CloseTicket (uint32 ticketId, ObjectGuid closedBy)
 
template<typename T >
void ResetTickets ()
 
template<typename T >
void ShowList (ChatHandler &handler) const
 
template<typename T >
void ShowList (ChatHandler &handler, bool onlineOnly) const
 
template<typename T >
void ShowClosedList (ChatHandler &handler) const
 
void UpdateLastChange ()
 
uint32 GenerateBugId ()
 
uint32 GenerateComplaintId ()
 
uint32 GenerateSuggestionId ()
 
template<>
BugTicketGetTicket (uint32 bugId)
 
template<>
ComplaintTicketGetTicket (uint32 complaintId)
 
template<>
SuggestionTicketGetTicket (uint32 suggestionId)
 
template<>
uint32 GetOpenTicketCount () const
 
template<>
uint32 GetOpenTicketCount () const
 
template<>
uint32 GetOpenTicketCount () const
 
template<>
void RemoveTicket (uint32 ticketId)
 
template<>
void RemoveTicket (uint32 ticketId)
 
template<>
void RemoveTicket (uint32 ticketId)
 
template<>
void CloseTicket (uint32 ticketId, ObjectGuid closedBy)
 
template<>
void CloseTicket (uint32 ticketId, ObjectGuid closedBy)
 
template<>
void CloseTicket (uint32 ticketId, ObjectGuid closedBy)
 
template<>
void ResetTickets ()
 
template<>
void ResetTickets ()
 
template<>
void ResetTickets ()
 
template<>
void ShowList (ChatHandler &handler) const
 
template<>
void ShowList (ChatHandler &handler) const
 
template<>
void ShowList (ChatHandler &handler) const
 
template<>
void ShowClosedList (ChatHandler &handler) const
 
template<>
void ShowClosedList (ChatHandler &handler) const
 
template<>
void ShowClosedList (ChatHandler &handler) const
 

Static Public Member Functions

static SupportMgrinstance ()
 

Private Member Functions

 SupportMgr ()
 
 ~SupportMgr ()
 

Private Attributes

bool _supportSystemStatus
 
bool _ticketSystemStatus
 
bool _bugSystemStatus
 
bool _complaintSystemStatus
 
bool _suggestionSystemStatus
 
BugTicketList _bugTicketList
 
ComplaintTicketList _complaintTicketList
 
SuggestionTicketList _suggestionTicketList
 
uint32 _lastBugId
 
uint32 _lastComplaintId
 
uint32 _lastSuggestionId
 
uint64 _lastChange
 
uint32 _openBugTicketCount
 
uint32 _openComplaintTicketCount
 
uint32 _openSuggestionTicketCount
 

Constructor & Destructor Documentation

SupportMgr::SupportMgr ( )
private
uint64 _lastChange
Definition: SupportMgr.h:290
bool _supportSystemStatus
Definition: SupportMgr.h:279
bool _bugSystemStatus
Definition: SupportMgr.h:281
bool _ticketSystemStatus
Definition: SupportMgr.h:280
uint32 _lastBugId
Definition: SupportMgr.h:287
uint32 _openSuggestionTicketCount
Definition: SupportMgr.h:293
uint32 _lastSuggestionId
Definition: SupportMgr.h:289
uint32 _lastComplaintId
Definition: SupportMgr.h:288
uint32 _openBugTicketCount
Definition: SupportMgr.h:291
bool _complaintSystemStatus
Definition: SupportMgr.h:282
bool _suggestionSystemStatus
Definition: SupportMgr.h:283
uint32 _openComplaintTicketCount
Definition: SupportMgr.h:292
SupportMgr::~SupportMgr ( )
private
354 {
355  for (auto const& b : _bugTicketList)
356  delete b.second;
357 
358  for (auto const& c : _complaintTicketList)
359  delete c.second;
360 
361  for (auto const& s : _suggestionTicketList)
362  delete s.second;
363 }
SuggestionTicketList _suggestionTicketList
Definition: SupportMgr.h:286
ComplaintTicketList _complaintTicketList
Definition: SupportMgr.h:285
BugTicketList _bugTicketList
Definition: SupportMgr.h:284

Member Function Documentation

void SupportMgr::AddTicket ( BugTicket ticket)
565 {
566  _bugTicketList[ticket->GetId()] = ticket;
567  if (!ticket->IsClosed())
569 
570  ticket->SaveToDB();
571 }
bool IsClosed() const
Definition: SupportMgr.h:60
void SaveToDB() const override
Definition: SupportMgr.cpp:93
uint32 GetId() const
Definition: SupportMgr.h:66
uint32 _openBugTicketCount
Definition: SupportMgr.h:291
BugTicketList _bugTicketList
Definition: SupportMgr.h:284

+ Here is the call graph for this function:

void SupportMgr::AddTicket ( ComplaintTicket ticket)
574 {
575  _complaintTicketList[ticket->GetId()] = ticket;
576  if (!ticket->IsClosed())
578 
579  ticket->SaveToDB();
580 }
bool IsClosed() const
Definition: SupportMgr.h:60
uint32 GetId() const
Definition: SupportMgr.h:66
ComplaintTicketList _complaintTicketList
Definition: SupportMgr.h:285
void SaveToDB() const override
Definition: SupportMgr.cpp:189
uint32 _openComplaintTicketCount
Definition: SupportMgr.h:292

+ Here is the call graph for this function:

void SupportMgr::AddTicket ( SuggestionTicket ticket)
583 {
584  _suggestionTicketList[ticket->GetId()] = ticket;
585  if (!ticket->IsClosed())
587 
588  ticket->SaveToDB();
589 }
bool IsClosed() const
Definition: SupportMgr.h:60
SuggestionTicketList _suggestionTicketList
Definition: SupportMgr.h:286
uint32 GetId() const
Definition: SupportMgr.h:66
void SaveToDB() const override
Definition: SupportMgr.cpp:302
uint32 _openSuggestionTicketCount
Definition: SupportMgr.h:293

+ Here is the call graph for this function:

template<typename T >
void SupportMgr::CloseTicket ( uint32  ticketId,
ObjectGuid  closedBy 
)
template<>
void SupportMgr::CloseTicket ( uint32  ticketId,
ObjectGuid  closedBy 
)
630 {
631  if (BugTicket* ticket = GetTicket<BugTicket>(ticketId))
632  {
633  ticket->SetClosedBy(closedBy);
634  if (!closedBy.IsEmpty())
636  ticket->SaveToDB();
637  }
638 }
Definition: SupportMgr.h:119
uint32 _openBugTicketCount
Definition: SupportMgr.h:291
bool IsEmpty() const
Definition: ObjectGuid.h:242
template<>
void SupportMgr::CloseTicket ( uint32  ticketId,
ObjectGuid  closedBy 
)
642 {
643  if (ComplaintTicket* ticket = GetTicket<ComplaintTicket>(ticketId))
644  {
645  ticket->SetClosedBy(closedBy);
646  if (!closedBy.IsEmpty())
648  ticket->SaveToDB();
649  }
650 }
Definition: SupportMgr.h:143
bool IsEmpty() const
Definition: ObjectGuid.h:242
uint32 _openComplaintTicketCount
Definition: SupportMgr.h:292
template<>
void SupportMgr::CloseTicket ( uint32  ticketId,
ObjectGuid  closedBy 
)
654 {
655  if (SuggestionTicket* ticket = GetTicket<SuggestionTicket>(ticketId))
656  {
657  ticket->SetClosedBy(closedBy);
658  if (!closedBy.IsEmpty())
660  ticket->SaveToDB();
661  }
662 }
Definition: SupportMgr.h:179
uint32 _openSuggestionTicketCount
Definition: SupportMgr.h:293
bool IsEmpty() const
Definition: ObjectGuid.h:242
uint32 SupportMgr::GenerateBugId ( )
inline
274 { return ++_lastBugId; }
uint32 _lastBugId
Definition: SupportMgr.h:287
uint32 SupportMgr::GenerateComplaintId ( )
inline
275 { return ++_lastComplaintId; }
uint32 _lastComplaintId
Definition: SupportMgr.h:288
uint32 SupportMgr::GenerateSuggestionId ( )
inline
276 { return ++_lastSuggestionId; }
uint32 _lastSuggestionId
Definition: SupportMgr.h:289
bool SupportMgr::GetBugSystemStatus ( ) const
inline
bool _supportSystemStatus
Definition: SupportMgr.h:279
bool _bugSystemStatus
Definition: SupportMgr.h:281
ComplaintTicketList SupportMgr::GetComplaintsByPlayerGuid ( ObjectGuid  playerGuid) const
inline
220  {
222  for (auto const& c : _complaintTicketList)
223  if (c.second->GetPlayerGuid() == playerGuid)
224  ret.insert(c);
225 
226  return ret;
227  }
std::map< uint32, ComplaintTicket * > ComplaintTicketList
Definition: SupportMgr.h:204
ComplaintTicketList _complaintTicketList
Definition: SupportMgr.h:285
bool SupportMgr::GetComplaintSystemStatus ( ) const
inline
bool _supportSystemStatus
Definition: SupportMgr.h:279
bool _complaintSystemStatus
Definition: SupportMgr.h:282
uint64 SupportMgr::GetLastChange ( ) const
inline
236 { return _lastChange; }
uint64 _lastChange
Definition: SupportMgr.h:290
template<typename T >
uint32 SupportMgr::GetOpenTicketCount ( ) const
template<>
uint32 SupportMgr::GetOpenTicketCount ( ) const
417 { return _openBugTicketCount; }
uint32 _openBugTicketCount
Definition: SupportMgr.h:291
template<>
uint32 SupportMgr::GetOpenTicketCount ( ) const
420 { return _openComplaintTicketCount; }
uint32 _openComplaintTicketCount
Definition: SupportMgr.h:292
template<>
uint32 SupportMgr::GetOpenTicketCount ( ) const
423 { return _openSuggestionTicketCount; }
uint32 _openSuggestionTicketCount
Definition: SupportMgr.h:293
bool SupportMgr::GetSuggestionSystemStatus ( ) const
inline
bool _supportSystemStatus
Definition: SupportMgr.h:279
bool _suggestionSystemStatus
Definition: SupportMgr.h:283
bool SupportMgr::GetSupportSystemStatus ( ) const
inline
231 { return _supportSystemStatus; }
bool _supportSystemStatus
Definition: SupportMgr.h:279
template<typename T >
T* SupportMgr::GetTicket ( uint32  ticketId)
template<>
BugTicket* SupportMgr::GetTicket ( uint32  bugId)
382 {
383  BugTicketList::const_iterator itr = _bugTicketList.find(bugId);
384  if (itr != _bugTicketList.end())
385  return itr->second;
386 
387  return nullptr;
388 
389 }
BugTicketList _bugTicketList
Definition: SupportMgr.h:284
template<>
ComplaintTicket* SupportMgr::GetTicket ( uint32  complaintId)
393 {
394  ComplaintTicketList::const_iterator itr = _complaintTicketList.find(complaintId);
395  if (itr != _complaintTicketList.end())
396  return itr->second;
397 
398  return nullptr;
399 }
ComplaintTicketList _complaintTicketList
Definition: SupportMgr.h:285
template<>
SuggestionTicket* SupportMgr::GetTicket ( uint32  suggestionId)
403 {
404  SuggestionTicketList::const_iterator itr = _suggestionTicketList.find(suggestionId);
405  if (itr != _suggestionTicketList.end())
406  return itr->second;
407 
408  return nullptr;
409 
410 }
SuggestionTicketList _suggestionTicketList
Definition: SupportMgr.h:286
bool SupportMgr::GetTicketSystemStatus ( ) const
inline
bool _supportSystemStatus
Definition: SupportMgr.h:279
bool _ticketSystemStatus
Definition: SupportMgr.h:280
void SupportMgr::Initialize ( void  )
372 {
378 }
Definition: World.h:157
Definition: World.h:155
void SetSupportSystemStatus(bool status)
Definition: SupportMgr.h:240
#define sWorld
Definition: World.h:887
void SetSuggestionSystemStatus(bool status)
Definition: SupportMgr.h:244
Definition: World.h:158
void SetTicketSystemStatus(bool status)
Definition: SupportMgr.h:241
void SetBugSystemStatus(bool status)
Definition: SupportMgr.h:242
Definition: World.h:154
void SetComplaintSystemStatus(bool status)
Definition: SupportMgr.h:243
Definition: World.h:156

+ Here is the call graph for this function:

SupportMgr * SupportMgr::instance ( )
static
366 {
367  static SupportMgr instance;
368  return &instance;
369 }
Definition: SupportMgr.h:207
static SupportMgr * instance()
Definition: SupportMgr.cpp:365
void SupportMgr::LoadBugTickets ( )
430 {
431  uint32 oldMSTime = getMSTime();
432 
433  for (auto const& c : _bugTicketList)
434  delete c.second;
435  _bugTicketList.clear();
436 
437  _lastBugId = 0;
439 
442  if (!result)
443  {
444  TC_LOG_INFO("server.loading", ">> Loaded 0 GM bugs. DB table `gm_bug` is empty!");
445  return;
446  }
447 
448  uint32 count = 0;
449  do
450  {
451  Field* fields = result->Fetch();
452  BugTicket* bug = new BugTicket();
453  bug->LoadFromDB(fields);
454 
455  if (!bug->IsClosed())
457 
458  uint32 id = bug->GetId();
459  if (_lastBugId < id)
460  _lastBugId = id;
461 
462  _bugTicketList[id] = bug;
463  ++count;
464  } while (result->NextRow());
465 
466  TC_LOG_INFO("server.loading", ">> Loaded %u GM bugs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
467 }
bool IsClosed() const
Definition: SupportMgr.h:60
std::shared_ptr< PreparedResultSet > PreparedQueryResult
Definition: QueryResult.h:107
void LoadFromDB(Field *fields) override
Definition: SupportMgr.cpp:63
Class used to access individual fields of database query result.
Definition: Field.h:56
uint32 getMSTime()
Definition: Timer.h:24
uint32 _lastBugId
Definition: SupportMgr.h:287
Definition: PreparedStatement.h:74
uint32 GetId() const
Definition: SupportMgr.h:66
Definition: CharacterDatabase.h:300
Definition: SupportMgr.h:119
uint32_t uint32
Definition: Define.h:150
PreparedStatement * GetPreparedStatement(PreparedStatementIndex index)
Definition: DatabaseWorkerPool.h:263
uint32 _openBugTicketCount
Definition: SupportMgr.h:291
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:42
QueryResult Query(const char *sql, T *connection=nullptr)
Definition: DatabaseWorkerPool.cpp:113
BugTicketList _bugTicketList
Definition: SupportMgr.h:284
CharacterDatabaseWorkerPool CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:201

+ Here is the call graph for this function:

void SupportMgr::LoadComplaintTickets ( )
470 {
471  uint32 oldMSTime = getMSTime();
472 
473  for (auto const& c : _complaintTicketList)
474  delete c.second;
475  _complaintTicketList.clear();
476 
477  _lastComplaintId = 0;
479 
482  if (!result)
483  {
484  TC_LOG_INFO("server.loading", ">> Loaded 0 GM complaints. DB table `gm_complaint` is empty!");
485  return;
486  }
487 
488  uint32 count = 0;
489  PreparedStatement* chatLogStmt;
490  PreparedQueryResult chatLogResult;
491  do
492  {
493  Field* fields = result->Fetch();
494  ComplaintTicket* complaint = new ComplaintTicket();
495  complaint->LoadFromDB(fields);
496 
497  if (!complaint->IsClosed())
499 
500  uint32 id = complaint->GetId();
501  if (_lastComplaintId < id)
502  _lastComplaintId = id;
503 
505  chatLogStmt->setUInt32(0, id);
506  chatLogResult = CharacterDatabase.Query(chatLogStmt);
507 
508  if (chatLogResult)
509  {
510  do
511  {
512  Field* chatLineFields = chatLogResult->Fetch();
513  complaint->LoadChatLineFromDB(chatLineFields);
514  } while (chatLogResult->NextRow());
515  }
516 
517  _complaintTicketList[id] = complaint;
518  ++count;
519  } while (result->NextRow());
520 
521  TC_LOG_INFO("server.loading", ">> Loaded %u GM complaints in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
522 }
bool IsClosed() const
Definition: SupportMgr.h:60
Definition: SupportMgr.h:143
std::shared_ptr< PreparedResultSet > PreparedQueryResult
Definition: QueryResult.h:107
Class used to access individual fields of database query result.
Definition: Field.h:56
void LoadFromDB(Field *fields) override
Definition: SupportMgr.cpp:149
uint32 getMSTime()
Definition: Timer.h:24
Definition: PreparedStatement.h:74
uint32 GetId() const
Definition: SupportMgr.h:66
ComplaintTicketList _complaintTicketList
Definition: SupportMgr.h:285
uint32_t uint32
Definition: Define.h:150
PreparedStatement * GetPreparedStatement(PreparedStatementIndex index)
Definition: DatabaseWorkerPool.h:263
void setUInt32(const uint8 index, const uint32 value)
Definition: PreparedStatement.cpp:115
Definition: CharacterDatabase.h:305
uint32 _lastComplaintId
Definition: SupportMgr.h:288
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:42
QueryResult Query(const char *sql, T *connection=nullptr)
Definition: DatabaseWorkerPool.cpp:113
void LoadChatLineFromDB(Field *fields)
Definition: SupportMgr.cpp:184
Definition: CharacterDatabase.h:308
CharacterDatabaseWorkerPool CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:201
uint32 _openComplaintTicketCount
Definition: SupportMgr.h:292

+ Here is the call graph for this function:

void SupportMgr::LoadSuggestionTickets ( )
525 {
526  uint32 oldMSTime = getMSTime();
527 
528  for (auto const& c : _suggestionTicketList)
529  delete c.second;
530  _suggestionTicketList.clear();
531 
532  _lastSuggestionId = 0;
534 
537  if (!result)
538  {
539  TC_LOG_INFO("server.loading", ">> Loaded 0 GM suggestions. DB table `gm_suggestion` is empty!");
540  return;
541  }
542 
543  uint32 count = 0;
544  do
545  {
546  Field* fields = result->Fetch();
547  SuggestionTicket* suggestion = new SuggestionTicket();
548  suggestion->LoadFromDB(fields);
549 
550  if (!suggestion->IsClosed())
552 
553  uint32 id = suggestion->GetId();
554  if (_lastSuggestionId < id)
555  _lastSuggestionId = id;
556 
557  _suggestionTicketList[id] = suggestion;
558  ++count;
559  } while (result->NextRow());
560 
561  TC_LOG_INFO("server.loading", ">> Loaded %u GM suggestions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
562 }
bool IsClosed() const
Definition: SupportMgr.h:60
SuggestionTicketList _suggestionTicketList
Definition: SupportMgr.h:286
Definition: SupportMgr.h:179
std::shared_ptr< PreparedResultSet > PreparedQueryResult
Definition: QueryResult.h:107
Class used to access individual fields of database query result.
Definition: Field.h:56
uint32 getMSTime()
Definition: Timer.h:24
Definition: CharacterDatabase.h:314
Definition: PreparedStatement.h:74
uint32 GetId() const
Definition: SupportMgr.h:66
uint32 _openSuggestionTicketCount
Definition: SupportMgr.h:293
void LoadFromDB(Field *fields) override
Definition: SupportMgr.cpp:272
uint32_t uint32
Definition: Define.h:150
PreparedStatement * GetPreparedStatement(PreparedStatementIndex index)
Definition: DatabaseWorkerPool.h:263
uint32 _lastSuggestionId
Definition: SupportMgr.h:289
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:42
QueryResult Query(const char *sql, T *connection=nullptr)
Definition: DatabaseWorkerPool.cpp:113
CharacterDatabaseWorkerPool CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:201

+ Here is the call graph for this function:

template<typename T >
void SupportMgr::RemoveTicket ( uint32  ticketId)
template<>
void SupportMgr::RemoveTicket ( uint32  ticketId)
593 {
594  if (BugTicket* ticket = GetTicket<BugTicket>(ticketId))
595  {
596  ticket->DeleteFromDB();
597  _bugTicketList.erase(ticketId);
598  delete ticket;
599  }
600 }
Definition: SupportMgr.h:119
BugTicketList _bugTicketList
Definition: SupportMgr.h:284
template<>
void SupportMgr::RemoveTicket ( uint32  ticketId)
604 {
605  if (ComplaintTicket* ticket = GetTicket<ComplaintTicket>(ticketId))
606  {
607  ticket->DeleteFromDB();
608  _complaintTicketList.erase(ticketId);
609  delete ticket;
610  }
611 }
Definition: SupportMgr.h:143
ComplaintTicketList _complaintTicketList
Definition: SupportMgr.h:285
template<>
void SupportMgr::RemoveTicket ( uint32  ticketId)
615 {
616  if (SuggestionTicket* ticket = GetTicket<SuggestionTicket>(ticketId))
617  {
618  ticket->DeleteFromDB();
619  _suggestionTicketList.erase(ticketId);
620  delete ticket;
621  }
622 }
SuggestionTicketList _suggestionTicketList
Definition: SupportMgr.h:286
Definition: SupportMgr.h:179
template<typename T >
void SupportMgr::ResetTickets ( )
template<>
void SupportMgr::ResetTickets ( )
670 {
671  for (auto const& c : _bugTicketList)
672  delete c.second;
673  _bugTicketList.clear();
674 
675  _lastBugId = 0;
676 
679 }
void Execute(const char *sql)
Definition: DatabaseWorkerPool.h:87
uint32 _lastBugId
Definition: SupportMgr.h:287
Definition: PreparedStatement.h:74
PreparedStatement * GetPreparedStatement(PreparedStatementIndex index)
Definition: DatabaseWorkerPool.h:263
BugTicketList _bugTicketList
Definition: SupportMgr.h:284
Definition: CharacterDatabase.h:303
CharacterDatabaseWorkerPool CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21

+ Here is the call graph for this function:

template<>
void SupportMgr::ResetTickets ( )
683 {
684  for (auto const& c : _complaintTicketList)
685  delete c.second;
686  _complaintTicketList.clear();
687 
688  _lastComplaintId = 0;
689 
694 }
Definition: CharacterDatabase.h:311
SQLTransaction BeginTransaction()
Begins an automanaged transaction pointer that will automatically rollback if not commited...
Definition: DatabaseWorkerPool.h:221
void CommitTransaction(SQLTransaction transaction)
Definition: DatabaseWorkerPool.cpp:179
ComplaintTicketList _complaintTicketList
Definition: SupportMgr.h:285
PreparedStatement * GetPreparedStatement(PreparedStatementIndex index)
Definition: DatabaseWorkerPool.h:263
uint32 _lastComplaintId
Definition: SupportMgr.h:288
CharacterDatabaseWorkerPool CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21
Definition: CharacterDatabase.h:312
std::shared_ptr< Transaction > SQLTransaction
Definition: Transaction.h:58

+ Here is the call graph for this function:

template<>
template TC_GAME_API void SupportMgr::ResetTickets< SuggestionTicket > ( )
698 {
699  for (auto const& c : _suggestionTicketList)
700  delete c.second;
701  _suggestionTicketList.clear();
702 
703  _lastSuggestionId = 0;
704 
707 }
SuggestionTicketList _suggestionTicketList
Definition: SupportMgr.h:286
void Execute(const char *sql)
Definition: DatabaseWorkerPool.h:87
Definition: PreparedStatement.h:74
Definition: CharacterDatabase.h:317
PreparedStatement * GetPreparedStatement(PreparedStatementIndex index)
Definition: DatabaseWorkerPool.h:263
uint32 _lastSuggestionId
Definition: SupportMgr.h:289
CharacterDatabaseWorkerPool CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21

+ Here is the call graph for this function:

void SupportMgr::SetBugSystemStatus ( bool  status)
inline
242 { _bugSystemStatus = status; }
bool _bugSystemStatus
Definition: SupportMgr.h:281

+ Here is the caller graph for this function:

void SupportMgr::SetComplaintSystemStatus ( bool  status)
inline
243 { _complaintSystemStatus = status; }
bool _complaintSystemStatus
Definition: SupportMgr.h:282

+ Here is the caller graph for this function:

void SupportMgr::SetSuggestionSystemStatus ( bool  status)
inline
244 { _suggestionSystemStatus = status; }
bool _suggestionSystemStatus
Definition: SupportMgr.h:283

+ Here is the caller graph for this function:

void SupportMgr::SetSupportSystemStatus ( bool  status)
inline
240 { _supportSystemStatus = status; }
bool _supportSystemStatus
Definition: SupportMgr.h:279

+ Here is the caller graph for this function:

void SupportMgr::SetTicketSystemStatus ( bool  status)
inline
241 { _ticketSystemStatus = status; }
bool _ticketSystemStatus
Definition: SupportMgr.h:280

+ Here is the caller graph for this function:

template<typename T >
void SupportMgr::ShowClosedList ( ChatHandler handler) const
template<>
void SupportMgr::ShowClosedList ( ChatHandler handler) const
746 {
748  for (BugTicketList::const_iterator itr = _bugTicketList.begin(); itr != _bugTicketList.end(); ++itr)
749  if (itr->second->IsClosed())
750  handler.SendSysMessage(itr->second->FormatViewMessageString(handler).c_str());
751 }
Definition: Language.h:1047
BugTicketList _bugTicketList
Definition: SupportMgr.h:284
virtual void SendSysMessage(char const *str, bool escapeCharacters=false)
Definition: Chat.cpp:152
template<>
void SupportMgr::ShowClosedList ( ChatHandler handler) const
755 {
757  for (ComplaintTicketList::const_iterator itr = _complaintTicketList.begin(); itr != _complaintTicketList.end(); ++itr)
758  if (itr->second->IsClosed())
759  handler.SendSysMessage(itr->second->FormatViewMessageString(handler).c_str());
760 }
Definition: Language.h:1047
ComplaintTicketList _complaintTicketList
Definition: SupportMgr.h:285
virtual void SendSysMessage(char const *str, bool escapeCharacters=false)
Definition: Chat.cpp:152
template<>
void SupportMgr::ShowClosedList ( ChatHandler handler) const
764 {
766  for (SuggestionTicketList::const_iterator itr = _suggestionTicketList.begin(); itr != _suggestionTicketList.end(); ++itr)
767  if (itr->second->IsClosed())
768  handler.SendSysMessage(itr->second->FormatViewMessageString(handler).c_str());
769 }
SuggestionTicketList _suggestionTicketList
Definition: SupportMgr.h:286
Definition: Language.h:1047
virtual void SendSysMessage(char const *str, bool escapeCharacters=false)
Definition: Chat.cpp:152
template<typename T >
void SupportMgr::ShowList ( ChatHandler handler) const
template<typename T >
void SupportMgr::ShowList ( ChatHandler handler,
bool  onlineOnly 
) const
template<>
void SupportMgr::ShowList ( ChatHandler handler) const
715 {
717  for (BugTicketList::const_iterator itr = _bugTicketList.begin(); itr != _bugTicketList.end(); ++itr)
718  if (!itr->second->IsClosed())
719  handler.SendSysMessage(itr->second->FormatViewMessageString(handler).c_str());
720 }
Definition: Language.h:1046
BugTicketList _bugTicketList
Definition: SupportMgr.h:284
virtual void SendSysMessage(char const *str, bool escapeCharacters=false)
Definition: Chat.cpp:152
template<>
void SupportMgr::ShowList ( ChatHandler handler) const
724 {
726  for (ComplaintTicketList::const_iterator itr = _complaintTicketList.begin(); itr != _complaintTicketList.end(); ++itr)
727  if (!itr->second->IsClosed())
728  handler.SendSysMessage(itr->second->FormatViewMessageString(handler).c_str());
729 }
Definition: Language.h:1046
ComplaintTicketList _complaintTicketList
Definition: SupportMgr.h:285
virtual void SendSysMessage(char const *str, bool escapeCharacters=false)
Definition: Chat.cpp:152
template<>
void SupportMgr::ShowList ( ChatHandler handler) const
733 {
735  for (SuggestionTicketList::const_iterator itr = _suggestionTicketList.begin(); itr != _suggestionTicketList.end(); ++itr)
736  if (!itr->second->IsClosed())
737  handler.SendSysMessage(itr->second->FormatViewMessageString(handler).c_str());
738 }
SuggestionTicketList _suggestionTicketList
Definition: SupportMgr.h:286
Definition: Language.h:1046
virtual void SendSysMessage(char const *str, bool escapeCharacters=false)
Definition: Chat.cpp:152
void SupportMgr::UpdateLastChange ( )
inline
272 { _lastChange = uint64(time(nullptr)); }
uint64 _lastChange
Definition: SupportMgr.h:290
uint64_t uint64
Definition: g3dmath.h:170

Member Data Documentation

bool SupportMgr::_bugSystemStatus
private
BugTicketList SupportMgr::_bugTicketList
private
bool SupportMgr::_complaintSystemStatus
private
ComplaintTicketList SupportMgr::_complaintTicketList
private
uint32 SupportMgr::_lastBugId
private
uint64 SupportMgr::_lastChange
private
uint32 SupportMgr::_lastComplaintId
private
uint32 SupportMgr::_lastSuggestionId
private
uint32 SupportMgr::_openBugTicketCount
private
uint32 SupportMgr::_openComplaintTicketCount
private
uint32 SupportMgr::_openSuggestionTicketCount
private
bool SupportMgr::_suggestionSystemStatus
private
SuggestionTicketList SupportMgr::_suggestionTicketList
private
bool SupportMgr::_supportSystemStatus
private
bool SupportMgr::_ticketSystemStatus
private

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