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:52 +02:00
parent ad667216ee
commit 8588873858

View File

@@ -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 */