MCPcopy Create free account
hub / github.com/PCGen/pcgen / getSlots

Method getSlots

code/src/java/pcgen/core/Equipment.java:1822–1842  ·  view source on GitHub ↗

The number of "Slots" that this item requires The slot type is derived from system/special/equipmentslot.lst @param aPC the PC with the Equipment @return slots

(final PlayerCharacter aPC)

Source from the content-addressed store, hash-verified

1820 * @return slots
1821 */
1822 public int getSlots(final PlayerCharacter aPC)
1823 {
1824 int iSlots = getSafe(IntegerKey.SLOTS);
1825
1826 EquipmentHead head = getEquipmentHeadReference(1);
1827 if (head != null)
1828 {
1829 for (EquipmentModifier eqMod : head.getSafeListFor(ListKey.EQMOD))
1830 {
1831 iSlots += (int) eqMod.bonusTo(aPC, "EQM", "HANDS", this);
1832 iSlots += (int) eqMod.bonusTo(aPC, "EQM", "SLOTS", this);
1833 }
1834 }
1835
1836 if (iSlots < 0)
1837 {
1838 iSlots = 0;
1839 }
1840
1841 return iSlots;
1842 }
1843
1844 public String getSlot()
1845 {

Callers 4

getNumFreeSlotsMethod · 0.95
canEquipItemMethod · 0.95

Calls 4

getSafeMethod · 0.80
getSafeListForMethod · 0.65
bonusToMethod · 0.45

Tested by

no test coverage detected