MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / GetGearValue

Method GetGearValue

internal/characters/character.go:1918–1926  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1916}
1917
1918func (c *Character) GetGearValue() int {
1919 value := 0
1920 for _, slot := range AllSlots() {
1921 if itm := c.Equipment.Get(slot); itm.ItemId > 0 {
1922 value += itm.GetSpec().Value
1923 }
1924 }
1925 return value
1926}
1927
1928func (c *Character) Wear(i items.Item) (returnItems []items.Item, newItemWorn bool, failureReason string) {
1929

Callers 1

characterCommandMethod · 0.45

Calls 3

AllSlotsFunction · 0.85
GetMethod · 0.45
GetSpecMethod · 0.45

Tested by

no test coverage detected