Kami-Nezumi
Members-
Posts
1 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Kami-Nezumi's Achievements
Newbie (1/3)
0
Reputation
-
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);
Contact Us
To contact us
click here
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
Copyright © getMaNGOS. All rights Reserved.
This website is in no way associated with or endorsed by Blizzard Entertainment®
This website is in no way associated with or endorsed by Blizzard Entertainment®