Esempio n. 1
0
        public static HWallItem[] Parse(HMessage packet)
        {
            int ownersCount = packet.ReadInteger();
            var owners      = new Dictionary <int, string>(ownersCount);

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

            var furniture = new HWallItem[packet.ReadInteger()];

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

                furniture[i] = furni;
            }
            return(furniture);
        }
Esempio n. 2
0
        public static HWallItem[] 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 wallItems = new HWallItem[packet.ReadInt32()];

            for (int i = 0; i < wallItems.Length; i++)
            {
                var wallItem = new HWallItem(packet);
                wallItem.OwnerName = owners[wallItem.OwnerId];

                wallItems[i] = wallItem;
            }
            return(wallItems);
        }
Esempio n. 3
0
 public void Update(HWallItem furni)
 {
     Location = furni.Location;
     State    = furni.State;
 }