Core/Ticket System: Ticket comment visual output bug

* Commenting on a ticket no longer sends the GM's name to the ticket handler for assignment
* Closes #16091
* Closes #17686

Signed-off-by: Naios <naios-dev@live.de>
This commit is contained in:
Tomatoes authored and Aokromes committed 2016-07-31 02:07:48 +02:00
1 parent 96b5299a89
commit 806ef935b8
1 file changed
+6 -1
+6 -1
View File
@@ -202,7 +202,12 @@ public:
ticket->SaveToDB(trans);
sTicketMgr->UpdateLastChange();
std::string msg = ticket->FormatMessageString(*handler, NULL, ticket->GetAssignedToName().c_str(), NULL, NULL, NULL);
std::string msg = [&] {
std::string const assignedName = ticket->GetAssignedToName();
return ticket->FormatMessageString(*handler, nullptr,
assignedName.empty() ? nullptr : assignedName.c_str(), nullptr, nullptr, nullptr);
}();
msg += handler->PGetParseString(LANG_COMMAND_TICKETLISTADDCOMMENT, player ? player->GetName().c_str() : "Console", comment);
handler->SendGlobalGMSysMessage(msg.c_str());