示例#1
0
 public override void NetReceive(BinaryReader reader, bool lightReceive)
 {
     Reset();
     this.on      = reader.ReadBoolean();
     this.pickaxe = reader.ReadItem();
     this.filter  = ItemFilter.Read(reader, lightReceive);
 }
示例#2
0
        public override void NetReceive(BinaryReader reader, bool lightReceive)
        {
            this.ductType = (DuctType)reader.ReadByte();
            this.filter   = ItemFilter.Read(reader, lightReceive);

            flowItems = new List <Tuple <Item, Direction> >();
            int nFlow = reader.ReadInt32();

            for (int i = 0; i < nFlow; i++)
            {
                flowItems.Add(Tuple.Create <Item, Direction>(reader.ReadItem(), Direction.DIRECTIONS[reader.ReadInt32()]));
            }

            addItems = new List <Tuple <Item, Direction> >();
            int nAdd = reader.ReadInt32();

            for (int i = 0; i < nAdd; i++)
            {
                addItems.Add(Tuple.Create <Item, Direction>(reader.ReadItem(), Direction.DIRECTIONS[reader.ReadInt32()]));
            }

            removeItems = new List <Tuple <Item, Direction> >();
            int nRemove = reader.ReadInt32();

            for (int i = 0; i < nRemove; i++)
            {
                removeItems.Add(Tuple.Create <Item, Direction>(reader.ReadItem(), Direction.DIRECTIONS[reader.ReadInt32()]));
            }
        }