public HChatlineData(HMessage packet) { Timestamp = packet.ReadUTF8(); Id = packet.ReadInt32(); Username = packet.ReadUTF8(); Message = packet.ReadUTF8(); IsHighlighted = packet.ReadBoolean(); }
public HChatRecordData(HMessage packet) { object ReadContextValue(HMessage anotherMessage) { switch (anotherMessage.ReadShort()) { case 0: return(anotherMessage.ReadBoolean()); case 1: return(anotherMessage.ReadInt32()); case 2: return(anotherMessage.ReadUTF8()); default: throw new System.Exception("Nothing"); } } Type = (HChatRecordType)packet.ReadBytes(1)[0]; int entryCount = packet.ReadShort(); Context = new Dictionary <string, object>(entryCount); for (int i = 0; i < entryCount; i++) { Context.Add(packet.ReadUTF8(), ReadContextValue(packet)); } Chatlogs = new List <HChatlineData>(packet.ReadShort()); for (int i = 0; i < Chatlogs.Capacity; i++) { Chatlogs.Add(new HChatlineData(packet)); } }
public static HCatalogNode Parse(HMessage packet) { var root = new HCatalogNode(packet); bool newAdditionsAvailable = packet.ReadBoolean(); string catalogType = packet.ReadUTF8(); return(root); }
public HCatalogNode(HMessage packet) { Visible = packet.ReadBoolean(); Icon = packet.ReadInt32(); PageId = packet.ReadInt32(); PageName = packet.ReadUTF8(); Localization = packet.ReadUTF8(); OfferIds = new int[packet.ReadInt32()]; for (int i = 0; i < OfferIds.Length; i++) { OfferIds[i] = packet.ReadInt32(); } Children = new HCatalogNode[packet.ReadInt32()]; for (int i = 0; i < Children.Length; i++) { Children[i] = new HCatalogNode(packet); } }
public static List <HWallItem> BobbaParser(HMessage packet) { int ownersCount = packet.ReadInt32(); for (int i = 0; i < ownersCount; i++) { packet.ReadInt32(); packet.ReadUTF8(); } var wallItems = new HWallItem[packet.ReadInt32()]; for (int i = 0; i < wallItems.Length; i++) { wallItems[i] = new HWallItem(packet); } return(wallItems.ToList()); }