mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* 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
20 lines
702 B
C#
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);
|
|
}
|
|
}
|
|
}
|