Get the weight as a double @param aPC The PC that has this Equipment @return weight as double
(final PlayerCharacter aPC)
| 2118 | * @return weight as double |
| 2119 | */ |
| 2120 | public double getWeightAsDouble(final PlayerCharacter aPC) |
| 2121 | { |
| 2122 | if (isVirtual()) |
| 2123 | { |
| 2124 | return 0.0; |
| 2125 | } |
| 2126 | |
| 2127 | double d1 = bonusTo(aPC, "EQM", "WEIGHTMULT", true); |
| 2128 | |
| 2129 | double aWeight = getWeightInPounds().doubleValue(); |
| 2130 | |
| 2131 | if (!CoreUtility.doublesEqual(d1, 0.0)) |
| 2132 | { |
| 2133 | aWeight *= d1; |
| 2134 | } |
| 2135 | |
| 2136 | double d2 = bonusTo(aPC, "EQM", "WEIGHTDIV", true); |
| 2137 | |
| 2138 | if (!CoreUtility.doublesEqual(d2, 0)) |
| 2139 | { |
| 2140 | aWeight /= d2; |
| 2141 | } |
| 2142 | |
| 2143 | aWeight += bonusTo(aPC, "EQM", "WEIGHTADD", true); |
| 2144 | aWeight += getSafe(ObjectKey.WEIGHT_MOD).doubleValue(); |
| 2145 | |
| 2146 | return aWeight; |
| 2147 | } |
| 2148 | |
| 2149 | /** |
| 2150 | * Get wield |
no test coverage detected