Core/DataStores: Simplified string memory allocation in db2 files, dropped unneccessary level of indirection

This commit is contained in:
Shauren
2020-06-27 13:33:17 +02:00
parent eccc015ce7
commit deca201f77
38 changed files with 333 additions and 380 deletions

View File

@@ -327,10 +327,10 @@ bool ChatHandler::ExecuteCommandInTable(std::vector<ChatCommand> const& table, c
std::string zoneName = "Unknown";
if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaId))
{
int32 locale = GetSessionDbcLocale();
areaName = area->AreaName->Str[locale];
LocaleConstant locale = GetSessionDbcLocale();
areaName = area->AreaName[locale];
if (AreaTableEntry const* zone = sAreaTableStore.LookupEntry(area->ParentAreaID))
zoneName = zone->AreaName->Str[locale];
zoneName = zone->AreaName[locale];
}
sLog->outCommand(m_session->GetAccountId(), "Command: %s [Player: %s (%s) (Account: %u) X: %f Y: %f Z: %f Map: %u (%s) Area: %u (%s) Zone: %s Selected: %s (%s)]",