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

Method dataAdded

code/src/java/pcgen/cdom/facet/ShieldProfFacet.java:55–64  ·  view source on GitHub ↗

Processes added CDOMObjects to determine whether they contained an AUTO:SHIELDPROF, and if so, processes the contents of that token to add the appropriate ShieldProfProviders to the Player Character. Triggered when one of the Facets to which ShieldProfFacet listens fires a DataFacetChangeEvent to i

(DataFacetChangeEvent<CharID, CDOMObject> dfce)

Source from the content-addressed store, hash-verified

53 * change
54 */
55 @Override
56 public void dataAdded(DataFacetChangeEvent<CharID, CDOMObject> dfce)
57 {
58 CDOMObject cdo = dfce.getCDOMObject();
59 List<ShieldProfProvider> shieldProfs = cdo.getListFor(ListKey.AUTO_SHIELDPROF);
60 if (shieldProfs != null)
61 {
62 shieldProfProviderFacet.addAll(dfce.getCharID(), shieldProfs, cdo);
63 }
64 }
65
66 /**
67 * Processes removed CDOMObjects to determine whether they contained an

Callers

nothing calls this directly

Calls 4

getListForMethod · 0.95
getCDOMObjectMethod · 0.65
addAllMethod · 0.65
getCharIDMethod · 0.65

Tested by

no test coverage detected