public GameEventDescriptor(byte[] gameEventDescriptorData) { this.Keys = new List<GameEventDescriptorKey>(); ProtoMessage protoMessage = new ProtoMessage(gameEventDescriptorData); List<object> values; if (protoMessage.Values.TryGetValue("1", out values)) { this.ID = (int)values[0]; } if (protoMessage.Values.TryGetValue("2", out values)) { byte[] buffer = (byte[])values[0]; this.Name = Encoding.UTF8.GetString(buffer); } if (protoMessage.Values.TryGetValue("3", out values)) { for (int i = 0; i < values.Count; i++) { byte[] gameEventDescriptorKeyData = (byte[])values[i]; GameEventDescriptorKey gameEventDescriptorKey = new GameEventDescriptorKey(gameEventDescriptorKeyData); this.Keys.Add(gameEventDescriptorKey); } } }
public DataTableProperty(byte[] dataTablePropertyData) { ProtoMessage protoMessage = new ProtoMessage(dataTablePropertyData); List<Object> values; if (protoMessage.Values.TryGetValue("1", out values)) { this.Type = (DataTablePropertyType)values[0]; } if (protoMessage.Values.TryGetValue("2", out values)) { byte[] buffer = (byte[])values[0]; this.Name = Encoding.UTF8.GetString(buffer); } if (protoMessage.Values.TryGetValue("3", out values)) { this.Flags = (DataTablePropertyFlags)values[0]; } if (protoMessage.Values.TryGetValue("4", out values)) { this.Priority = (int)values[0]; } if (protoMessage.Values.TryGetValue("5", out values)) { byte[] buffer = (byte[])values[0]; this.DataTableName = Encoding.UTF8.GetString(buffer); } if (protoMessage.Values.TryGetValue("6", out values)) { this.NumberOfElements = (int)values[0]; } if (protoMessage.Values.TryGetValue("7", out values)) { this.LowValue = (float)values[0]; } if (protoMessage.Values.TryGetValue("8", out values)) { this.HighValue = (float)values[0]; } if (protoMessage.Values.TryGetValue("9", out values)) { this.NumberOfBits = (int)values[0]; } }
public GameEventKey(byte[] gameEventKeyData) { ProtoMessage protoMessage = new ProtoMessage(gameEventKeyData); List<object> values; if (protoMessage.Values.TryGetValue("1", out values)) { this.Type = (int)values[0]; } if (protoMessage.Values.TryGetValue("2", out values)) { byte[] buffer = (byte[])values[0]; this.VarString = Encoding.UTF8.GetString(buffer); } if (protoMessage.Values.TryGetValue("3", out values)) { this.VarFloat = (float)values[0]; } if (protoMessage.Values.TryGetValue("4", out values)) { this.VarLong = (long)((int)values[0]); } if (protoMessage.Values.TryGetValue("5", out values)) { this.VarShort = (short)((int)values[0]); } if (protoMessage.Values.TryGetValue("6", out values)) { this.VarByte = (byte)((int)values[0]); } if (protoMessage.Values.TryGetValue("7", out values)) { this.VarBool = (int)values[0] != 0; } if (protoMessage.Values.TryGetValue("8", out values)) { this.VarUInt64 = (ulong)values[0]; } if (protoMessage.Values.TryGetValue("9", out values)) { this.VarWString = (byte[])values[0]; } }
public CreateStringTable(byte[] createStringTableData) { ProtoMessage protoMessage = new ProtoMessage(createStringTableData); List<Object> values; if (protoMessage.Values.TryGetValue("1", out values)) { byte[] buffer = (byte[])values[0]; this.Name = Encoding.UTF8.GetString(buffer); } if (protoMessage.Values.TryGetValue("2", out values)) { this.MaxEntries = (int)values[0]; } if (protoMessage.Values.TryGetValue("3", out values)) { this.NumberOfEntries = (int)values[0]; } if (protoMessage.Values.TryGetValue("4", out values)) { this.UserDataIsFixedSize = (int)values[0] != 0; } if (protoMessage.Values.TryGetValue("5", out values)) { this.UserDataSize = (int)values[0]; } if (protoMessage.Values.TryGetValue("6", out values)) { this.UserDataSizeInBits = (int)values[0]; } if (protoMessage.Values.TryGetValue("7", out values)) { this.Flags = (int)values[0]; } if (protoMessage.Values.TryGetValue("8", out values)) { this.StringData = (byte[])values[0]; } }
public GameEventDescriptorKey(byte[] gameEventDescriptorKeyData) { ProtoMessage protoMessage = new ProtoMessage(gameEventDescriptorKeyData); List<object> values; if (protoMessage.Values.TryGetValue("1", out values)) { this.Type = (int)values[0]; } if (protoMessage.Values.TryGetValue("2", out values)) { byte[] buffer = (byte[])values[0]; this.Name = Encoding.UTF8.GetString(buffer); } }
public GameEventList(byte[] gameEventListData) { this.Descriptors = new List<GameEventDescriptor>(); ProtoMessage protoMessage = new ProtoMessage(gameEventListData); List<object> values; if (protoMessage.Values.TryGetValue("1", out values)) { for (int i = 0; i < values.Count; i++) { byte[] gameEventListDescriptorData = (byte[])values[i]; GameEventDescriptor gameEventDescriptor = new GameEventDescriptor(gameEventListDescriptorData); this.Descriptors.Add(gameEventDescriptor); } } }
public PacketEntities(byte[] packetEntitesData) { ProtoMessage protoMessage = new ProtoMessage(packetEntitesData); List<Object> values; if (protoMessage.Values.TryGetValue("1", out values)) { this.MaxEntries = (int)values[0]; } if (protoMessage.Values.TryGetValue("2", out values)) { this.UpdatedEntries = (int)values[0]; } if (protoMessage.Values.TryGetValue("3", out values)) { this.IsDelta = (int)values[0] != 0; } if (protoMessage.Values.TryGetValue("4", out values)) { this.UpdateBaseline = (int)values[0] != 0; } if (protoMessage.Values.TryGetValue("5", out values)) { this.Baseline = (int)values[0]; } if (protoMessage.Values.TryGetValue("6", out values)) { this.DeltaFrom = (int)values[0]; } if (protoMessage.Values.TryGetValue("7", out values)) { this.EntityData = (byte[])values[0]; } }
public UpdateStringTable(byte[] updateStringTableData) { ProtoMessage protoMessage = new ProtoMessage(updateStringTableData); List<Object> values; if (protoMessage.Values.TryGetValue("1", out values)) { this.TableID = (int)values[0]; } if (protoMessage.Values.TryGetValue("2", out values)) { this.NumberOfEntriesChanged = (int)values[0]; } if (protoMessage.Values.TryGetValue("3", out values)) { this.StringData = (byte[])values[0]; } }
public DataTable(int id, byte[] dataTableData) { this.ID = id; this.Properties = new List<DataTableProperty>(); ProtoMessage protoMessage = new ProtoMessage(dataTableData); List<Object> values; if (protoMessage.Values.TryGetValue("1", out values)) { this.IsEnd = (int)values[0] != 0; } if (protoMessage.Values.TryGetValue("2", out values)) { byte[] buffer = (byte[])values[0]; this.Name = Encoding.UTF8.GetString(buffer); } if (protoMessage.Values.TryGetValue("3", out values)) { this.NeedsDecoder = (int)values[0] != 0; } if (protoMessage.Values.TryGetValue("4", out values)) { for (int i = 0; i < values.Count; i++) { byte[] dataTablePropertyData = (byte[])values[i]; DataTableProperty dataTableProperty = new DataTableProperty(dataTablePropertyData); this.Properties.Add(dataTableProperty); } } }