Skip to content

Commit 32a6ed6

Browse files
committed
Merge branch 'creaturesstronk' into 'master'
Allow creatures' strength to be edited See merge request OpenMW/openmw!4448
2 parents d356fea + 7bd2f73 commit 32a6ed6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/opencs/model/world/refidadapterimp.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1287,7 +1287,7 @@ QVariant CSMWorld::CreatureAttributesRefIdAdapter::getNestedData(
12871287

12881288
if (subColIndex == 0)
12891289
return subRowIndex;
1290-
else if (subColIndex == 1 && subRowIndex > 0 && subRowIndex < ESM::Attribute::Length)
1290+
else if (subColIndex == 1 && subRowIndex >= 0 && subRowIndex < ESM::Attribute::Length)
12911291
return creature.mData.mAttributes[subRowIndex];
12921292
return QVariant(); // throw an exception here?
12931293
}
@@ -1298,7 +1298,7 @@ void CSMWorld::CreatureAttributesRefIdAdapter::setNestedData(
12981298
Record<ESM::Creature>& record
12991299
= static_cast<Record<ESM::Creature>&>(data.getRecord(RefIdData::LocalIndex(row, UniversalId::Type_Creature)));
13001300

1301-
if (subColIndex == 1 && subRowIndex > 0 && subRowIndex < ESM::Attribute::Length)
1301+
if (subColIndex == 1 && subRowIndex >= 0 && subRowIndex < ESM::Attribute::Length)
13021302
{
13031303
ESM::Creature creature = record.get();
13041304
creature.mData.mAttributes[subRowIndex] = value.toInt();

0 commit comments

Comments
 (0)