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

Function shk_owns

src/shk.c:5884–5897  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5882}
5883
5884staticfn char *
5885shk_owns(char *buf, struct obj *obj)
5886{
5887 struct monst *shkp;
5888 coordxy x, y;
5889
5890 if (get_obj_location(obj, &x, &y, 0)
5891 && (obj->unpaid || (obj->where == OBJ_FLOOR && !obj->no_charge
5892 && costly_spot(x, y)))) {
5893 shkp = shop_keeper(inside_shop(x, y));
5894 return strcpy(buf, shkp ? s_suffix(shkname(shkp)) : the_your[0]);
5895 }
5896 return (char *) 0;
5897}
5898
5899staticfn char *
5900mon_owns(char *buf, struct obj *obj)

Callers 1

shk_yourFunction · 0.85

Calls 6

get_obj_locationFunction · 0.85
costly_spotFunction · 0.85
shop_keeperFunction · 0.85
inside_shopFunction · 0.85
s_suffixFunction · 0.85
shknameFunction · 0.85

Tested by

no test coverage detected