Core/Commands: Added '.ticket reset' for resetting ticket-id counter. Author: Bizzy
This commit is contained in:
@@ -200,6 +200,16 @@ TicketMgr::TicketMgr() : _status(true), _lastTicketId(0), _lastSurveyId(0), _ope
|
||||
|
||||
void TicketMgr::Initialize() { SetStatus(sWorld->getBoolConfig(CONFIG_ALLOW_TICKETS)); }
|
||||
|
||||
void TicketMgr::ResetTickets()
|
||||
{
|
||||
for (GmTicketList::const_iterator itr = _ticketList.begin(); itr != _ticketList.end(); ++itr)
|
||||
if (itr->second->IsClosed())
|
||||
sTicketMgr->RemoveTicket(itr->second->GetId());
|
||||
|
||||
_lastTicketId = 0;
|
||||
CharacterDatabase.PExecute("TRUNCATE TABLE gm_tickets");
|
||||
}
|
||||
|
||||
void TicketMgr::LoadTickets()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -213,6 +213,7 @@ public:
|
||||
uint32 GetNextSurveyID() { return ++_lastSurveyId; }
|
||||
|
||||
void Initialize();
|
||||
void ResetTickets();
|
||||
|
||||
void ShowList(ChatHandler& handler, bool onlineOnly) const;
|
||||
void ShowClosedList(ChatHandler& handler) const;
|
||||
|
||||
Reference in New Issue
Block a user