Returns the Load for the Player Character identified by the given CharID. @param id The CharID identifying the Player Character for which the Load should be returned @return The Load for the Player Character identified by the given CharID
(CharID id)
| 55 | * @return The Load for the Player Character identified by the given CharID |
| 56 | */ |
| 57 | public Load getLoadType(CharID id) |
| 58 | { |
| 59 | Float weight = totalWeightFacet.getTotalWeight(id); |
| 60 | double dbl = weight / getMaxLoad(id).doubleValue(); |
| 61 | |
| 62 | if (!Globals.checkRule(RuleConstants.SYS_LDPACSK)) |
| 63 | { |
| 64 | return Load.LIGHT; |
| 65 | } |
| 66 | Float lightMult = SettingsHandler.getGameAsProperty().get().getLoadInfo().getLoadMultiplier("LIGHT"); |
| 67 | if (lightMult != null && dbl <= lightMult.doubleValue()) |
| 68 | { |
| 69 | return Load.LIGHT; |
| 70 | } |
| 71 | |
| 72 | Float mediumMult = SettingsHandler.getGameAsProperty().get().getLoadInfo().getLoadMultiplier("MEDIUM"); |
| 73 | if (mediumMult != null && dbl <= mediumMult.doubleValue()) |
| 74 | { |
| 75 | return Load.MEDIUM; |
| 76 | } |
| 77 | |
| 78 | Float heavyMult = SettingsHandler.getGameAsProperty().get().getLoadInfo().getLoadMultiplier("HEAVY"); |
| 79 | if (heavyMult != null && dbl <= heavyMult.doubleValue()) |
| 80 | { |
| 81 | return Load.HEAVY; |
| 82 | } |
| 83 | |
| 84 | return Load.OVERLOAD; |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * Returns the maximum Load for the Player Character identified by the given |
no test coverage detected