Migsect / Inscription

Minecraft Bukkit Plugin to add Glyphs RPG mechanic to the Game
0 stars 1 forks source link

Players pay again for slots even though the slot contains a glyph #68

Closed Migsect closed 4 years ago

Migsect commented 4 years ago

`Line 80-91 in GlyphInventory.java

        // Canceling the event if the slot is locked
        if (g_inventory.isLocked(slot))
            event.setCancelled(true);

        // Paying for the slot if the player who clicked it has enough experience.
        if (event.getClick().isLeftClick() && event.getClick().isShiftClick()) {
            if (player.getLevel() >= g_inventory.unlocked_slots) {
                player.setLevel(player.getLevel() - g_inventory.unlocked_slots);
                g_inventory.setLocked(slot, false);
                g_inventory.populateLockedSlots(inventory);
            }
        }

This will not check for locked for buying as well.

Migsect commented 4 years ago

Fixed in https://github.com/Migsect/Inscription/commit/fec8cae32a2429b889e6541f79a970ee9803dbd0