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

Method FindInBackpack

internal/characters/character.go:844–861  ·  view source on GitHub ↗
(itemName string)

Source from the content-addressed store, hash-verified

842}
843
844func (c *Character) FindInBackpack(itemName string) (items.Item, bool) {
845
846 if itemName == `` {
847 return items.Item{}, false
848 }
849
850 closeMatchItem, matchItem := items.FindMatchIn(itemName, c.Items...)
851
852 if matchItem.ItemId != 0 {
853 return matchItem, true
854 }
855
856 if closeMatchItem.ItemId != 0 {
857 return closeMatchItem, true
858 }
859
860 return items.Item{}, false
861}
862
863func (c *Character) FindOnBody(itemName string) (items.Item, bool) {
864

Callers 15

fastTravelCommandMethod · 0.45
storageCommandMethod · 0.45
fishingCommandMethod · 0.45
userTrashCommandMethod · 0.45
mobTrashCommandMethod · 0.45
mudmailCommandMethod · 0.45
auctionCommandMethod · 0.45
PutFunction · 0.45
GiveFunction · 0.45
EatFunction · 0.45
AlchemyFunction · 0.45
DrinkFunction · 0.45

Calls 1

FindMatchInFunction · 0.92

Tested by

no test coverage detected