Gets the buy rate of the kit. @param aPC The character used to evaluate expressions in relation to @return String
(PlayerCharacter aPC)
| 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 |
no test coverage detected