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

Method setDirty

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

Sets the character changed since last save. NB: This is not a 'safe' call - its use should be considered carefully and in particular it should not be called from a method used as part of PlayerCharacter cloning as this can mean conditional abilities get dropped when they are actually qualified for,

(final boolean dirtyState)

Source from the content-addressed store, hash-verified

978 * @param dirtyState the new "dirty" value (may be false to indicate no change)
979 */
980 public void setDirty(final boolean dirtyState)
981 {
982 if (dirtyState)
983 {
984 serial++;
985 cache = new ObjectCache();
986 variableProcessor.setSerial(serial);
987 cabFacet.update(id);
988 cAvSpellFacet.update(id);
989 cKnSpellFacet.update(id);
990 condLangFacet.update(id);
991 bonusSkillRankChangeFacet.reset(id);
992 }
993
994 dirtyFlag = dirtyState;
995 }
996
997 /**
998 * Gets whether the character has been changed since last saved.

Callers 15

testListMethod · 0.95
testPositionalMethod · 0.95
testListMetricMethod · 0.95
testCSkillMethod · 0.95
testEqtypeLoopMethod · 0.95
dataAddedMethod · 0.95
doFormulaSetupMethod · 0.95

Calls 3

resetMethod · 0.65
setSerialMethod · 0.45
updateMethod · 0.45

Tested by 15

testListMethod · 0.76
testPositionalMethod · 0.76
testListMetricMethod · 0.76
testCSkillMethod · 0.76
testEqtypeLoopMethod · 0.76
testDirectMethod · 0.36
testDirectMethod · 0.36