MCPcopy Create free account
hub / github.com/NetHack/NetHack / inv_cnt

Function inv_cnt

src/hack.c:4495–4507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4493}
4494
4495int
4496inv_cnt(boolean incl_gold)
4497{
4498 struct obj *otmp = gi.invent;
4499 int ct = 0;
4500
4501 while (otmp) {
4502 if (incl_gold || otmp->invlet != GOLD_SYM)
4503 ct++;
4504 otmp = otmp->nobj;
4505 }
4506 return ct;
4507}
4508
4509/* Counts the money in an object chain. */
4510/* Intended use is for your or some monster's inventory, */

Callers 14

dowieldFunction · 0.85
doquiver_coreFunction · 0.85
stealFunction · 0.85
mhitm_ad_sgldFunction · 0.85
cannot_pushFunction · 0.85
hold_another_objectFunction · 0.85
invent.cFile · 0.85
doorganize_coreFunction · 0.85
lift_objectFunction · 0.85
reverse_lootFunction · 0.85
touchfoodFunction · 0.85
emergency_disrobeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected