summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/tags.cc25
-rw-r--r--crawl-ref/source/tags.h1
2 files changed, 15 insertions, 11 deletions
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 816edcf061..5c5190bccd 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -1655,17 +1655,20 @@ static void tag_read_you_items(reader &th, char minorVersion)
for (j = 0; j < count_s; ++j)
you.seen_spell[j] = unmarshallByte(th);
- count_s = unmarshallShort(th);
- if (count_s > NUM_WEAPONS)
- count_s = NUM_WEAPONS;
- for (j = 0; j < count_s; ++j)
- you.seen_weapon[j] = unmarshallLong(th);
-
- count_s = unmarshallShort(th);
- if (count_s > NUM_ARMOURS)
- count_s = NUM_ARMOURS;
- for (j = 0; j < count_s; ++j)
- you.seen_armour[j] = unmarshallLong(th);
+ if (minorVersion >= TAG_MINOR_SEEN_WEAPONS_ARMOUR)
+ {
+ count_s = unmarshallShort(th);
+ if (count_s > NUM_WEAPONS)
+ count_s = NUM_WEAPONS;
+ for (j = 0; j < count_s; ++j)
+ you.seen_weapon[j] = unmarshallLong(th);
+
+ count_s = unmarshallShort(th);
+ if (count_s > NUM_ARMOURS)
+ count_s = NUM_ARMOURS;
+ for (j = 0; j < count_s; ++j)
+ you.seen_armour[j] = unmarshallLong(th);
+ }
}
static PlaceInfo unmarshallPlaceInfo(reader &th)
diff --git a/crawl-ref/source/tags.h b/crawl-ref/source/tags.h
index d0a28c2b6c..7cf59c42c9 100644
--- a/crawl-ref/source/tags.h
+++ b/crawl-ref/source/tags.h
@@ -47,6 +47,7 @@ enum tag_major_version
enum tag_minor_version
{
TAG_MINOR_RESET = 0, // Minor tags were reset
+ TAG_MINOR_SEEN_WEAPONS_ARMOUR = 1,
TAG_MINOR_BEHELD16 = 2, // Use correct type sizes for beholders
TAG_MINOR_VERSION = 2 // Current version. (Keep equal to max.)
};