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

Function restshk

src/shk.c:289–305  ·  view source on GitHub ↗

do shopkeeper specific structure munging -dlc */

Source from the content-addressed store, hash-verified

287
288/* do shopkeeper specific structure munging -dlc */
289void
290restshk(struct monst *shkp, boolean ghostly)
291{
292 if (u.uz.dlevel) {
293 struct eshk *eshkp = ESHK(shkp);
294
295 if (eshkp->bill_p != (struct bill_x *) -1000)
296 eshkp->bill_p = &eshkp->bill[0];
297 /* shoplevel can change as dungeons move around */
298 /* savebones guarantees that non-homed shk's will be gone */
299 if (ghostly) {
300 assign_level(&eshkp->shoplevel, &u.uz);
301 if (ANGRY(shkp) && strncmpi(eshkp->customer, svp.plname, PL_NSIZ))
302 pacify_shk(shkp, TRUE);
303 }
304 }
305}
306
307/* clear the unpaid bit on a single object and its contents */
308staticfn void

Callers 1

restmonchnFunction · 0.85

Calls 3

assign_levelFunction · 0.85
pacify_shkFunction · 0.85
strncmpiFunction · 0.70

Tested by

no test coverage detected