mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
fix(Core/Tickets): Fix crash in ticket complete command. (#21665)
This commit is contained in:
committed by
GitHub
parent
263f14d800
commit
3406cb03b3
@@ -199,7 +199,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGMTicketCompleteCommand(ChatHandler* handler, uint32 ticketId)
|
||||
static bool HandleGMTicketCompleteCommand(ChatHandler* handler, uint32 ticketId, std::optional<std::string> response)
|
||||
{
|
||||
GmTicket* ticket = sTicketMgr->GetTicket(ticketId);
|
||||
if (!ticket || ticket->IsClosed() || ticket->IsCompleted())
|
||||
@@ -217,9 +217,8 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
char* response = strtok(nullptr, "\n");
|
||||
if (response)
|
||||
ticket->AppendResponse(response);
|
||||
ticket->AppendResponse(response.value());
|
||||
|
||||
if (Player* player2 = ticket->GetPlayer())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user