ace/Source/ACE.DatLoader/Entity/AnimationPartChange.cs
OptimShi dcf9e82f10 Dat fixes (#848)
* Fixed some dat reading related errors.

* Adjusted AnimationPartChange and added second implementation of Unpack

* Small fix to highres/language dat reading to handle errors cleaner

* Updated highres/language dat loading logic, removed exceptions entirely
2018-07-05 15:09:20 -05:00

22 lines
601 B
C#

using System.IO;
namespace ACE.DatLoader.Entity
{
public class AnimationPartChange : IUnpackable
{
public byte PartIndex { get; private set; }
public uint PartID { get; private set; }
public void Unpack(BinaryReader reader)
{
PartIndex = reader.ReadByte();
PartID = reader.ReadAsDataIDOfKnownType(0x01000000);
}
public void Unpack(BinaryReader reader, ushort partIndex)
{
PartIndex = (byte)(partIndex & 255);
PartID = reader.ReadAsDataIDOfKnownType(0x01000000);
}
}
}