(PlayerCharacter pc, Equipment eq, int ammo)
| 2445 | } |
| 2446 | |
| 2447 | private static Equipment getAmmoUser(PlayerCharacter pc, Equipment eq, int ammo) |
| 2448 | { |
| 2449 | int ammoCount = 0; |
| 2450 | |
| 2451 | if (ammo < 0) |
| 2452 | { |
| 2453 | return null; |
| 2454 | } |
| 2455 | String containerCapacity = eq.getContainerCapacityString(); |
| 2456 | |
| 2457 | for (Equipment equip : pc.getEquipmentListInOutputOrder()) |
| 2458 | { |
| 2459 | for (String type : equip.typeList()) |
| 2460 | { |
| 2461 | if (containerCapacity.contains(type)) |
| 2462 | { |
| 2463 | ++ammoCount; |
| 2464 | |
| 2465 | break; |
| 2466 | } |
| 2467 | } |
| 2468 | if (ammoCount == (ammo + 1)) |
| 2469 | { |
| 2470 | return equip; |
| 2471 | } |
| 2472 | } |
| 2473 | return null; |
| 2474 | } |
| 2475 | |
| 2476 | private static int getWeaponProfTypeBonuses(PlayerCharacter pc, Equipment eq, String bonusType, int index) |
| 2477 | { |
no test coverage detected