예제 #1
0
 public static PlayAnimationEvent Serdes(PlayAnimationEvent e, AssetMapping mapping, ISerializer s)
 {
     if (s == null)
     {
         throw new ArgumentNullException(nameof(s));
     }
     e ??= new PlayAnimationEvent();
     e.VideoId = VideoId.SerdesU8(nameof(VideoId), e.VideoId, mapping, s);
     e.X       = s.UInt8(nameof(X), e.X);
     e.Y       = s.UInt8(nameof(Y), e.Y);
     e.Unk4    = s.UInt8(nameof(Unk4), e.Unk4);
     e.Unk5    = s.UInt8(nameof(Unk5), e.Unk5);
     e.Unk6    = s.UInt16(nameof(Unk6), e.Unk6);
     e.Unk8    = s.UInt16(nameof(Unk8), e.Unk8);
     return(e);
 }
예제 #2
0
        public static PlayAnimationEvent Serdes(PlayAnimationEvent e, AssetMapping mapping, ISerializer s)
        {
            if (s == null)
            {
                throw new ArgumentNullException(nameof(s));
            }
            e ??= new PlayAnimationEvent();
            e.VideoId = VideoId.SerdesU8(nameof(VideoId), e.VideoId, mapping, s);
            e.X       = s.UInt8(nameof(X), e.X);
            e.Y       = s.UInt8(nameof(Y), e.Y);
            e.Unk4    = s.UInt8(nameof(Unk4), e.Unk4);
            e.Unk5    = s.UInt8(nameof(Unk5), e.Unk5);
            int zeroes = s.UInt16(null, 0);

            zeroes += s.UInt16(null, 0);
            s.Assert(zeroes == 0, "PlayAnimation: Expected fields 6, 8 to be 0");
            return(e);
        }