Fix heroes unlocking 1 level after they are meant to

This commit is contained in:
Sam 2017-08-05 22:15:54 +01:00
parent 43260c88f5
commit 2b89cc2fb9

View File

@ -88,11 +88,11 @@ public class MobaRolePage extends ShopPageBase<ArcadeManager, MobaRoleShop>
HeroKit kit = kits.get(i++);
String packageName = _host.getProgression().getPackageName(kit);
boolean hasUnlocked = _plugin.GetDonation().Get(_player).ownsUnknownSalesPackage(packageName);
boolean canUnlock = _host.getProgression().getLevel(_player, kit) >= kit.getUnlockLevel();
boolean canUnlock = _host.getProgression().getLevel(_player, kit) >= kit.getUnlockLevel() - 1;
ItemBuilder builder = new ItemBuilder(Material.STAINED_CLAY);
builder.setTitle(C.cGreen + kit.GetName());
builder.addLore("", "Unlocks at " + _role.getName() + " Level " + C.cGreen + (i * 10));
builder.addLore("", "Unlocks at " + _role.getName() + " Level " + C.cGreen + kit.getUnlockLevel());
if (hasUnlocked)
{