Exemple #1
0
 public static MapChange Serdes(int i, MapChange u, ISerializer s)
 {
     u ??= new MapChange();
     s.Begin();
     u.X          = s.UInt8(nameof(X), u.X);
     u.Y          = s.UInt8(nameof(Y), u.Y);
     u.ChangeType = s.EnumU8(nameof(ChangeType), u.ChangeType);
     u.Unk3       = s.EnumU8(nameof(Unk3), u.Unk3);
     u.Value      = s.UInt16(nameof(Value), u.Value);
     u.MapId      = s.EnumU16(nameof(Overlay), u.MapId);
     s.End();
     return(u);
 }
Exemple #2
0
 public static MapChange Serdes(int i, MapChange u, AssetMapping mapping, ISerializer s)
 {
     if (s == null)
     {
         throw new ArgumentNullException(nameof(s));
     }
     u ??= new MapChange();
     u.X          = s.UInt8(nameof(X), u.X);
     u.Y          = s.UInt8(nameof(Y), u.Y);
     u.ChangeType = s.EnumU8(nameof(ChangeType), u.ChangeType);
     u.Unk3       = s.EnumU8(nameof(Unk3), u.Unk3);
     u.Value      = s.UInt16(nameof(Value), u.Value);
     u.MapId      = MapId.SerdesU16(nameof(Overlay), u.MapId, mapping, s);
     return(u);
 }