Fix shopkeeper getting mad when monster triggers a trap

When a monster triggered a rolling boulder trap which buried
a shop item in a pit, the shopkeeper would bill the hero.
(Or get mad at hero, if they were out of the shop)

The fix might not be quite right - should the shopkeeper get
mad at hero when monster triggers a trap created by hero?
Or when an item is buried in a pit created by a hero?
This commit is contained in:
Pasi Kallinen
2023-01-28 20:01:07 +02:00
parent cb81631a38
commit 60cbab1130
2 changed files with 2 additions and 2 deletions

View File

@@ -4756,7 +4756,7 @@ useupf(struct obj *obj, long numused)
otmp = splitobj(obj, numused);
else
otmp = obj;
if (costly_spot(otmp->ox, otmp->oy)) {
if (!gc.context.mon_moving && costly_spot(otmp->ox, otmp->oy)) {
if (strchr(u.urooms, *in_rooms(otmp->ox, otmp->oy, 0)))
addtobill(otmp, FALSE, FALSE, FALSE);
else