Skip to content

Commit

Permalink
Spirits on safe square inside shop door (reported by hothraxxa). Fixes
Browse files Browse the repository at this point in the history
…#520. I was able to simplify the code by just using costly_spot instead of the other manual checks - this takes care of shops with shopkeepers and abandoned shops and the tricky door square.
  • Loading branch information
elunna committed Nov 1, 2023
1 parent 80ccd02 commit 09f83d5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/allmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,6 @@ wishluck()
STATIC_OVL void
pickup_spirits()
{
char *p;
/* Autopickup spirits for Necromancer */
if (Role_if(PM_NECROMANCER)) {
struct obj *obj;
Expand All @@ -1436,8 +1435,7 @@ pickup_spirits()
if (obj->otyp == SPIRIT) {
/* Don't allow auto-pickup of spirits in shops unless
* the shop is abandoned. */
if (inside_shop(x, y) && *(p = in_rooms(x, y, SHOPBASE))
&& tended_shop(&rooms[*p - ROOMOFFSET]))
if (costly_spot(x, y))
continue;

pickup_object(obj, obj->quan, TRUE);
Expand Down

0 comments on commit 09f83d5

Please sign in to comment.