Merge branch 'clickbait' into 'master'

Resolve Attribute GMSTs

See merge request OpenMW/openmw!3090
macos_ci
psi29a 2 years ago
commit 0bb652d7ce

@ -89,10 +89,7 @@ namespace MWGui
if (effect->mData.mFlags & ESM::MagicEffect::TargetAttribute) if (effect->mData.mFlags & ESM::MagicEffect::TargetAttribute)
{ {
const ESM::Attribute* attribute = store->get<ESM::Attribute>().find(effectInfo.mKey.mArg); const ESM::Attribute* attribute = store->get<ESM::Attribute>().find(effectInfo.mKey.mArg);
sourcesDescription += " ("; sourcesDescription += " (" + attribute->mName + ')';
sourcesDescription
+= MWBase::Environment::get().getWindowManager()->getGameSettingString(attribute->mName, {});
sourcesDescription += ')';
} }
ESM::MagicEffect::MagnitudeDisplayType displayType = effect->getMagnitudeDisplayType(); ESM::MagicEffect::MagnitudeDisplayType displayType = effect->getMagnitudeDisplayType();
if (displayType == ESM::MagicEffect::MDT_TimesInt) if (displayType == ESM::MagicEffect::MDT_TimesInt)

@ -342,7 +342,6 @@ namespace MWGui
const MWMechanics::NpcStats& PCstats = player.getClass().getNpcStats(player); const MWMechanics::NpcStats& PCstats = player.getClass().getNpcStats(player);
const auto& store = MWBase::Environment::get().getESMStore(); const auto& store = MWBase::Environment::get().getESMStore();
std::string detailText;
std::stringstream detail; std::stringstream detail;
bool first = true; bool first = true;
for (const auto& attribute : store->get<ESM::Attribute>()) for (const auto& attribute : store->get<ESM::Attribute>())
@ -353,12 +352,11 @@ namespace MWGui
{ {
if (!first) if (!first)
detail << '\n'; detail << '\n';
detail << "#{" << MyGUI::TextIterator::toTagsString(attribute.mName) << "} x" detail << attribute.mName << " x" << MyGUI::utility::toString(mult);
<< MyGUI::utility::toString(mult);
first = false; first = false;
} }
} }
detailText = MyGUI::LanguageManager::getInstance().replaceTags(detail.str()); std::string detailText = detail.str();
// level progress // level progress
MyGUI::Widget* levelWidget; MyGUI::Widget* levelWidget;
@ -514,8 +512,6 @@ namespace MWGui
const ESM::Skill* skill = esmStore.get<ESM::Skill>().find(skillId); const ESM::Skill* skill = esmStore.get<ESM::Skill>().find(skillId);
std::string icon = "icons\\k\\" + ESM::Skill::sIconNames[skillId];
const ESM::Attribute* attr = esmStore.get<ESM::Attribute>().find(skill->mData.mAttribute); const ESM::Attribute* attr = esmStore.get<ESM::Attribute>().find(skill->mData.mAttribute);
std::pair<MyGUI::TextBox*, MyGUI::TextBox*> widgets std::pair<MyGUI::TextBox*, MyGUI::TextBox*> widgets
@ -530,9 +526,9 @@ namespace MWGui
"Caption_SkillName", MyGUI::TextIterator::toTagsString(skill->mName)); "Caption_SkillName", MyGUI::TextIterator::toTagsString(skill->mName));
mSkillWidgets[mSkillWidgets.size() - 1 - i]->setUserString( mSkillWidgets[mSkillWidgets.size() - 1 - i]->setUserString(
"Caption_SkillDescription", skill->mDescription); "Caption_SkillDescription", skill->mDescription);
mSkillWidgets[mSkillWidgets.size() - 1 - i]->setUserString( mSkillWidgets[mSkillWidgets.size() - 1 - i]->setUserString("Caption_SkillAttribute",
"Caption_SkillAttribute", "#{sGoverningAttribute}: #{" + attr->mName + "}"); "#{sGoverningAttribute}: " + MyGUI::TextIterator::toTagsString(attr->mName));
mSkillWidgets[mSkillWidgets.size() - 1 - i]->setUserString("ImageTexture_SkillImage", icon); mSkillWidgets[mSkillWidgets.size() - 1 - i]->setUserString("ImageTexture_SkillImage", skill->mIcon);
mSkillWidgets[mSkillWidgets.size() - 1 - i]->setUserString("Range_SkillProgress", "100"); mSkillWidgets[mSkillWidgets.size() - 1 - i]->setUserString("Range_SkillProgress", "100");
} }
@ -634,9 +630,10 @@ namespace MWGui
const ESM::Attribute* attr1 = store.get<ESM::Attribute>().find(faction->mData.mAttribute[0]); const ESM::Attribute* attr1 = store.get<ESM::Attribute>().find(faction->mData.mAttribute[0]);
const ESM::Attribute* attr2 = store.get<ESM::Attribute>().find(faction->mData.mAttribute[1]); const ESM::Attribute* attr2 = store.get<ESM::Attribute>().find(faction->mData.mAttribute[1]);
text += "\n#{fontcolourhtml=normal}#{" + attr1->mName text += "\n#{fontcolourhtml=normal}" + MyGUI::TextIterator::toTagsString(attr1->mName) + ": "
+ "}: " + MyGUI::utility::toString(rankData.mAttribute1) + ", #{" + attr2->mName + MyGUI::utility::toString(rankData.mAttribute1) + ", "
+ "}: " + MyGUI::utility::toString(rankData.mAttribute2); + MyGUI::TextIterator::toTagsString(attr2->mName) + ": "
+ MyGUI::utility::toString(rankData.mAttribute2);
text += "\n\n#{fontcolourhtml=header}#{sFavoriteSkills}"; text += "\n\n#{fontcolourhtml=header}#{sFavoriteSkills}";
text += "\n#{fontcolourhtml=normal}"; text += "\n#{fontcolourhtml=normal}";

