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

Method addSpellBook

code/src/java/pcgen/core/PlayerCharacter.java:4313–4320  ·  view source on GitHub ↗

return value indicates if book was actually added or not @param aName @return TRUE or FALSE

(final String aName)

Source from the content-addressed store, hash-verified

4311 * @return TRUE or FALSE
4312 */
4313 public boolean addSpellBook(final String aName)
4314 {
4315 if (aName != null && (!aName.isEmpty()) && !spellBookFacet.containsBookNamed(id, aName))
4316 {
4317 return addSpellBook(new SpellBook(aName, SpellBook.TYPE_PREPARED_LIST));
4318 }
4319 return false;
4320 }
4321
4322 public final boolean addSpellBook(final SpellBook book)
4323 {

Callers 14

testAddSpellsMethod · 0.95
testPreparedCasterMethod · 0.95
processMethod · 0.95
PlayerCharacterMethod · 0.95
updateEquipmentQtyMethod · 0.95
cloneMethod · 0.95
addSpellListMethod · 0.80
updatePCSpellsMethod · 0.80
parseSpellBookLinesMethod · 0.80
parseSpellLineMethod · 0.80

Calls 4

containsBookNamedMethod · 0.80
isEmptyMethod · 0.65
getNameMethod · 0.65
addMethod · 0.65

Tested by 6

testAddSpellsMethod · 0.76
testPreparedCasterMethod · 0.76
testSpellBookMethod · 0.64