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

Function dropped_container

src/shk.c:3063–3082  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3061}
3062
3063staticfn void
3064dropped_container(
3065 struct obj *obj,
3066 struct monst *shkp,
3067 boolean sale)
3068{
3069 struct obj *otmp;
3070
3071 /* the "top" container is treated in the calling fn */
3072 for (otmp = obj->cobj; otmp; otmp = otmp->nobj) {
3073 if (otmp->oclass == COIN_CLASS)
3074 continue;
3075
3076 if (!otmp->unpaid && !(sale && saleable(shkp, otmp)))
3077 otmp->no_charge = 1;
3078
3079 if (Has_contents(otmp))
3080 dropped_container(otmp, shkp, sale);
3081 }
3082}
3083
3084void
3085picked_container(struct obj *obj)

Callers 1

sellobjFunction · 0.85

Calls 1

saleableFunction · 0.85

Tested by

no test coverage detected