From 8588873858c66286e9b9d79ee72e76e68c97870b Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 2 Mar 2024 09:29:52 +0200 Subject: [PATCH] Item destruction and recharging fix Recharge only handles items carried by hero. I don't think it really matters that we just skip it, but leave a FIXME in the code if anyone has enough energy to improve this later. Fallout from the unified item destruction. --- src/zap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/zap.c b/src/zap.c index 18f156a6a..071addb8e 100644 --- a/src/zap.c +++ b/src/zap.c @@ -5698,7 +5698,9 @@ maybe_destroy_item( } if (chargeit) { - recharge(obj, 0); + /* FIXME: recharge only handles items in hero's inventory */ + if (u_carry) + recharge(obj, 0); } else if (!skip) { char osym = obj->oclass; /* for checking glob of slime after it's destroyed */