| 777 | } |
| 778 | |
| 779 | func (c *Character) HandsRequired(i items.Item) int { |
| 780 | |
| 781 | if i.ItemId < 1 { |
| 782 | return 0 |
| 783 | } |
| 784 | |
| 785 | iSpec := i.GetSpec() |
| 786 | |
| 787 | // Shooting weapnos don't benefit from creature size |
| 788 | // when determining how many hands they require |
| 789 | if iSpec.Subtype == items.Shooting { |
| 790 | return iSpec.Hands |
| 791 | } |
| 792 | |
| 793 | raceInfo := races.GetRace(c.GetRaceId()) |
| 794 | if raceInfo.Size == races.Large { |
| 795 | return 1 |
| 796 | } |
| 797 | |
| 798 | if raceInfo.Size == races.Small { |
| 799 | return iSpec.Hands + 1 |
| 800 | } |
| 801 | |
| 802 | return iSpec.Hands |
| 803 | } |
| 804 | |
| 805 | // Copies over an existing item with a new item |
| 806 | // Returns true if successfully replaces an item |