TrinityCore/TrinityCore — pull request #10989 by Elron103 (2013-10-03 13:12:05+00:00)
Title: Core/Tickets: Fix crash in TicketMgr::ResetTickets()

Description:
Currently there is a crash in TicketMgr::ResetTickets(). This function can be called by the command .ticket reset.

The crash happens because in the current code the function RemoveTicket invalidates the itr, which is used for iterating over the _ticketList. ++itr tries to access that variable, but since it has been invalidated by RemoveTicket it will result in a crash.

Environment:
Tested it under Win with:
TC: 895a23d
DB: TDB 52