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.
This commit is contained in:
Pasi Kallinen
2024-03-02 09:29:55 +02:00
parent ad667216ee
commit 8588873858
+2
View File
@@ -5698,6 +5698,8 @@ maybe_destroy_item(
} }
if (chargeit) { if (chargeit) {
/* FIXME: recharge only handles items in hero's inventory */
if (u_carry)
recharge(obj, 0); recharge(obj, 0);
} else if (!skip) { } else if (!skip) {
char osym = obj->oclass; /* for checking glob of slime after it's char osym = obj->oclass; /* for checking glob of slime after it's