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

Method applySubClass

code/src/java/pcgen/core/kit/KitClass.java:91–106  ·  view source on GitHub ↗
(PlayerCharacter aPC)

Source from the content-addressed store, hash-verified

89 }
90
91 private void applySubClass(PlayerCharacter aPC)
92 {
93 if (subClass != null)
94 {
95 // Ensure the character has the class
96 PCClass heldClass = aPC.getClassKeyed(theClass.getKeyName());
97 if (heldClass == null)
98 {
99 aPC.incrementClassLevel(0, theClass);
100 heldClass = aPC.getClassKeyed(theClass.getKeyName());
101 }
102
103 // try and set a subclass too.
104 SubClassApplication.setSubClassKey(aPC, heldClass, getSubClass().getLSTformat(false));
105 }
106 }
107
108 @Override
109 public void apply(PlayerCharacter aPC)

Callers 2

testApplyMethod · 0.95
applyMethod · 0.95

Calls 6

setSubClassKeyMethod · 0.95
getSubClassMethod · 0.95
incrementClassLevelMethod · 0.80
getKeyNameMethod · 0.65
getLSTformatMethod · 0.65
getClassKeyedMethod · 0.45

Tested by

no test coverage detected