fix(Core/Command): Can comment closed tickets (#3176)

This commit is contained in:
Barbz
2020-08-21 10:52:52 +02:00
committed by GitHub
parent 70bdba8309
commit ed8ed175b7

View File

@@ -172,14 +172,13 @@ public:
return false; return false;
GmTicket* ticket = sTicketMgr->GetTicket(ticketId); GmTicket* ticket = sTicketMgr->GetTicket(ticketId);
if (!ticket || ticket->IsClosed()) if (!ticket)
{ {
handler->PSendSysMessage(LANG_COMMAND_TICKETNOTEXIST); handler->PSendSysMessage(LANG_COMMAND_TICKETNOTEXIST);
return true; return true;
} }
// Cannot comment ticket assigned to someone else // Cannot comment ticket assigned to someone else (unless done from the Console)
//! Console excluded
Player* player = handler->GetSession() ? handler->GetSession()->GetPlayer() : nullptr; Player* player = handler->GetSession() ? handler->GetSession()->GetPlayer() : nullptr;
if (player && ticket->IsAssignedNotTo(player->GetGUID())) if (player && ticket->IsAssignedNotTo(player->GetGUID()))
{ {