|
|
|
@ -37,7 +37,7 @@ ESM::VarType ESM::Variant::getType() const
|
|
|
|
|
return mType;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::string ESM::Variant::toString() const
|
|
|
|
|
std::string ESM::Variant::getString() const
|
|
|
|
|
{
|
|
|
|
|
if (!mData)
|
|
|
|
|
throw std::runtime_error ("can not convert empty variant to string");
|
|
|
|
@ -80,6 +80,12 @@ void ESM::Variant::read (ESMReader& esm, Format format)
|
|
|
|
|
esm.fail ("illegal global variable type " + typeId);
|
|
|
|
|
}
|
|
|
|
|
else // GMST
|
|
|
|
|
{
|
|
|
|
|
if (!esm.hasMoreSubs())
|
|
|
|
|
{
|
|
|
|
|
type = VT_None;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
esm.getSubName();
|
|
|
|
|
NAME name = esm.retSubName();
|
|
|
|
@ -99,6 +105,7 @@ void ESM::Variant::read (ESMReader& esm, Format format)
|
|
|
|
|
else
|
|
|
|
|
esm.fail ("invalid subrecord: " + name.toString());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setType (type);
|
|
|
|
|
|
|
|
|
|