ace/Source/ACE.DatLoader/Entity/AnimationHooks/ReplaceObjectHook.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

20 lines
702 B
C#

using System;
using System.IO;
namespace ACE.DatLoader.Entity.AnimationHooks
{
public class ReplaceObjectHook : AnimationHook
{
public AnimationPartChange APChange { get; } = new AnimationPartChange();
public override void Unpack(BinaryReader reader)
{
base.Unpack(reader);
// The structure of AnimationPartChange here is slightly different for some reason than the other imeplementations.
// So we'll read in the 2-byte PartIndex and send that to our other implementation of the Unpack function.
ushort apChangePartIndex = reader.ReadUInt16();
APChange.Unpack(reader, apChangePartIndex);
}
}
}