public static StringTable Create(CSVCMsg_CreateStringTable proto) { MultiFlag flags = MultiFlag.None; if ((proto.flags & (uint) MultiFlag.Precache) > 0) { flags |= MultiFlag.Precache; } if ((proto.flags & (uint) MultiFlag.What) > 0) { flags |= MultiFlag.What; } if ((proto.flags & (uint) MultiFlag.FixedLength) > 0) { flags |= MultiFlag.FixedLength; } return new StringTable(proto.name, (uint) proto.max_entries, proto.user_data_fixed_size, (uint) proto.user_data_size, (uint) proto.user_data_size_bits, flags); }
private Event? Process(CSVCMsg_CreateStringTable message) { var table = StringTable.Create(message); client.StringsIndex[message.name] = client.Strings.Count; client.Strings.Add(table); stringTableUpdater.Update(table, message.num_entries, message.string_data); log.Debug(String.Format( "CSVCMsg_CreateStringTable: name {0} with {1} bytes of data", message.name, message.string_data.Length)); return null; }