@ -814,14 +814,13 @@ namespace MWGui
const ESM::Skill* skill = store.get<ESM::Skill>().find(skillId); const ESM::Skill* skill = store.get<ESM::Skill>().find(skillId);
const ESM::Attribute* attr = store.get<ESM::Attribute>().find(skill->mData.mAttribute); const ESM::Attribute* attr = store.get<ESM::Attribute>().find(skill->mData.mAttribute);
std::string icon = "icons\\k\\" + ESM::Skill::sIconNames[skillId];
widget->setUserString("ToolTipType", "Layout"); widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "SkillNoProgressToolTip"); widget->setUserString("ToolTipLayout", "SkillNoProgressToolTip");
widget->setUserString("Caption_SkillNoProgressName", MyGUI::TextIterator::toTagsString(skill->mName)); widget->setUserString("Caption_SkillNoProgressName", MyGUI::TextIterator::toTagsString(skill->mName));
widget->setUserString("Caption_SkillNoProgressDescription", skill->mDescription); widget->setUserString("Caption_SkillNoProgressDescription", skill->mDescription);
widget->setUserString("Caption_SkillNoProgressAttribute", "#{sGoverningAttribute}: #{" + attr->mName + "}"); widget->setUserString("Caption_SkillNoProgressAttribute",
widget->setUserString("ImageTexture_SkillNoProgressImage", icon); "#{sGoverningAttribute}: " + MyGUI::TextIterator::toTagsString(attr->mName));
widget->setUserString("ImageTexture_SkillNoProgressImage", skill->mIcon);
} }
void ToolTips::createAttributeToolTip(MyGUI::Widget* widget, int attributeId) void ToolTips::createAttributeToolTip(MyGUI::Widget* widget, int attributeId)
@ -831,15 +830,12 @@ namespace MWGui
if (!attribute) if (!attribute)
return; return;
const std::string& icon = attribute->mIcon;
const std::string& name = attribute->mName;
const std::string& desc = attribute->mDescription;
widget->setUserString("ToolTipType", "Layout"); widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "AttributeToolTip"); widget->setUserString("ToolTipLayout", "AttributeToolTip");
widget->setUserString("Caption_AttributeName", "#{" + name + "}"); widget->setUserString("Caption_AttributeName", MyGUI::TextIterator::toTagsString(attribute->mName));
widget->setUserString("Caption_AttributeDescription", "#{" + desc + "}"); widget->setUserString(
widget->setUserString("ImageTexture_AttributeImage", icon); "Caption_AttributeDescription", MyGUI::TextIterator::toTagsString(attribute->mDescription));
widget->setUserString("ImageTexture_AttributeImage", attribute->mIcon);
} }
void ToolTips::createSpecializationToolTip(MyGUI::Widget* widget, const std::string& name, int specId) void ToolTips::createSpecializationToolTip(MyGUI::Widget* widget, const std::string& name, int specId)

