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); }
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); }
public void Update(HWallItem furni) { Location = furni.Location; State = furni.State; }