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

Method getTotalCost

code/src/java/pcgen/core/Kit.java:193–203  ·  view source on GitHub ↗

Gets the specified total cost of the kit. Note this is a base total cost which would then be modified by the chosen gear purchase rate on the gear tab. @param aPC The character used to evaluate expressions in relation to @return total cost, or null if no total cost was specified.

(PlayerCharacter aPC)

Source from the content-addressed store, hash-verified

191 * @return total cost, or null if no total cost was specified.
192 */
193 public BigDecimal getTotalCost(PlayerCharacter aPC)
194 {
195 QualifiedObject<Formula> buy = get(ObjectKey.KIT_TOTAL_COST);
196 Formula f = (buy == null ? null : buy.getObject(aPC, this));
197 BigDecimal totalCost = null;
198 if (f != null)
199 {
200 totalCost = BigDecimal.valueOf(f.resolve(aPC, "").doubleValue());
201 }
202 return totalCost;
203 }
204
205 /**
206 * Gets the specified total cost of the kit modified by the user's chosen

Callers 3

getHTMLInfoMethod · 0.80
testApplyMethod · 0.80

Calls 5

resolveMethod · 0.95
doubleValueMethod · 0.80
getMethod · 0.65
getObjectMethod · 0.65
valueOfMethod · 0.45

Tested by

no test coverage detected