0 gold items should not be buyable

This commit is contained in:
Nut.andor
2025-10-17 11:12:25 +02:00
parent 9abec9d873
commit 44c8323b0f

View File

@@ -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);