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

Function freeinv

src/invent.c:1402–1409  ·  view source on GitHub ↗

remove an object from the hero's inventory */

Source from the content-addressed store, hash-verified

1400
1401/* remove an object from the hero's inventory */
1402void
1403freeinv(struct obj *obj)
1404{
1405 extract_nobj(obj, &gi.invent);
1406 obj->pickup_prev = 0;
1407 freeinv_core(obj);
1408 update_inventory();
1409}
1410
1411/* drawbridge is destroying all objects at <x,y> */
1412void

Callers 15

finish_splittingFunction · 0.85
stealgoldFunction · 0.85
stealarmFunction · 0.85
stealFunction · 0.85
stealamuletFunction · 0.85
maybe_absorb_itemFunction · 0.85
potion_dipFunction · 0.85
hmon_hitmon_potionFunction · 0.85
use_saddleFunction · 0.85
ballreleaseFunction · 0.85
litterFunction · 0.85
dosinkringFunction · 0.85

Calls 3

extract_nobjFunction · 0.85
freeinv_coreFunction · 0.85
update_inventoryFunction · 0.85

Tested by

no test coverage detected