ammo: fix weapon check
This commit is contained in:
@@ -97,7 +97,7 @@ public class AmmoPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
// Check for weapon slot items. This overrides the ammo slot,
|
// Check for weapon slot items. This overrides the ammo slot,
|
||||||
// as the player will use the thrown weapon (eg. chinchompas, knives, darts)
|
// as the player will use the thrown weapon (eg. chinchompas, knives, darts)
|
||||||
if (items.length >= EquipmentInventorySlot.WEAPON.getSlotIdx() - 1)
|
if (items.length > EquipmentInventorySlot.WEAPON.getSlotIdx())
|
||||||
{
|
{
|
||||||
final Item weapon = items[EquipmentInventorySlot.WEAPON.getSlotIdx()];
|
final Item weapon = items[EquipmentInventorySlot.WEAPON.getSlotIdx()];
|
||||||
final ItemComposition weaponComp = itemManager.getItemComposition(weapon.getId());
|
final ItemComposition weaponComp = itemManager.getItemComposition(weapon.getId());
|
||||||
|
|||||||
Reference in New Issue
Block a user