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

Method getBuyRate

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

Gets the buy rate of the kit. @param aPC The character used to evaluate expressions in relation to @return String

(PlayerCharacter aPC)

Source from the content-addressed store, hash-verified

163 * @return String
164 */
165 public int getBuyRate(PlayerCharacter aPC)
166 {
167 QualifiedObject<Formula> buy = get(ObjectKey.EQUIP_BUY);
168 Formula f = (buy == null ? null : buy.getObject(aPC, this));
169 int buyRate;
170 if (f == null)
171 {
172 buyRate = SettingsHandler.getGearTab_BuyRate();
173 }
174 else
175 {
176 buyRate = f.resolve(aPC, "").intValue();
177 if (buyRate == 100)
178 {
179 buyRate = SettingsHandler.getGearTab_BuyRate();
180 }
181 }
182 return buyRate;
183 }
184
185 /**
186 * Gets the specified total cost of the kit. Note this is a base total cost

Callers 2

calcItemCostMethod · 0.45
testApplyMethod · 0.45

Calls 5

getGearTab_BuyRateMethod · 0.95
resolveMethod · 0.95
intValueMethod · 0.80
getMethod · 0.65
getObjectMethod · 0.65

Tested by

no test coverage detected