add object property validation

This commit is contained in:
Ted John committed 2016-07-08 22:58:38 +01:00
1 parent 7e1f948e19
commit 2cade7dd13
7 files changed
+68

No files matched your search

+6
View File
@@ -41,6 +41,12 @@ void FootpathObject::ReadLegacy(IReadObjectContext * context, IStream * stream)
GetStringTable()->Read(context, stream, OBJ_STRING_ID_NAME);
GetImageTable()->Read(context, stream);
// Validate properties
if (_legacyType.var_0A > 1)
{
context->LogError(OBJECT_ERROR_INVALID_PROPERTY, "VAR_0A can not be greater than 1.");
}
}
void FootpathObject::Load()