aboutsummaryrefslogtreecommitdiff
path: root/src/game/TicketMgr.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-09 17:53:00 -0600
committermegamage <none@none>2009-01-09 17:53:00 -0600
commit5bd43066913b60627ccd0a9f282e52be77c79a00 (patch)
tree39336aff3a883df7322bb6c7cc4b4ee4e479b44f /src/game/TicketMgr.cpp
parent9fe27bf644ccd001ba64f9c5e0e4a83b1a814d44 (diff)
parent3287b25ec210d5e38bf6fdfdd982895c484b5ada (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/game/TicketMgr.cpp')
-rw-r--r--src/game/TicketMgr.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/game/TicketMgr.cpp b/src/game/TicketMgr.cpp
index ffa8c522672..7c86cde723b 100644
--- a/src/game/TicketMgr.cpp
+++ b/src/game/TicketMgr.cpp
@@ -108,11 +108,12 @@ void TicketMgr::DeleteGMTicketPermanently(uint64 ticketGuid)
void TicketMgr::LoadGMTickets()
{
+ InitTicketID();
// Delete all out of object holder
GM_TicketList.clear();
QueryResult *result = CharacterDatabase.Query( "SELECT `guid`, `playerGuid`, `name`, `message`, `timestamp`, `closed`, `assignedto`, `comment` FROM `gm_tickets` WHERE `closed` = '0'" );
GM_Ticket *ticket;
-
+
if(!result)
return;
@@ -190,7 +191,7 @@ void TicketMgr::UpdateGMTicket(GM_Ticket *ticket)
SaveGMTicket(ticket);
}
-uint64 TicketMgr::GenerateTicketID()
+void TicketMgr::InitTicketID()
{
QueryResult *result = CharacterDatabase.Query("SELECT MAX(guid) FROM gm_tickets");
if(result)
@@ -198,6 +199,9 @@ uint64 TicketMgr::GenerateTicketID()
m_ticketid = result->Fetch()[0].GetUInt64() + 1;
delete result;
}
+}
+uint64 TicketMgr::GenerateTicketID()
+{
return ++m_ticketid;
-} \ No newline at end of file
+}