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;
GmTicket* ticket = sTicketMgr->GetTicket(ticketId);
if (!ticket || ticket->IsClosed())
if (!ticket)
{
handler->PSendSysMessage(LANG_COMMAND_TICKETNOTEXIST);
return true;
}
// Cannot comment ticket assigned to someone else
//! Console excluded
// Cannot comment ticket assigned to someone else (unless done from the Console)
Player* player = handler->GetSession() ? handler->GetSession()->GetPlayer() : nullptr;
if (player && ticket->IsAssignedNotTo(player->GetGUID()))
{