public static void Write(this BinaryWriter writer, Dictionary <ObjectGuid, uint> db) { PHashTable.WriteHeader(writer, db.Count); foreach (var entry in db) { writer.Write(entry.Key.Full); writer.Write(entry.Value); } }
// TODO: generics public static void Write(this BinaryWriter writer, Dictionary <PropertyInt, int> properties) { PHashTable.WriteHeader(writer, properties.Count); foreach (var kvp in properties) { writer.Write((uint)kvp.Key); writer.Write(kvp.Value); } }
public static void Write(this BinaryWriter writer, Dictionary <PropertyBool, bool> properties) { PHashTable.WriteHeader(writer, properties.Count); foreach (var kvp in properties) { writer.Write((uint)kvp.Key); writer.Write(Convert.ToUInt32(kvp.Value)); } }
public static void Write(this BinaryWriter writer, Dictionary <ObjectGuid, AllegianceOfficerLevel> officers) { PHashTable.WriteHeader(writer, officers.Count); foreach (var officer in officers) { writer.Write(officer.Key.Full); writer.Write((uint)officer.Value); } }
public static void Write(this BinaryWriter writer, Dictionary <PropertyDataId, uint> _properties) { var properties = new SortedDictionary <PropertyDataId, uint>(_properties); PHashTable.WriteHeader(writer, properties.Count); foreach (var kvp in properties) { writer.Write((uint)kvp.Key); writer.Write(kvp.Value); } }