Accurately track which items have been discovered, even if not #named
This fixes a couple of bugs: a long-standing bug in which writing a scroll by label could fail even if you've already seen a scroll with that label (due to the game not tracking whether or not you've seen a scroll if it doesn't have a name); and a somewhat newer bug in which spellbooks auto-identified by Wizard knowledge were marked as having been encountered (rather than as known but not encountered). Breaks save file compatibility, but not bones files.
This commit is contained in:
+2
-2
@@ -1196,12 +1196,12 @@ learnring(struct obj *ring, boolean observed)
|
||||
mark this ring as having been seen (no need for makeknown);
|
||||
otherwise if we have seen this ring, discover its type */
|
||||
if (objects[ringtype].oc_name_known)
|
||||
ring->dknown = 1;
|
||||
observe_object(ring);
|
||||
else if (ring->dknown)
|
||||
makeknown(ringtype);
|
||||
#if 0 /* see learnwand() */
|
||||
else
|
||||
ring->eknown = 1;
|
||||
observe_object(ring);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user