Esempio n. 1
0
 public static void Write(this BinaryWriter writer, ItemStackData data)
 {
     writer.Write(data.ItemId);
     writer.Write(data.Count);
     writer.Write(data.SlotIndex);
     writer.Write(data.Ammo);
     writer.Write(data.Decay);
 }
Esempio n. 2
0
        public static ItemStackData ReadItemStackData(this BinaryReader reader)
        {
            ItemStackData data = new ItemStackData();

            data.ItemId    = reader.ReadInt32();
            data.Count     = reader.ReadInt32();
            data.SlotIndex = reader.ReadByte();
            data.Ammo      = reader.ReadInt32();
            data.Decay     = reader.ReadInt32();
            return(data);
        }