Jump to content

Kami-Nezumi

Members
  • Posts

    1
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Kami-Nezumi

  1. Hi. I've just made this patch and decided to share it. I've tested it, and it works fine. What bug does the patch fix? What features does the patch add? It justs add a check when a player who made a ticket and logged off wants to login again. It checks in the DB if a GM answered to his ticket (Currently, this check occures only at world initalization, never after). I made this patch for rev 10337. diff --git a/src/game/GMTicketHandler.cpp b/src/game/GMTicketHandler.cpp index 5e49ec5..cfad316 100644 --- a/src/game/GMTicketHandler.cpp +++ b/src/game/GMTicketHandler.cpp @@ -62,13 +62,27 @@ void WorldSession::HandleGMTicketGetTicketOpcode( WorldPacket & /*recv_data*/ ) { SendQueryTimeResponse(); - GMTicket* ticket = sTicketMgr.GetGMTicket(GetPlayer()->GetGUIDLow()); + uint32 playerGUID = GetPlayer()->GetGUIDLow(); + + GMTicket* ticket = sTicketMgr.GetGMTicket(playerGUID); if(ticket) { - if(ticket->HasResponse()) - SendGMResponse(ticket); + QueryResult *result; + result = CharacterDatabase.PQuery("SELECT response_text FROM character_ticket WHERE guid = %u", playerGUID); + + Field* fields = result->Fetch(); + std::string response_text = fields->GetCppString(); + + if(!response_text.empty()) + { + ticket->SetResponseText(response_text.c_str()); + + SendGMResponse(ticket); + } else SendGMTicketGetTicket(0x06, ticket->GetText()); + + delete result; } else SendGMTicketGetTicket(0x0A, 0);
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use