called by dotalk(sounds.c) when #chatting; returns obj if location contains shop goods and shopkeeper is willing & able to speak */
| 5383 | /* called by dotalk(sounds.c) when #chatting; returns obj if location |
| 5384 | contains shop goods and shopkeeper is willing & able to speak */ |
| 5385 | struct obj * |
| 5386 | shop_object(coordxy x, coordxy y) |
| 5387 | { |
| 5388 | struct obj *otmp; |
| 5389 | struct monst *shkp; |
| 5390 | |
| 5391 | shkp = shop_keeper(*in_rooms(x, y, SHOPBASE)); |
| 5392 | if (!shkp || !inhishop(shkp)) |
| 5393 | return (struct obj *) 0; |
| 5394 | |
| 5395 | for (otmp = svl.level.objects[x][y]; otmp; otmp = otmp->nexthere) |
| 5396 | if (otmp->oclass != COIN_CLASS) |
| 5397 | break; |
| 5398 | /* note: otmp might have ->no_charge set, but that's ok */ |
| 5399 | return (otmp && costly_spot(x, y) && NOTANGRY(shkp) && !muteshk(shkp)) |
| 5400 | ? otmp |
| 5401 | : (struct obj *) 0; |
| 5402 | } |
| 5403 | |
| 5404 | /* give price quotes for all objects linked to this one (ie, on this spot) */ |
| 5405 | void |
no test coverage detected