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

Function mon_invent_chain

src/wizcmds.c:1176–1196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1174}
1175
1176staticfn void
1177mon_invent_chain(
1178 winid win,
1179 const char *src,
1180 struct monst *chain,
1181 long *total_count, long *total_size)
1182{
1183 char buf[BUFSZ];
1184 long count = 0, size = 0;
1185 struct monst *mon;
1186
1187 for (mon = chain; mon; mon = mon->nmon)
1188 count_obj(mon->minvent, &count, &size, TRUE, FALSE);
1189
1190 if (count || size) {
1191 *total_count += count;
1192 *total_size += size;
1193 Sprintf(buf, template, src, count, size);
1194 putstr(win, 0, buf);
1195 }
1196}
1197
1198staticfn void
1199contained_stats(

Callers 1

wiz_show_statsFunction · 0.85

Calls 1

count_objFunction · 0.85

Tested by

no test coverage detected