Tests if this weapon can be used in one hand by the specified PC. @param pc The PlayerCharacter wielding the weapon. @return true if the weapon can be used one handed.
(PlayerCharacter pc)
| 4903 | * @return true if the weapon can be used one handed. |
| 4904 | */ |
| 4905 | public boolean isWeaponOneHanded(PlayerCharacter pc) |
| 4906 | { |
| 4907 | |
| 4908 | if (pc == null && !isWeapon()) |
| 4909 | { |
| 4910 | return false; |
| 4911 | } |
| 4912 | |
| 4913 | WieldCategory wCat = getEffectiveWieldCategory(pc); |
| 4914 | return wCat != null && getHandsRequired(pc, wCat) == 1; |
| 4915 | } |
| 4916 | |
| 4917 | private int getHandsRequired(PlayerCharacter pc, WieldCategory wCat) |
| 4918 | { |
no test coverage detected