@ -279,7 +279,7 @@ namespace MWMechanics
else if (targetsAttribute) else if (targetsAttribute)
{ {
spellLine += ' '; spellLine += ' ';
spellLine += windowManager->getGameSettingString(attribute->mName, {}); spellLine += attribute->mName;
} }
return spellLine; return spellLine;
} }

@ -1924,11 +1924,11 @@ namespace MWMechanics
void MechanicsManager::applyWerewolfAcrobatics(const MWWorld::Ptr& actor) void MechanicsManager::applyWerewolfAcrobatics(const MWWorld::Ptr& actor)
{ {
const MWWorld::Store<ESM::GameSetting>& gmst const ESM::Skill* acrobatics
= MWBase::Environment::get().getESMStore()->get<ESM::GameSetting>(); = MWBase::Environment::get().getESMStore()->get<ESM::Skill>().find(ESM::Skill::Acrobatics);
MWMechanics::NpcStats& stats = actor.getClass().getNpcStats(actor); MWMechanics::NpcStats& stats = actor.getClass().getNpcStats(actor);
auto& skill = stats.getSkill(ESM::Skill::Acrobatics); auto& skill = stats.getSkill(acrobatics->mIndex);
skill.setModifier(gmst.find("fWerewolfAcrobatics")->mValue.getFloat() - skill.getModified()); skill.setModifier(acrobatics->mWerewolfValue - skill.getModified());
} }
void MechanicsManager::cleanupSummonedCreature(const MWWorld::Ptr& caster, int creatureActorId) void MechanicsManager::cleanupSummonedCreature(const MWWorld::Ptr& caster, int creatureActorId)

@ -449,7 +449,7 @@ namespace MWWorld
getWritable<ESM::Skill>().setUp(get<ESM::GameSetting>()); getWritable<ESM::Skill>().setUp(get<ESM::GameSetting>());
getWritable<ESM::MagicEffect>().setUp(); getWritable<ESM::MagicEffect>().setUp();
getWritable<ESM::Attribute>().setUp(); getWritable<ESM::Attribute>().setUp(get<ESM::GameSetting>());
getWritable<ESM4::Land>().updateLandPositions(get<ESM4::Cell>()); getWritable<ESM4::Land>().updateLandPositions(get<ESM4::Cell>());
getWritable<ESM4::Reference>().preprocessReferences(get<ESM4::Cell>()); getWritable<ESM4::Reference>().preprocessReferences(get<ESM4::Cell>());
} }

