Exemplo n.º 1
0
        public static HFloorItem[] Parse(HPacket packet)
        {
            int ownersCount = packet.ReadInt32();
            var owners = new Dictionary<int, string>(ownersCount);
            for (int i = 0; i < ownersCount; i++)
            {
                owners.Add(packet.ReadInt32(), packet.ReadUTF8());
            }

            var furniture = new HFloorItem[packet.ReadInt32()];
            for (int i = 0; i < furniture.Length; i++)
            {
                var furni = new HFloorItem(packet);
                furni.OwnerName = owners[furni.OwnerId];

                furniture[i] = furni;
            }
            return furniture;
        }
Exemplo n.º 2
0
        public static HFloorItem[] Parse(HPacket packet)
        {
            int ownersCount = packet.ReadInt32();
            var owners      = new Dictionary <int, string>(ownersCount);

            for (int i = 0; i < ownersCount; i++)
            {
                owners.Add(packet.ReadInt32(), packet.ReadUTF8());
            }

            var floorItems = new HFloorItem[packet.ReadInt32()];

            for (int i = 0; i < floorItems.Length; i++)
            {
                var floorItem = new HFloorItem(packet);
                floorItem.OwnerName = owners[floorItem.OwnerId];

                floorItems[i] = floorItem;
            }
            return(floorItems);
        }
Exemplo n.º 3
0
 public void Update(HFloorItem furni)
 {
     Tile   = furni.Tile;
     Stuff  = furni.Stuff;
     Facing = furni.Facing;
 }