1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 07:19:54 +00:00

Use better initial value type. Fix exception while saving values.

This commit is contained in:
cc9cii 2015-05-10 07:49:18 +10:00
parent 5fb269336f
commit 587efcfe9d

View file

@ -551,6 +551,7 @@ namespace CSMWorld
ESM::DialInfo::SelectStruct condStruct;
condStruct.mSelectRule = "00000";
condStruct.mValue = ESM::Variant();
condStruct.mValue.setType(ESM::VT_Int); // default to ints
conditions.insert(conditions.begin()+position, condStruct);
@ -688,6 +689,7 @@ namespace CSMWorld
char condType = conditions[subRowIndex].mSelectRule[1];
switch (condType)
{
case '0': return 0; // blank space
case '1': return 1; // Function
case '2': return 2; // Global
case '3': return 3; // Local
@ -931,6 +933,7 @@ namespace CSMWorld
}
default: break;
}
break;
}
default: throw std::runtime_error("Info condition subcolumn index out of range");
}