mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
actor.ActiveEffects and actor.ActiveSpells
This commit is contained in:
parent
55b2ce4a09
commit
7ba43c9426
8 changed files with 289 additions and 48 deletions
|
@ -1,4 +1,5 @@
|
|||
#include "attr.hpp"
|
||||
#include <components/misc/strings/algorithm.hpp>
|
||||
|
||||
using namespace ESM;
|
||||
|
||||
|
@ -56,3 +57,12 @@ const std::string Attribute::sAttributeIcons[Attribute::Length] = {
|
|||
"icons\\k\\attribute_personality.dds",
|
||||
"icons\\k\\attribute_luck.dds",
|
||||
};
|
||||
|
||||
Attribute::AttributeID Attribute::stringToAttributeId(std::string_view attribute)
|
||||
{
|
||||
for (auto id : ESM::Attribute::sAttributeIds)
|
||||
if (Misc::StringUtils::ciEqual(ESM::Attribute::sAttributeNames[id], attribute))
|
||||
return id;
|
||||
|
||||
throw std::logic_error("No such attribute: " + std::string(attribute));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue