Fix villager saving

This commit is contained in:
Cuyler36 2019-02-19 16:28:08 -05:00
parent badf6435be
commit 1cdd0fd321

View file

@ -211,6 +211,18 @@ public void Write(string townName)
AcString.GetBytes(dataObject,
(int) villagerOffsetData.GetField(field.Name + "Size").GetValue(Offsets)));
}
else if (fieldType == typeof(byte))
{
_saveData.Write(dataOffset, (byte)dataObject);
}
else if (fieldType == typeof(ushort))
{
_saveData.Write(dataOffset, (ushort)dataObject, _saveData.IsBigEndian);
}
else if (fieldType == typeof(uint))
{
_saveData.Write(dataOffset, (uint)dataObject, _saveData.IsBigEndian);
}
else if (fieldType == typeof(byte[]))
{
_saveData.Write(dataOffset, dataObject, false);