public void changeItem(int newItem) { battleStats.resetModifiers(); switch (listeItems.items[newItem].slotLocation) { case 0: weaponSlot = newItem; break; case 1: equipmentSlot1 = newItem; break; case 2: equipmentSlot2 = newItem; break; case 3: equipmentSlot1 = newItem; equipmentSlot2 = newItem; break; default: break; } itemModifiers(); }