Fix the same dupe but as before but for Nether Stars whoops

This commit is contained in:
Sam 2018-06-19 19:08:11 +01:00 committed by Alexander Meech
parent 1bcbca6f69
commit 5aeb44c30d

View File

@ -47,7 +47,7 @@ public class CakeResourceStarPage extends CakeResourcePage
CakeTeamItem teamItem = (CakeTeamItem) item;
CakeShopResult result = getResultPurchase(teamItem);
addButton(slot, prepareItem(item, result), new CakeTeamItemButton(teamItem, result));
addButton(slot, prepareItem(item, result), new CakeTeamItemButton(teamItem));
if (++slot % 9 == 8)
{
@ -113,13 +113,11 @@ public class CakeResourceStarPage extends CakeResourcePage
{
private final CakeTeamItem _item;
private final CakeShopResult _result;
private final int _level;
CakeTeamItemButton(CakeTeamItem item, CakeShopResult result)
CakeTeamItemButton(CakeTeamItem item)
{
_item = item;
_result = result;
_level = _cakeTeam.getUpgrades().get(item);
}
@ -130,9 +128,12 @@ public class CakeResourceStarPage extends CakeResourcePage
{
return;
}
else if (_result != CakeShopResult.SUCCESSFUL)
CakeShopResult result = getResultPurchase(_item);
if (result != CakeShopResult.SUCCESSFUL)
{
player.sendMessage(F.main("Game", _result.getFeedback()));
player.sendMessage(F.main("Game", result.getFeedback()));
playDenySound(player);
return;
}