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

Function money_cnt

src/hack.c:4513–4522  ·  view source on GitHub ↗

Counts the money in an object chain. */ Intended use is for your or some monster's inventory, */ now that u.gold/m.gold is gone.*/ Counting money in a container might be possible too. */

Source from the content-addressed store, hash-verified

4511/* now that u.gold/m.gold is gone.*/
4512/* Counting money in a container might be possible too. */
4513long
4514money_cnt(struct obj *otmp)
4515{
4516 while (otmp) {
4517 if (otmp->oclass == COIN_CLASS)
4518 return otmp->quan;
4519 otmp = otmp->nobj;
4520 }
4521 return 0L;
4522}
4523
4524void
4525spot_checks(coordxy x, coordxy y, schar old_typ)

Callers 15

ttyinv_renderFunction · 0.85
updateStatsMethod · 0.85
really_doneFunction · 0.85
dositFunction · 0.85
stealgoldFunction · 0.85
gold_detectFunction · 0.85
domonnoiseFunction · 0.85
writexlentryFunction · 0.85
doprgoldFunction · 0.85
demon_talkFunction · 0.85
bribeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected