Exemple #1
0
 public static void Write(this BinaryWriter writer, Dictionary <string, uint> accountHash)
 {
     PackableHashTable.WriteHeader(writer, accountHash.Count);
     foreach (var kvp in accountHash)
     {
         writer.WriteString16L(kvp.Key);
         writer.Write(kvp.Value);
     }
 }
Exemple #2
0
 public static void Write(this BinaryWriter writer, Dictionary <ObjectGuid, SquelchInfo> characterHash)
 {
     PackableHashTable.WriteHeader(writer, characterHash.Count);
     foreach (var kvp in characterHash)
     {
         writer.Write(kvp.Key.Full);
         writer.Write(kvp.Value);
     }
 }
Exemple #3
0
 public static void Write(this BinaryWriter writer, Dictionary <ObjectGuid, GuestInfo> guests)
 {
     PackableHashTable.WriteHeader(writer, guests.Count);
     foreach (var guest in guests)
     {
         writer.Write(guest.Key.Full);
         writer.Write(guest.Value);
     }
 }
Exemple #4
0
        public static void Write(this BinaryWriter writer, Dictionary <uint, SquelchInfo> characterHash)
        {
            PackableHashTable.WriteHeader(writer, characterHash.Count, HashComparer.NumBuckets);

            var sorted = new SortedDictionary <uint, SquelchInfo>(characterHash, HashComparer);

            foreach (var kvp in sorted)
            {
                writer.Write(kvp.Key);
                writer.Write(kvp.Value);
            }
        }
Exemple #5
0
        public static void Write(this BinaryWriter writer, Dictionary <PropertyInt64, long> _properties)
        {
            PackableHashTable.WriteHeader(writer, _properties.Count, PropertyInt64Comparer.NumBuckets);

            var properties = new SortedDictionary <PropertyInt64, long>(_properties, PropertyInt64Comparer);

            foreach (var kvp in properties)
            {
                writer.Write((uint)kvp.Key);
                writer.Write(kvp.Value);
            }
        }
Exemple #6
0
        public static void Write(this BinaryWriter writer, Dictionary <ObjectGuid, uint> db)
        {
            PackableHashTable.WriteHeader(writer, db.Count, headerNumBuckets);

            var sorted = new SortedDictionary <ObjectGuid, uint>(db, guidComparer);

            foreach (var kvp in sorted)
            {
                writer.Write(kvp.Key.Full);
                writer.Write(kvp.Value);
            }
        }
Exemple #7
0
        public static void Write(this BinaryWriter writer, Dictionary <ObjectGuid, GuestInfo> guestList)
        {
            PackableHashTable.WriteHeader(writer, guestList.Count, guestComparer.NumBuckets);

            var sorted = new SortedDictionary <ObjectGuid, GuestInfo>(guestList, guestComparer);

            foreach (var kvp in sorted)
            {
                writer.Write(kvp.Key.Full);
                writer.Write(kvp.Value);
            }
        }
Exemple #8
0
        public static void Write(this BinaryWriter writer, Dictionary <ObjectGuid, AllegianceOfficerLevel> _officers)
        {
            PackableHashTable.WriteHeader(writer, _officers.Count, headerNumBuckets);

            // always sent as empty in retail?
            var officers = new SortedDictionary <ObjectGuid, AllegianceOfficerLevel>(_officers, guidComparer);

            foreach (var officer in officers)
            {
                writer.Write(officer.Key.Full);
                writer.Write((uint)officer.Value);
            }
        }
Exemple #9
0
        public static void Write(this BinaryWriter writer, Dictionary <string, uint> accountHash)
        {
            // unused in retail
            PackableHashTable.WriteHeader(writer, 0, 0);

            /*PHashTable.WriteHeader(writer, accountHash.Count);    // verify
             *
             * foreach (var kvp in accountHash)
             * {
             *  writer.WriteString16L(kvp.Key);
             *  writer.Write(kvp.Value);
             * }*/
        }