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

Diff of /trunk/libTES3FileFormat/PlugingClothing.cs

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

revision 28 by william, Sat Jul 30 09:03:55 2011 UTC revision 30 by william, Sat Jul 30 09:15:16 2011 UTC
# Line 116  namespace libTES3FileFormat Line 116  namespace libTES3FileFormat
116    
117      public interface IPlugingClothing : IParse, ICommit, IAsBytes, ISizeOffset      public interface IPlugingClothing : IParse, ICommit, IAsBytes, ISizeOffset
118      {      {
119          List<ClothingEntry> ClothingEntries { get; }          Dictionary<string, ClothingEntry> ClothingEntries { get; }
120      }      }
121      public class PlugingClothing : IPlugingClothing, ICommitParseAsBytes      public class PlugingClothing : IPlugingClothing, ICommitParseAsBytes
122      {      {
# Line 131  namespace libTES3FileFormat Line 131  namespace libTES3FileFormat
131              this.Offset = 0;              this.Offset = 0;
132              this.Size = 0;              this.Size = 0;
133              this.SectionOffsets = new List<int>();              this.SectionOffsets = new List<int>();
134              this.ClothingEntries = new List<ClothingEntry>();              this.ClothingEntries = new Dictionary<string, ClothingEntry>();
135          }          }
136          public PlugingClothing(BinaryReader br, List<int> SectionOffsets, bool ReadOnly, ConsoleLog Log)          public PlugingClothing(BinaryReader br, List<int> SectionOffsets, bool ReadOnly, ConsoleLog Log)
137              : this()              : this()
# Line 145  namespace libTES3FileFormat Line 145  namespace libTES3FileFormat
145              this.Parse(this.reader);              this.Parse(this.reader);
146          }          }
147          #region IPlugingClothing Members          #region IPlugingClothing Members
148          private List<ClothingEntry> _ClothingEntries;          private Dictionary<string, ClothingEntry> _ClothingEntries;
149          public List<ClothingEntry> ClothingEntries          public Dictionary<string, ClothingEntry> ClothingEntries
150          {          {
151              get { return _ClothingEntries; }              get { return _ClothingEntries; }
152              private set { _ClothingEntries = value; }              private set { _ClothingEntries = value; }
# Line 274  namespace libTES3FileFormat Line 274  namespace libTES3FileFormat
274                  //catch { break; }                  //catch { break; }
275    
276                  //break;                  //break;
277                  this.ClothingEntries.Add(entry);                  this.ClothingEntries.Add(entry.CLOT_NAME, entry);
278                  this.ClothingEntries.Sort(); // sorting should not cause any major issues, since each entry holds its own offset                  //this.ClothingEntries.Sort(); // sorting should not cause any major issues, since each entry holds its own offset
279              }              }
280                                        
281    

Legend:
Removed from v.28  
changed lines
  Added in v.30

  ViewVC Help
Powered by ViewVC 1.1.22