mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 12:49:56 +00:00
Use better initial value type. Fix exception while saving values.
This commit is contained in:
parent
5fb269336f
commit
587efcfe9d
1 changed files with 3 additions and 0 deletions
|
@ -551,6 +551,7 @@ namespace CSMWorld
|
||||||
ESM::DialInfo::SelectStruct condStruct;
|
ESM::DialInfo::SelectStruct condStruct;
|
||||||
condStruct.mSelectRule = "00000";
|
condStruct.mSelectRule = "00000";
|
||||||
condStruct.mValue = ESM::Variant();
|
condStruct.mValue = ESM::Variant();
|
||||||
|
condStruct.mValue.setType(ESM::VT_Int); // default to ints
|
||||||
|
|
||||||
conditions.insert(conditions.begin()+position, condStruct);
|
conditions.insert(conditions.begin()+position, condStruct);
|
||||||
|
|
||||||
|
@ -688,6 +689,7 @@ namespace CSMWorld
|
||||||
char condType = conditions[subRowIndex].mSelectRule[1];
|
char condType = conditions[subRowIndex].mSelectRule[1];
|
||||||
switch (condType)
|
switch (condType)
|
||||||
{
|
{
|
||||||
|
case '0': return 0; // blank space
|
||||||
case '1': return 1; // Function
|
case '1': return 1; // Function
|
||||||
case '2': return 2; // Global
|
case '2': return 2; // Global
|
||||||
case '3': return 3; // Local
|
case '3': return 3; // Local
|
||||||
|
@ -931,6 +933,7 @@ namespace CSMWorld
|
||||||
}
|
}
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
default: throw std::runtime_error("Info condition subcolumn index out of range");
|
default: throw std::runtime_error("Info condition subcolumn index out of range");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue