public static HItem[] Parse(HPacket packet) { packet.ReadInt32(); packet.ReadInt32(); var items = new HItem[packet.ReadInt32()]; for (int i = 0; i < items.Length; i++) { items[i] = new HItem(packet); } return(items); }
public static HItem[] Parse(HMessage packet) { int loc1 = packet.ReadInteger(); int loc2 = packet.ReadInteger(); var items = new HItem[packet.ReadInteger()]; for (int i = 0; i < items.Length; i++) { items[i] = new HItem(packet); } return(items); }
public static IReadOnlyList<HItem> Parse(HMessage packet) { packet.ReadInteger(); packet.ReadInteger(); int itemCount = packet.ReadInteger(); var itemList = new List<HItem>(itemCount); for (int i = 0; i < itemList.Capacity; i++) { packet.ReadInteger(); string s1 = packet.ReadString(); int id = packet.ReadInteger(); int typeId = packet.ReadInteger(); packet.ReadInteger(); int category = packet.ReadInteger(); HStuffData.ReadStuffData(category, packet); packet.ReadBoolean(); packet.ReadBoolean(); packet.ReadBoolean(); packet.ReadBoolean(); int secondsToExpiration = packet.ReadInteger(); bool hasRentPeriodStarted = packet.ReadBoolean(); int roomId = packet.ReadInteger(); var item = new HItem(id, typeId, category, secondsToExpiration, hasRentPeriodStarted, roomId); if (s1 == "S") { item.SlotId = packet.ReadString(); packet.ReadInteger(); } itemList.Add(item); } return itemList; }
public static IReadOnlyList <HItem> Parse(HMessage packet) { packet.ReadInteger(); packet.ReadInteger(); int itemCount = packet.ReadInteger(); var itemList = new List <HItem>(itemCount); for (int i = 0; i < itemList.Capacity; i++) { packet.ReadInteger(); string s1 = packet.ReadString(); int id = packet.ReadInteger(); int typeId = packet.ReadInteger(); packet.ReadInteger(); int category = packet.ReadInteger(); HStuffData.ReadStuffData(category, packet); packet.ReadBoolean(); packet.ReadBoolean(); packet.ReadBoolean(); packet.ReadBoolean(); int secondsToExpiration = packet.ReadInteger(); bool hasRentPeriodStarted = packet.ReadBoolean(); int roomId = packet.ReadInteger(); var item = new HItem(id, typeId, category, secondsToExpiration, hasRentPeriodStarted, roomId); if (s1 == "S") { item.SlotId = packet.ReadString(); packet.ReadInteger(); } itemList.Add(item); } return(itemList); }