Core/Locales: Store empty localized strings present in database (#29779)

This commit is contained in:
Meji
2024-03-03 23:49:16 +01:00
committed by GitHub
parent a5a2f5af2d
commit 74ec1d3cfb

View File

@@ -239,16 +239,13 @@ ObjectMgr::~ObjectMgr()
void ObjectMgr::AddLocaleString(std::string_view value, LocaleConstant localeConstant, std::vector<std::string>& data)
{
if (!value.empty())
if (data.size() <= size_t(localeConstant))
{
if (data.size() <= size_t(localeConstant))
{
data.reserve(TOTAL_LOCALES);
data.resize(localeConstant + 1);
}
data[localeConstant] = value;
data.reserve(TOTAL_LOCALES);
data.resize(localeConstant + 1);
}
data[localeConstant] = value.empty() ? "" : value;
}
void ObjectMgr::LoadCreatureLocales()