@ -99,22 +99,18 @@ namespace MWWorld
for (const auto& attribute : store->get<ESM::Attribute>()) for (const auto& attribute : store->get<ESM::Attribute>())
{ {
MWMechanics::AttributeValue value = npcStats.getAttribute(attribute.mId); MWMechanics::AttributeValue value = npcStats.getAttribute(attribute.mId);
value.setModifier(gmst.find(attribute.mWerewolfGMST)->mValue.getFloat() - value.getModified()); value.setModifier(attribute.mWerewolfValue - value.getModified());
npcStats.setAttribute(attribute.mId, value); npcStats.setAttribute(attribute.mId, value);
} }
for (size_t i = 0; i < ESM::Skill::Length; i++) for (const auto& [_, skill] : store->get<ESM::Skill>())
{ {
// Acrobatics is set separately for some reason. // Acrobatics is set separately for some reason.
if (i == ESM::Skill::Acrobatics) if (skill.mIndex == ESM::Skill::Acrobatics)
continue; continue;
// "Mercantile"! >_< MWMechanics::SkillValue& value = npcStats.getSkill(skill.mIndex);
std::string name = "fWerewolf" value.setModifier(skill.mWerewolfValue - value.getModified());
+ ((i == ESM::Skill::Mercantile) ? std::string("Merchantile") : ESM::Skill::sSkillNames[i]);
MWMechanics::SkillValue& value = npcStats.getSkill(i);
value.setModifier(gmst.find(name)->mValue.getFloat() - value.getModified());
} }
} }

