Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #K4006 - 'null obj after quiver merge' panic (NetHack 3.7)
Using apply to unlight a lit potion of oil makes it unlit, removes it from inventory, and then re-adds it to try to force it to merge with other potions of oil. If it was wielded and the other potions were quivered, the game would panic. When merging, they get forced into the weapon slot in preference to the quiver slot. Unwearing it before freeinv+addinv would solve this but also leave the hero with nothing wielded, even if it didn't merge with another stack. Instead, don't try to merge if the potion being unlit happens to be worn.
- Loading branch information