Get Base contained weight @return Base contained weight
()
| 5357 | * @return Base contained weight |
| 5358 | */ |
| 5359 | public Float getBaseContainedWeight() |
| 5360 | { |
| 5361 | |
| 5362 | float total = 0.0f; |
| 5363 | |
| 5364 | if ((getSafe(ObjectKey.CONTAINER_CONSTANT_WEIGHT)) || (getChildCount() == 0)) |
| 5365 | { |
| 5366 | return total; |
| 5367 | } |
| 5368 | |
| 5369 | for (int e = 0; e < getContainedEquipmentCount(); ++e) |
| 5370 | { |
| 5371 | final Equipment anEquip = getContainedEquipment(e); |
| 5372 | |
| 5373 | if (anEquip.getContainedEquipmentCount() > 0) |
| 5374 | { |
| 5375 | total = total + anEquip.getBaseWeight().floatValue() + anEquip.getBaseContainedWeight(); |
| 5376 | } |
| 5377 | else |
| 5378 | { |
| 5379 | total += anEquip.getBaseWeight().floatValue() * anEquip.getCarried(); |
| 5380 | } |
| 5381 | } |
| 5382 | |
| 5383 | Integer crw = get(IntegerKey.CONTAINER_REDUCE_WEIGHT); |
| 5384 | if (crw != null && crw != 0) |
| 5385 | { |
| 5386 | total *= (crw.floatValue() / 100); |
| 5387 | } |
| 5388 | |
| 5389 | return total; |
| 5390 | } |
| 5391 | |
| 5392 | /** |
| 5393 | * Gets the contained Weight this object recursis all child objects to get |
nothing calls this directly
no test coverage detected