From 09f83d5977e54368f95613d715a5c84234a60191 Mon Sep 17 00:00:00 2001 From: Erik Lunna Date: Wed, 1 Nov 2023 08:17:42 +0100 Subject: [PATCH] Spirits on safe square inside shop door (reported by hothraxxa). Fixes #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. --- src/allmain.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/allmain.c b/src/allmain.c index 180c30d9e..c12d1cd77 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -1418,7 +1418,6 @@ wishluck() STATIC_OVL void pickup_spirits() { - char *p; /* Autopickup spirits for Necromancer */ if (Role_if(PM_NECROMANCER)) { struct obj *obj; @@ -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);