Fix .ticket surveyclose (#125)
This commit is contained in:
parent
99cc20629e
commit
e242f1b7cc
@ -545,7 +545,8 @@ bool ChatHandler::HandleTicketShowCommand(char* args)
|
|||||||
bool ChatHandler::HandleTickerSurveyClose(char* args)
|
bool ChatHandler::HandleTickerSurveyClose(char* args)
|
||||||
{
|
{
|
||||||
GMTicket* ticket = NULL;
|
GMTicket* ticket = NULL;
|
||||||
|
std::string target_name;
|
||||||
|
ObjectGuid target_guid;
|
||||||
uint32 num;
|
uint32 num;
|
||||||
if (ExtractUInt32(&args, num))
|
if (ExtractUInt32(&args, num))
|
||||||
{
|
{
|
||||||
@ -565,8 +566,7 @@ bool ChatHandler::HandleTickerSurveyClose(char* args)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ObjectGuid target_guid;
|
|
||||||
std::string target_name;
|
|
||||||
if (!ExtractPlayerTarget(&args, NULL, &target_guid, &target_name))
|
if (!ExtractPlayerTarget(&args, NULL, &target_guid, &target_name))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -582,7 +582,8 @@ bool ChatHandler::HandleTickerSurveyClose(char* args)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32 ticketId = ticket->GetId();
|
||||||
ticket->CloseWithSurvey();
|
ticket->CloseWithSurvey();
|
||||||
|
|
||||||
//This needs to be before we delete the ticket
|
//This needs to be before we delete the ticket
|
||||||
@ -599,7 +600,9 @@ bool ChatHandler::HandleTickerSurveyClose(char* args)
|
|||||||
sTicketMgr.Delete(ticket->GetPlayerGuid());
|
sTicketMgr.Delete(ticket->GetPlayerGuid());
|
||||||
ticket = NULL;
|
ticket = NULL;
|
||||||
|
|
||||||
PSendSysMessage(LANG_COMMAND_TICKETCLOSED_NAME, pPlayer->GetName());
|
const char* gmNameReplacementWhenUsingCLI = "ADMIN";
|
||||||
|
|
||||||
|
PSendSysMessage(LANG_COMMAND_TICKETCLOSED_NAME, ticketId, target_name.c_str(), m_session ? m_session->GetPlayer()->GetName() : gmNameReplacementWhenUsingCLI);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user