mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2025-12-26 16:07:57 +01:00
0 gold items should not be buyable
This commit is contained in:
@@ -24,7 +24,7 @@ public final class ShopActivity_Buy extends ShopActivityFragment {
|
||||
@Override
|
||||
public void onItemInfoClicked(int position, ItemType itemType) {
|
||||
int price = ItemController.getBuyingPrice(player, itemType);
|
||||
boolean enableButton = ItemController.canAfford(player, price);
|
||||
boolean enableButton = (price > 0 & ItemController.canAfford(player, price));
|
||||
String text = getResources().getString(R.string.shop_buyitem, price);
|
||||
Intent intent = Dialogs.getIntentForItemInfo(getActivity(), itemType.id, ItemInfoActivity.ItemInfoAction.buy, text, enableButton, null);
|
||||
startActivityForResult(intent, INTENTREQUEST_ITEMINFO);
|
||||
|
||||
Reference in New Issue
Block a user