MCPcopy Index your code
hub / github.com/NetHack/NetHack / carrying

Function carrying

src/invent.c:1494–1504  ·  view source on GitHub ↗

return inventory object of type 'type' if hero has one, otherwise Null */

Source from the content-addressed store, hash-verified

1492
1493/* return inventory object of type 'type' if hero has one, otherwise Null */
1494struct obj *
1495carrying(int type)
1496{
1497 struct obj *otmp;
1498
1499 /* this could be replaced by 'return m_carrying(&gy.youmonst, type);' */
1500 for (otmp = gi.invent; otmp; otmp = otmp->nobj)
1501 if (otmp->otyp == type)
1502 break;
1503 return otmp;
1504}
1505
1506/* return inventory object of type that will petrify on touch */
1507struct obj *

Callers 15

finish_questFunction · 0.85
really_doneFunction · 0.85
docallFunction · 0.85
itemactionsFunction · 0.85
m_is_steadfastFunction · 0.85
cannot_pushFunction · 0.85
test_moveFunction · 0.85
invocation_messageFunction · 0.85
nh_timeoutFunction · 0.85
gcrownuFunction · 0.85
give_spellFunction · 0.85
set_moreluckFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_moveFunction · 0.68