Move initialization of m_GMticketid to avoid random numbers being assigned if gm ticket table is empty.
Thanks Ayane. Closes issue #883. --HG-- branch : trunk
This commit is contained in:
@@ -8811,6 +8811,7 @@ void ObjectMgr::LoadGMTickets()
|
|||||||
delete *itr;
|
delete *itr;
|
||||||
}
|
}
|
||||||
m_GMTicketList.clear();
|
m_GMTicketList.clear();
|
||||||
|
m_GMticketid = 0;
|
||||||
|
|
||||||
QueryResult_AutoPtr result = CharacterDatabase.Query( "SELECT guid, playerGuid, name, message, createtime, map, posX, posY, posZ, timestamp, closed, assignedto, comment FROM gm_tickets" );
|
QueryResult_AutoPtr result = CharacterDatabase.Query( "SELECT guid, playerGuid, name, message, createtime, map, posX, posY, posZ, timestamp, closed, assignedto, comment FROM gm_tickets" );
|
||||||
|
|
||||||
@@ -8851,7 +8852,6 @@ void ObjectMgr::LoadGMTickets()
|
|||||||
} while( result->NextRow() );
|
} while( result->NextRow() );
|
||||||
|
|
||||||
result = CharacterDatabase.PQuery("SELECT MAX(guid) from gm_tickets");
|
result = CharacterDatabase.PQuery("SELECT MAX(guid) from gm_tickets");
|
||||||
m_GMticketid = 0;
|
|
||||||
|
|
||||||
if(result)
|
if(result)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user