[Command] Language locale check

This commit is contained in:
Yunfan Li
2024-07-23 23:40:37 +08:00
parent c191dfc35f
commit ed80744891
2 changed files with 8 additions and 5 deletions

View File

@@ -6,6 +6,7 @@
#include "Event.h"
#include "ChatHelper.h"
#include "Playerbots.h"
#include "World.h"
bool TellLosAction::Execute(Event event)
{
@@ -52,7 +53,7 @@ void TellLosAction::ListUnits(std::string const title, GuidVector units)
for (ObjectGuid const guid : units)
{
if (Unit* unit = botAI->GetUnit(guid)) {
botAI->TellMaster(unit->GetName());
botAI->TellMaster(unit->GetNameForLocaleIdx(sWorld->GetDefaultDbcLocale()));
}
}