fix(Scripts/Command): Improve output of event commands (#16980)

This commit is contained in:
Kitzunu
2023-08-12 00:03:03 +02:00
committed by GitHub
parent da8ebbae0b
commit de2e2b6e8b
3 changed files with 16 additions and 3 deletions

View File

@@ -152,11 +152,12 @@ public:
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr->GetActiveEventList();
if (activeEvents.find(eventId) != activeEvents.end())
{
handler->PSendSysMessage(LANG_EVENT_ALREADY_ACTIVE, uint16(eventId));
handler->PSendSysMessage(LANG_EVENT_ALREADY_ACTIVE, uint16(eventId), eventData.description.c_str());
handler->SetSentErrorMessage(true);
return false;
}
handler->PSendSysMessage(LANG_EVENT_STARTED, uint16(eventId), eventData.description.c_str());
sGameEventMgr->StartEvent(eventId, true);
return true;
}
@@ -184,11 +185,12 @@ public:
if (activeEvents.find(eventId) == activeEvents.end())
{
handler->PSendSysMessage(LANG_EVENT_NOT_ACTIVE, uint16(eventId));
handler->PSendSysMessage(LANG_EVENT_NOT_ACTIVE, uint16(eventId), eventData.description.c_str());
handler->SetSentErrorMessage(true);
return false;
}
handler->PSendSysMessage(LANG_EVENT_STOPPED, uint16(eventId), eventData.description.c_str());
sGameEventMgr->StopEvent(eventId, true);
return true;
}