Skip to content

Commit

Permalink
Temporary Special Honey ID snafu workaround.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmedwards committed Jul 30, 2015
1 parent b00120e commit f18eeaa
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion CoCEd/ViewModel/ItemVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,27 @@ public string Type
id = GetString("id");
}

// Temporary Special Honey ID snafu workaround, until a game release fixes the issue
if (id == "Sp Honey") id = "SpHoney";

return id == "NOTHING!" ? "" : id;
}
set
{
var oldType = Type;
if (value == "") value = "NOTHING!";

// Temporary Special Honey ID snafu workaround, until a game release fixes the issue
if (value == "SpHoney") value = "Sp Honey";

if (!SetValue("id", value)) return;

// Fix quantity
var xml = XmlData.Current.ItemGroups.SelectMany(x => x.Items).FirstOrDefault(x => x.ID == value);

// Temporary Special Honey ID snafu workaround, until a game release fixes the issue
//var xml = XmlData.Current.ItemGroups.SelectMany(x => x.Items).FirstOrDefault(x => x.ID == value);
var xml = XmlData.Current.ItemGroups.SelectMany(x => x.Items).FirstOrDefault(x => x.ID == Type);

if (xml != null && Quantity == 0) Quantity = 1;
else if (xml == null && Quantity != 0) Quantity = 0;

Expand Down

0 comments on commit f18eeaa

Please sign in to comment.