mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 16:37:06 +00:00
Various Cleanups (game F-K)
This commit is contained in:
parent
c5c09cee3c
commit
2bd41afb3e
44 changed files with 1903 additions and 1881 deletions
|
|
@ -32,11 +32,11 @@ void GMTicketMgr::LoadGMTickets()
|
|||
{
|
||||
m_GMTicketMap.clear(); // For reload case
|
||||
|
||||
QueryResult *result = CharacterDatabase.Query(
|
||||
// 0 1 2 3 4
|
||||
"SELECT guid, ticket_text, response_text, UNIX_TIMESTAMP(ticket_lastchange), ticket_id FROM character_ticket ORDER BY ticket_id ASC");
|
||||
QueryResult* result = CharacterDatabase.Query(
|
||||
// 0 1 2 3 4
|
||||
"SELECT guid, ticket_text, response_text, UNIX_TIMESTAMP(ticket_lastchange), ticket_id FROM character_ticket ORDER BY ticket_id ASC");
|
||||
|
||||
if( !result )
|
||||
if (!result)
|
||||
{
|
||||
BarGoLink bar(1);
|
||||
|
||||
|
|
@ -72,7 +72,8 @@ void GMTicketMgr::LoadGMTickets()
|
|||
ticket.Init(guid, fields[1].GetCppString(), fields[2].GetCppString(), time_t(fields[3].GetUInt64()));
|
||||
m_GMTicketListByCreatingOrder.push_back(&ticket);
|
||||
|
||||
} while (result->NextRow());
|
||||
}
|
||||
while (result->NextRow());
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
|
|
@ -81,9 +82,9 @@ void GMTicketMgr::LoadGMTickets()
|
|||
|
||||
void GMTicketMgr::DeleteAll()
|
||||
{
|
||||
for(GMTicketMap::const_iterator itr = m_GMTicketMap.begin(); itr != m_GMTicketMap.end(); ++itr)
|
||||
for (GMTicketMap::const_iterator itr = m_GMTicketMap.begin(); itr != m_GMTicketMap.end(); ++itr)
|
||||
{
|
||||
if(Player* owner = sObjectMgr.GetPlayer(itr->first))
|
||||
if (Player* owner = sObjectMgr.GetPlayer(itr->first))
|
||||
owner->GetSession()->SendGMTicketGetTicket(0x0A);
|
||||
}
|
||||
CharacterDatabase.Execute("DELETE FROM character_ticket");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue