setWearSlot(Inventory.WEARSLOT_FEET, R.id.heroinfo_worn_feet, R.drawable.equip_feet);
setWearSlot(Inventory.WEARSLOT_NECK, R.id.heroinfo_worn_neck, R.drawable.equip_neck);
setWearSlot(Inventory.WEARSLOT_HAND, R.id.heroinfo_worn_hand, R.drawable.equip_hand);
- setWearSlot(Inventory.WEARSLOT_RING, R.id.heroinfo_worn_ringleft, R.drawable.equip_ring);
- setWearSlot(Inventory.WEARSLOT_RING+1, R.id.heroinfo_worn_ringright, R.drawable.equip_ring);
+ setWearSlot(Inventory.WEARSLOT_LEFTRING, R.id.heroinfo_worn_ringleft, R.drawable.equip_ring);
+ setWearSlot(Inventory.WEARSLOT_RIGHTRING, R.id.heroinfo_worn_ringright, R.drawable.equip_ring);
}
@Override
int slot = itemType.category.inventorySlot;
if (player.inventory.isEmptySlot(slot)) return slot;
- if (slot == Inventory.WEARSLOT_RING) {
- return slot + 1;
+ if (slot == Inventory.WEARSLOT_LEFTRING) {
+ return Inventory.WEARSLOT_RIGHTRING;
} else if (itemType.isOffhandCapableWeapon()) {
ItemType mainWeapon = player.inventory.wear[Inventory.WEARSLOT_WEAPON];
if (mainWeapon != null && mainWeapon.isTwohandWeapon()) return slot;
if (type.isEquippable()) {
menu.findItem(R.id.inv_menu_equip).setVisible(true);
if (type.isOffhandCapableWeapon()) menu.findItem(R.id.inv_menu_equip_offhand).setVisible(true);
- else if (type.category.inventorySlot == Inventory.WEARSLOT_RING) menu.findItem(R.id.inv_menu_equip_offhand).setVisible(true);
+ else if (type.category.inventorySlot == Inventory.WEARSLOT_LEFTRING) menu.findItem(R.id.inv_menu_equip_offhand).setVisible(true);
}
break;
}
applyInventoryEffects(player, Inventory.WEARSLOT_HAND);
applyInventoryEffects(player, Inventory.WEARSLOT_FEET);
applyInventoryEffects(player, Inventory.WEARSLOT_NECK);
- applyInventoryEffects(player, Inventory.WEARSLOT_RING);
+ applyInventoryEffects(player, Inventory.WEARSLOT_LEFTRING);
+ applyInventoryEffects(player, Inventory.WEARSLOT_RIGHTRING);
SkillController.applySkillEffectsFromItemProficiencies(player);
SkillController.applySkillEffectsFromFightingStyles(player);
public static final int WEARSLOT_HAND = 4;\r
public static final int WEARSLOT_FEET = 5;\r
public static final int WEARSLOT_NECK = 6;\r
- public static final int WEARSLOT_RING = 7;\r
+ public static final int WEARSLOT_LEFTRING = 7;\r
+ public static final int WEARSLOT_RIGHTRING = 8;\r
\r
public int gold = 0;\r
- public static final int NUM_WORN_SLOTS = WEARSLOT_RING+1+1; // +1 for 0 based index. +1 for left+right rings.\r
+ public static final int NUM_WORN_SLOTS = WEARSLOT_RIGHTRING+1; // +1 for 0 based index.\r
public static final int NUM_QUICK_SLOTS = 3;\r
public final ItemType[] wear = new ItemType[NUM_WORN_SLOTS];\r
public final ItemType[] quickitem = new ItemType[NUM_QUICK_SLOTS];\r