/[MorrowindCustomClothingSlotCreator]/trunk/libTES3FileFormat/PlugingClothing.cs
ViewVC logotype

Diff of /trunk/libTES3FileFormat/PlugingClothing.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/libTES3FileFormat/PlugingClothing.cs	2011/07/30 09:03:55	28
+++ trunk/libTES3FileFormat/PlugingClothing.cs	2011/07/30 09:15:16	30
@@ -116,7 +116,7 @@
 
     public interface IPlugingClothing : IParse, ICommit, IAsBytes, ISizeOffset
     {
-        List<ClothingEntry> ClothingEntries { get; }
+        Dictionary<string, ClothingEntry> ClothingEntries { get; }
     }
     public class PlugingClothing : IPlugingClothing, ICommitParseAsBytes
     {
@@ -131,7 +131,7 @@
             this.Offset = 0;
             this.Size = 0;
             this.SectionOffsets = new List<int>();
-            this.ClothingEntries = new List<ClothingEntry>();
+            this.ClothingEntries = new Dictionary<string, ClothingEntry>();
         }
         public PlugingClothing(BinaryReader br, List<int> SectionOffsets, bool ReadOnly, ConsoleLog Log)
             : this()
@@ -145,8 +145,8 @@
             this.Parse(this.reader);
         }
         #region IPlugingClothing Members
-        private List<ClothingEntry> _ClothingEntries;
-        public List<ClothingEntry> ClothingEntries
+        private Dictionary<string, ClothingEntry> _ClothingEntries;
+        public Dictionary<string, ClothingEntry> ClothingEntries
         {
             get { return _ClothingEntries; }
             private set { _ClothingEntries = value; }
@@ -274,8 +274,8 @@
                 //catch { break; }
 
                 //break;
-                this.ClothingEntries.Add(entry);
-                this.ClothingEntries.Sort(); // sorting should not cause any major issues, since each entry holds its own offset
+                this.ClothingEntries.Add(entry.CLOT_NAME, entry);
+                //this.ClothingEntries.Sort(); // sorting should not cause any major issues, since each entry holds its own offset
             }
                   
 

 

  ViewVC Help
Powered by ViewVC 1.1.22