Core/Commands: Added '.ticket reset' for resetting ticket-id counter. Author: Bizzy

This commit is contained in:
Bizzy
2011-10-04 17:41:55 +02:00
parent 5db7bf9cc3
commit 4112a0d087
8 changed files with 38 additions and 0 deletions
+10
View File
@@ -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();
+1
View File
@@ -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;