@ -31,6 +31,22 @@ namespace
} }
return false; return false;
} }
std::string_view getGMSTString(const MWWorld::Store<ESM::GameSetting>& settings, std::string_view id)
{
const ESM::GameSetting* setting = settings.search(id);
if (setting && setting->mValue.getType() == ESM::VT_String)
return setting->mValue.getString();
return id;
}
float getGMSTFloat(const MWWorld::Store<ESM::GameSetting>& settings, std::string_view id)
{
const ESM::GameSetting* setting = settings.search(id);
if (setting && (setting->mValue.getType() == ESM::VT_Float || setting->mValue.getType() == ESM::VT_Int))
return setting->mValue.getFloat();
return {};
}
} }
namespace MWWorld namespace MWWorld
@ -901,36 +917,37 @@ namespace MWWorld
Store<ESM::Skill>::Store() {} Store<ESM::Skill>::Store() {}
void Store<ESM::Skill>::setUp(const MWWorld::Store<ESM::GameSetting> settings) void Store<ESM::Skill>::setUp(const MWWorld::Store<ESM::GameSetting>& settings)
{ {
constexpr std::string_view skillNameIds[ESM::Skill::Length] = { constexpr std::string_view skillValues[ESM::Skill::Length][3] = {
"sSkillBlock", { "sSkillBlock", "icons\\k\\combat_block.dds", "fWerewolfBlock" },
"sSkillArmorer", { "sSkillArmorer", "icons\\k\\combat_armor.dds", "fWerewolfArmorer" },
"sSkillMediumarmor", { "sSkillMediumarmor", "icons\\k\\combat_mediumarmor.dds", "fWerewolfMediumarmor" },
"sSkillHeavyarmor", { "sSkillHeavyarmor", "icons\\k\\combat_heavyarmor.dds", "fWerewolfHeavyarmor" },
"sSkillBluntweapon", { "sSkillBluntweapon", "icons\\k\\combat_blunt.dds", "fWerewolfBluntweapon" },
"sSkillLongblade", { "sSkillLongblade", "icons\\k\\combat_longblade.dds", "fWerewolfLongblade" },
"sSkillAxe", { "sSkillAxe", "icons\\k\\combat_axe.dds", "fWerewolfAxe" },
"sSkillSpear", { "sSkillSpear", "icons\\k\\combat_spear.dds", "fWerewolfSpear" },
"sSkillAthletics", { "sSkillAthletics", "icons\\k\\combat_athletics.dds", "fWerewolfAthletics" },
"sSkillEnchant", { "sSkillEnchant", "icons\\k\\magic_enchant.dds", "fWerewolfEnchant" },
"sSkillDestruction", { "sSkillDestruction", "icons\\k\\magic_destruction.dds", "fWerewolfDestruction" },
"sSkillAlteration", { "sSkillAlteration", "icons\\k\\magic_alteration.dds", "fWerewolfAlteration" },
"sSkillIllusion", { "sSkillIllusion", "icons\\k\\magic_illusion.dds", "fWerewolfIllusion" },
"sSkillConjuration", { "sSkillConjuration", "icons\\k\\magic_conjuration.dds", "fWerewolfConjuration" },
"sSkillMysticism", { "sSkillMysticism", "icons\\k\\magic_mysticism.dds", "fWerewolfMysticism" },
"sSkillRestoration", { "sSkillRestoration", "icons\\k\\magic_restoration.dds", "fWerewolfRestoration" },
"sSkillAlchemy", { "sSkillAlchemy", "icons\\k\\magic_alchemy.dds", "fWerewolfAlchemy" },
"sSkillUnarmored", { "sSkillUnarmored", "icons\\k\\magic_unarmored.dds", "fWerewolfUnarmored" },
"sSkillSecurity", { "sSkillSecurity", "icons\\k\\stealth_security.dds", "fWerewolfSecurity" },
"sSkillSneak", { "sSkillSneak", "icons\\k\\stealth_sneak.dds", "fWerewolfSneak" },
"sSkillAcrobatics", { "sSkillAcrobatics", "icons\\k\\stealth_acrobatics.dds", "fWerewolfAcrobatics" },
"sSkillLightarmor", { "sSkillLightarmor", "icons\\k\\stealth_lightarmor.dds", "fWerewolfLightarmor" },
"sSkillShortblade", { "sSkillShortblade", "icons\\k\\stealth_shortblade.dds", "fWerewolfShortblade" },
"sSkillMarksman", { "sSkillMarksman", "icons\\k\\stealth_marksman.dds", "fWerewolfMarksman" },
"sSkillMercantile", // "Mercantile"! >_<
"sSkillSpeechcraft", { "sSkillMercantile", "icons\\k\\stealth_mercantile.dds", "fWerewolfMerchantile" },
"sSkillHandtohand", { "sSkillSpeechcraft", "icons\\k\\stealth_speechcraft.dds", "fWerewolfSpeechcraft" },
{ "sSkillHandtohand", "icons\\k\\stealth_handtohand.dds", "fWerewolfHandtohand" },
}; };
for (int i = 0; i < ESM::Skill::Length; ++i) for (int i = 0; i < ESM::Skill::Length; ++i)
{ {
@ -938,12 +955,9 @@ namespace MWWorld
if (found != mStatic.end()) if (found != mStatic.end())
{ {
ESM::Skill& skill = found->second; ESM::Skill& skill = found->second;
std::string_view id = skillNameIds[i]; skill.mName = getGMSTString(settings, skillValues[i][0]);
const ESM::GameSetting* setting = settings.search(id); skill.mIcon = skillValues[i][1];
if (setting && setting->mValue.getType() == ESM::VT_String) skill.mWerewolfValue = getGMSTFloat(settings, skillValues[i][2]);
skill.mName = setting->mValue.getString();
else
skill.mName = id;
} }
} }
} }
@ -996,49 +1010,51 @@ namespace MWWorld
} }
return ptr; return ptr;
} }
void Store<ESM::Attribute>::setUp() void Store<ESM::Attribute>::setUp(const MWWorld::Store<ESM::GameSetting>& settings)
{ {
// TODO remove after !3084 gets merged
mStatic.clear();
mStatic.push_back({ .mId = ESM::Attribute::Strength, mStatic.push_back({ .mId = ESM::Attribute::Strength,
.mName = "sAttributeStrength", .mName = std::string{ getGMSTString(settings, "sAttributeStrength") },
.mDescription = "sStrDesc", .mDescription = std::string{ getGMSTString(settings, "sStrDesc") },
.mIcon = "icons\\k\\attribute_strength.dds", .mIcon = "icons\\k\\attribute_strength.dds",
.mWerewolfGMST = "fWerewolfStrength" }); .mWerewolfValue = getGMSTFloat(settings, "fWerewolfStrength") });
mStatic.push_back({ .mId = ESM::Attribute::Intelligence, mStatic.push_back({ .mId = ESM::Attribute::Intelligence,
.mName = "sAttributeIntelligence", .mName = std::string{ getGMSTString(settings, "sAttributeIntelligence") },
.mDescription = "sIntDesc", .mDescription = std::string{ getGMSTString(settings, "sIntDesc") },
.mIcon = "icons\\k\\attribute_int.dds", .mIcon = "icons\\k\\attribute_int.dds",
// Oh, Bethesda. It's "Intelligence". // Oh, Bethesda. It's "Intelligence".
.mWerewolfGMST = "fWerewolfIntellegence" }); .mWerewolfValue = getGMSTFloat(settings, "fWerewolfIntellegence") });
mStatic.push_back({ .mId = ESM::Attribute::Willpower, mStatic.push_back({ .mId = ESM::Attribute::Willpower,
.mName = "sAttributeWillpower", .mName = std::string{ getGMSTString(settings, "sAttributeWillpower") },
.mDescription = "sWilDesc", .mDescription = std::string{ getGMSTString(settings, "sWilDesc") },
.mIcon = "icons\\k\\attribute_wilpower.dds", .mIcon = "icons\\k\\attribute_wilpower.dds",
.mWerewolfGMST = "fWerewolfWillpower" }); .mWerewolfValue = getGMSTFloat(settings, "fWerewolfWillpower") });
mStatic.push_back({ .mId = ESM::Attribute::Agility, mStatic.push_back({ .mId = ESM::Attribute::Agility,
.mName = "sAttributeAgility", .mName = std::string{ getGMSTString(settings, "sAttributeAgility") },
.mDescription = "sAgiDesc", .mDescription = std::string{ getGMSTString(settings, "sAgiDesc") },
.mIcon = "icons\\k\\attribute_agility.dds", .mIcon = "icons\\k\\attribute_agility.dds",
.mWerewolfGMST = "fWerewolfAgility" }); .mWerewolfValue = getGMSTFloat(settings, "fWerewolfAgility") });
mStatic.push_back({ .mId = ESM::Attribute::Speed, mStatic.push_back({ .mId = ESM::Attribute::Speed,
.mName = "sAttributeSpeed", .mName = std::string{ getGMSTString(settings, "sAttributeSpeed") },
.mDescription = "sSpdDesc", .mDescription = std::string{ getGMSTString(settings, "sSpdDesc") },
.mIcon = "icons\\k\\attribute_speed.dds", .mIcon = "icons\\k\\attribute_speed.dds",
.mWerewolfGMST = "fWerewolfSpeed" }); .mWerewolfValue = getGMSTFloat(settings, "fWerewolfSpeed") });
mStatic.push_back({ .mId = ESM::Attribute::Endurance, mStatic.push_back({ .mId = ESM::Attribute::Endurance,
.mName = "sAttributeEndurance", .mName = std::string{ getGMSTString(settings, "sAttributeEndurance") },
.mDescription = "sEndDesc", .mDescription = std::string{ getGMSTString(settings, "sEndDesc") },
.mIcon = "icons\\k\\attribute_endurance.dds", .mIcon = "icons\\k\\attribute_endurance.dds",
.mWerewolfGMST = "fWerewolfEndurance" }); .mWerewolfValue = getGMSTFloat(settings, "fWerewolfEndurance") });
mStatic.push_back({ .mId = ESM::Attribute::Personality, mStatic.push_back({ .mId = ESM::Attribute::Personality,
.mName = "sAttributePersonality", .mName = std::string{ getGMSTString(settings, "sAttributePersonality") },
.mDescription = "sPerDesc", .mDescription = std::string{ getGMSTString(settings, "sPerDesc") },
.mIcon = "icons\\k\\attribute_personality.dds", .mIcon = "icons\\k\\attribute_personality.dds",
.mWerewolfGMST = "fWerewolfPersonality" }); .mWerewolfValue = getGMSTFloat(settings, "fWerewolfPersonality") });
mStatic.push_back({ .mId = ESM::Attribute::Luck, mStatic.push_back({ .mId = ESM::Attribute::Luck,
.mName = "sAttributeLuck", .mName = std::string{ getGMSTString(settings, "sAttributeLuck") },
.mDescription = "sLucDesc", .mDescription = std::string{ getGMSTString(settings, "sLucDesc") },
.mIcon = "icons\\k\\attribute_luck.dds", .mIcon = "icons\\k\\attribute_luck.dds",
.mWerewolfGMST = "fWerewolfLuck" }); .mWerewolfValue = getGMSTFloat(settings, "fWerewolfLuck") });
} }
size_t Store<ESM::Attribute>::getSize() const size_t Store<ESM::Attribute>::getSize() const
{ {

@ -473,7 +473,7 @@ namespace MWWorld
public: public:
Store(); Store();
void setUp(const MWWorld::Store<ESM::GameSetting> settings); void setUp(const MWWorld::Store<ESM::GameSetting>& settings);
}; };
template <> template <>
@ -498,7 +498,7 @@ namespace MWWorld
// calls `search` and throws an exception if not found // calls `search` and throws an exception if not found
const ESM::Attribute* find(size_t index) const; const ESM::Attribute* find(size_t index) const;
void setUp(); void setUp(const MWWorld::Store<ESM::GameSetting>& settings);
size_t getSize() const; size_t getSize() const;
iterator begin() const; iterator begin() const;

