Gets the weightAdjustedForSize attribute of the Equipment object @param aPC the PC with the Equipment @param newSA the size to adjust for @return The weightAdjustedForSize value
(final PlayerCharacter aPC, final SizeAdjustment newSA)
| 4086 | * @return The weightAdjustedForSize value |
| 4087 | */ |
| 4088 | private BigDecimal getWeightAdjustedForSize(final PlayerCharacter aPC, final SizeAdjustment newSA) |
| 4089 | { |
| 4090 | |
| 4091 | if (this.virtualItem) |
| 4092 | { |
| 4093 | return BigDecimal.ZERO; |
| 4094 | } |
| 4095 | |
| 4096 | BigDecimal weight = getBaseWeight(); |
| 4097 | if ((newSA == null) || (getSizeAdjustment() == null)) |
| 4098 | { |
| 4099 | return weight; |
| 4100 | } |
| 4101 | |
| 4102 | if (aPC != null) |
| 4103 | { |
| 4104 | final double mult = getWeightMultiplier(aPC, newSA); |
| 4105 | weight = weight.multiply(new BigDecimal(String.valueOf(mult))); |
| 4106 | } |
| 4107 | |
| 4108 | return weight; |
| 4109 | } |
| 4110 | |
| 4111 | private double getWeightMultiplier(final PlayerCharacter aPC, |
| 4112 | final SizeAdjustment newSA) |
no test coverage detected