Skip to content

Commit

Permalink
Temporarly fixing item saving
Browse files Browse the repository at this point in the history
  • Loading branch information
Xeeynamo committed Nov 16, 2019
1 parent 7ccb547 commit 0718773
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions OpenKh.Tools.Kh2SystemEditor/ViewModels/ItemViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public ushort DescriptionId
private const string entryName = "item";
private readonly IMessageProvider _messageProvider;
private string _searchTerm;
private List<Item.Stat> _item2;

public ItemViewModel(IMessageProvider messageProvider, IEnumerable<Bar.Entry> entries) :
this(messageProvider, Item.Read(entries.GetBinaryStream(entryName)))
Expand All @@ -87,7 +88,9 @@ public ItemViewModel(IMessageProvider messageProvider) :

private ItemViewModel(IMessageProvider messageProvider, Item item) :
this(messageProvider, item.Items1)
{ }
{
_item2 = item.Items2;
}

private ItemViewModel(IMessageProvider messageProvider, IEnumerable<Item.Entry> items) :
base(items.Select(item => new Entry(messageProvider, item)))
Expand Down Expand Up @@ -117,7 +120,7 @@ public Stream CreateStream()
new Item
{
Items1 = this.Select(x => x.Item).ToList(),
Items2 = new List<Item.Stat>()
Items2 = _item2
}.Write(stream);

return stream;
Expand Down

0 comments on commit 0718773

Please sign in to comment.