@ -26,7 +26,8 @@ namespace ESM
}; };
AttributeID mId; AttributeID mId;
std::string mName, mDescription, mIcon, mWerewolfGMST; std::string mName, mDescription, mIcon;
float mWerewolfValue{};
static const std::string sAttributeNames[Length]; static const std::string sAttributeNames[Length];

@ -36,35 +36,6 @@ namespace ESM
"Speechcraft", "Speechcraft",
"Handtohand", "Handtohand",
}; };
const std::string Skill::sIconNames[Length] = {
"combat_block.dds",
"combat_armor.dds",
"combat_mediumarmor.dds",
"combat_heavyarmor.dds",
"combat_blunt.dds",
"combat_longblade.dds",
"combat_axe.dds",
"combat_spear.dds",
"combat_athletics.dds",
"magic_enchant.dds",
"magic_destruction.dds",
"magic_alteration.dds",
"magic_illusion.dds",
"magic_conjuration.dds",
"magic_mysticism.dds",
"magic_restoration.dds",
"magic_alchemy.dds",
"magic_unarmored.dds",
"stealth_security.dds",
"stealth_sneak.dds",
"stealth_acrobatics.dds",
"stealth_lightarmor.dds",
"stealth_shortblade.dds",
"stealth_marksman.dds",
"stealth_mercantile.dds",
"stealth_speechcraft.dds",
"stealth_handtohand.dds",
};
Skill::SkillEnum Skill::stringToSkillId(std::string_view skill) Skill::SkillEnum Skill::stringToSkillId(std::string_view skill)
{ {

@ -45,6 +45,8 @@ namespace ESM
std::string mDescription; std::string mDescription;
std::string mName; std::string mName;
std::string mIcon;
float mWerewolfValue{};
enum SkillEnum enum SkillEnum
{ {
@ -78,7 +80,6 @@ namespace ESM
Length Length
}; };
static const std::string sSkillNames[Length]; static const std::string sSkillNames[Length];
static const std::string sIconNames[Length];
static SkillEnum stringToSkillId(std::string_view skill); static SkillEnum stringToSkillId(std::string_view skill);

Loading…
Cancel
Save