コード例 #1
0
 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);
     }
 }
コード例 #2
0
 // 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);
     }
 }
コード例 #3
0
 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));
     }
 }
コード例 #4
0
        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);
            }
        }
コード例 #5
0
        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);
            }
        }