Browse Source

Fix buy removal logic

Devin Braune 5 years ago
parent
commit
df78a0e557
  1. 2
      Assets/Scripts/Shop/Model/BuyModel.cs

2
Assets/Scripts/Shop/Model/BuyModel.cs

@ -18,8 +18,8 @@ public class BuyModel : ShopModel
public override void ConfirmSelectedItem()
{
inventory.RemoveItemByIndex(selectedItemIndex); // Before removing the item from the model's actual inventory
OnRemove(GetSelectedItem()); // If there's a view subscribed, this will probably remove the item from it
inventory.RemoveItemByIndex(selectedItemIndex); // Before removing the item from the model's actual inventory
SelectItemByIndex(selectedItemIndex >= inventory.GetItemCount() ? --selectedItemIndex : selectedItemIndex);
}

Loading…
Cancel
Save