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

@@ -370,20 +370,20 @@ public:
!skillInfo->CanLink) // only prof with recipes have set
continue;
int locale = handler->GetSessionDbcLocale();
name = skillInfo->DisplayName->Str[locale];
LocaleConstant locale = handler->GetSessionDbcLocale();
name = skillInfo->DisplayName[locale];
if (name.empty())
continue;
if (!Utf8FitTo(name, namePart))
{
locale = 0;
for (; locale < TOTAL_LOCALES; ++locale)
locale = LOCALE_enUS;
for (; locale < TOTAL_LOCALES; locale = LocaleConstant(locale + 1))
{
if (locale == handler->GetSessionDbcLocale())
continue;
name = skillInfo->DisplayName->Str[locale];
name = skillInfo->DisplayName[locale];
if (name.empty())
continue;