Returns the number of Hands possessed by the Player Character represented by the given CharID @param id The CharID representing the Player Character for which the number of Hands will be returned @return The number of Hands possessed by the Player Character represented
(CharID id)
| 48 | * by the given CharID |
| 49 | */ |
| 50 | public int getHands(CharID id) |
| 51 | { |
| 52 | final Race aRace = raceFacet.get(id); |
| 53 | int hands = 0; |
| 54 | if (aRace != null) |
| 55 | { |
| 56 | hands = aRace.getSafe(IntegerKey.CREATURE_HANDS); |
| 57 | } |
| 58 | |
| 59 | // Scan templates for any overrides |
| 60 | for (PCTemplate template : templateFacet.getSet(id)) |
| 61 | { |
| 62 | Integer h = template.get(IntegerKey.CREATURE_HANDS); |
| 63 | if (h != null) |
| 64 | { |
| 65 | hands = h; |
| 66 | } |
| 67 | } |
| 68 | return hands; |
| 69 | } |
| 70 | |
| 71 | public void setTemplateFacet(TemplateFacet templateFacet) |
| 72 | { |