Merge branch 'fix_7423' into 'master'

Fix #7422, #7423, #7424

Closes #7424, #7423, and #7422

See merge request OpenMW/openmw!3136
This commit is contained in:
psi29a 2023-06-15 11:02:21 +00:00
commit 1630e04d1b
3 changed files with 33 additions and 31 deletions

View file

@ -141,8 +141,7 @@ namespace MWGui
mLevelText->setCaptionWithReplacing("#{sLevelUpMenu1} " + MyGUI::utility::toString(level));
std::string_view levelupdescription;
if (level <= 20)
levelupdescription = Fallback::Map::getString("Level_Up_Level" + MyGUI::utility::toString(level));
levelupdescription = Fallback::Map::getString("Level_Up_Level" + MyGUI::utility::toString(level));
if (levelupdescription.empty())
levelupdescription = Fallback::Map::getString("Level_Up_Default");

View file

@ -991,7 +991,9 @@ namespace MWWorld
setting.blank();
setting.mId = ESM::RefId::stringRefId(key);
setting.mValue = std::move(value);
mStatic.emplace(setting.mId, std::move(setting));
auto [iter, inserted] = mStatic.insert_or_assign(setting.mId, std::move(setting));
if (inserted)
mShared.push_back(&iter->second);
};
for (auto& [key, value] : Fallback::Map::getIntFallbackMap())
addSetting(key, ESM::Variant(value));