summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tags.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-16 23:52:16 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-16 23:52:16 +0000
commitadc19de6914294ffdfc6a40bea5bb236244f1aa7 (patch)
tree78d18a605173ea90fd54113e4f0481c471026075 /crawl-ref/source/tags.cc
parent2d16881d3392336c49f388c500749613899852df (diff)
downloadcrawl-ref-adc19de6914294ffdfc6a40bea5bb236244f1aa7.tar.gz
crawl-ref-adc19de6914294ffdfc6a40bea5bb236244f1aa7.zip
Overhaul quiver storage to hold up to six item slots of
preferred ammo for bow, crossbow, hand crossbow, blowgun, sling, and non-launchers. Breaks saves. (Was Bug 1872821.) Also fix 1858916: update EV when paralysis is over git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3285 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tags.cc')
-rw-r--r--crawl-ref/source/tags.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index d1a6ea178e..f206ab46f8 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -934,6 +934,11 @@ static void tag_construct_you(tagHeader &th)
for (j = 0; j < NUM_ATTRIBUTES; ++j)
marshallByte(th,you.attribute[j]);
+ // remembered quiver items
+ marshallByte(th, NUM_QUIVER);
+ for (j = 0; j < NUM_QUIVER; ++j)
+ marshallByte(th,you.quiver[j]);
+
// sacrifice values
marshallByte(th, NUM_OBJECT_CLASSES);
for (j = 0; j < NUM_OBJECT_CLASSES; ++j)
@@ -1009,8 +1014,6 @@ static void tag_construct_you_items(tagHeader &th)
for (i = 0; i < ENDOFPACK; ++i)
marshallItem(th, you.inv[i]);
- marshallByte(th, you.quiver);
-
// item descrip for each type & subtype
// how many types?
marshallByte(th, 5);
@@ -1320,6 +1323,11 @@ static void tag_read_you(tagHeader &th, char minorVersion)
for (j = 0; j < count_c; ++j)
you.attribute[j] = unmarshallByte(th);
+ // how many quiver types?
+ count_c = unmarshallByte(th);
+ for (j = 0; j < count_c; ++j)
+ you.quiver[j] = unmarshallByte(th);
+
count_c = unmarshallByte(th);
for (j = 0; j < count_c; ++j)
you.sacrifice_value[j] = unmarshallLong(th);
@@ -1384,8 +1392,6 @@ static void tag_read_you_items(tagHeader &th, char minorVersion)
for (i = 0; i < count_c; ++i)
unmarshallItem(th, you.inv[i]);
- you.quiver = unmarshallByte(th);
-
// item descrip for each type & subtype
// how many types?
count_c = unmarshallByte(th);