mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 09:09:43 +00:00
Clarify CharacterCreation::setValue
This commit is contained in:
parent
4e05dd3cd3
commit
ed7b6dc2a7
1 changed files with 3 additions and 2 deletions
|
@ -107,9 +107,10 @@ namespace MWGui
|
|||
if (id.starts_with(prefix) && id.size() == prefix.size() + 1)
|
||||
{
|
||||
char index = id[prefix.size()];
|
||||
auto attribute = static_cast<ESM::Attribute::AttributeID>(index - '0' - 1);
|
||||
if (attribute >= ESM::Attribute::Strength && attribute < ESM::Attribute::Length)
|
||||
if (index >= '1' && index <= '8')
|
||||
{
|
||||
// Match [AttribVal1-AttribVal8] to the corresponding AttributeID values [0-7]
|
||||
auto attribute = static_cast<ESM::Attribute::AttributeID>(index - '0' - 1);
|
||||
mPlayerAttributes[attribute] = value;
|
||||
if (mReviewDialog)
|
||||
mReviewDialog->setAttribute(attribute, value);
|
||||
|
|
Loading…
Reference in a new issue