fix(Core/Chat): properly log zone name when logging GM commands, as some areas don't have parent zone set (#8066)
This commit is contained in:
@@ -321,11 +321,15 @@ bool ChatHandler::ExecuteCommandInTable(std::vector<ChatCommand> const& table, c
|
||||
uint32 zoneId = player->GetZoneId();
|
||||
std::string areaName = "Unknown";
|
||||
std::string zoneName = "Unknown";
|
||||
int locale = GetSessionDbcLocale();
|
||||
|
||||
if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaId))
|
||||
{
|
||||
int locale = GetSessionDbcLocale();
|
||||
areaName = area->area_name[locale];
|
||||
if (AreaTableEntry const* zone = sAreaTableStore.LookupEntry(area->zone))
|
||||
}
|
||||
|
||||
if (AreaTableEntry const* zone = sAreaTableStore.LookupEntry(zoneId))
|
||||
{
|
||||
zoneName = zone->area_name[locale];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user