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

Method canAddModifier

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

Can we add eqMod to this equipment? @param eqMod The Equipment Modifier we would like to add @param bPrimary whether adding to the primary or secondary head @return True if eqMod is addable

(PlayerCharacter pc, PrereqObject eqMod, boolean bPrimary)

Source from the content-addressed store, hash-verified

2596 * @return True if eqMod is addable
2597 */
2598 public boolean canAddModifier(PlayerCharacter pc, PrereqObject eqMod, boolean bPrimary)
2599 {
2600
2601 // Make sure we are qualified
2602 bonusPrimary = bPrimary;
2603
2604 return getSafe(ObjectKey.MOD_CONTROL).getModifiersAllowed() && PrereqHandler.passesAll(eqMod, this, pc);
2605 }
2606
2607 /**
2608 * Returns 0 on object error, 1 on can fit, 2 on too heavy, 3 on properties

Callers 2

addEqModifierMethod · 0.95
isQualifiedForMethod · 0.80

Calls 3

passesAllMethod · 0.95
getModifiersAllowedMethod · 0.80
getSafeMethod · 0.80

Tested by

no test coverage detected