diff options
Diffstat (limited to 'src/server/game/Tickets/TicketMgr.cpp')
-rwxr-xr-x | src/server/game/Tickets/TicketMgr.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/server/game/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp index cbfea3b81bd..10c1f4a1dfd 100755 --- a/src/server/game/Tickets/TicketMgr.cpp +++ b/src/server/game/Tickets/TicketMgr.cpp @@ -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(); |