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

Function inhishop

src/shk.c:1038–1048  ·  view source on GitHub ↗

1: shopkeeper is currently in her shop or its boundary; 0: not */

Source from the content-addressed store, hash-verified

1036
1037/* 1: shopkeeper is currently in her shop or its boundary; 0: not */
1038int
1039inhishop(struct monst *shkp)
1040{
1041 char *shkrooms;
1042 struct eshk *eshkp = ESHK(shkp);
1043
1044 if (!on_level(&eshkp->shoplevel, &u.uz))
1045 return FALSE;
1046 shkrooms = in_rooms(shkp->mx, shkp->my, SHOPBASE);
1047 return (strchr(shkrooms, eshkp->shoproom) != 0);
1048}
1049
1050/* return the shopkeeper for rooms[rmno-2]; returns Null if there isn't one */
1051struct monst *

Callers 15

itemactionsFunction · 0.85
rloc_pos_okFunction · 0.85
rloc_to_coreFunction · 0.85
strategyFunction · 0.85
merge_choiceFunction · 0.85
recalc_mapseenFunction · 0.85
mpickstuffFunction · 0.85
poly_objFunction · 0.85
onscaryFunction · 0.85
find_defensiveFunction · 0.85
use_defensiveFunction · 0.85
replshkFunction · 0.85

Calls 2

on_levelFunction · 0.85
in_roomsFunction · 0.85

Tested by

no test coverage detected