summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/items.cc
diff options
context:
space:
mode:
authorVsevolod Kozlov <zaba@thorium.homeunix.org>2009-11-23 21:33:12 +0300
committerVsevolod Kozlov <zaba@thorium.homeunix.org>2009-11-23 21:33:12 +0300
commitf2bb7ce8d322ae249bff9cea8a5df8180e23f18e (patch)
tree021c7db11186a5d864606bab610c5a579c9ccd92 /crawl-ref/source/items.cc
parent10523dc6979030b6e243d304468a7a24aed77569 (diff)
downloadcrawl-ref-f2bb7ce8d322ae249bff9cea8a5df8180e23f18e.tar.gz
crawl-ref-f2bb7ce8d322ae249bff9cea8a5df8180e23f18e.zip
Fix off-by-one error in mapping of rod subtypes to spellbook numbers.
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r--crawl-ref/source/items.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index f298e19f38..27fa97bf05 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -2807,7 +2807,7 @@ bool item_def::has_spells() const
int item_def::book_number() const
{
return (base_type == OBJ_BOOKS ? sub_type :
- base_type == OBJ_STAVES ? sub_type + NUM_BOOKS - STAFF_FIRST_ROD
+ base_type == OBJ_STAVES ? sub_type + NUM_BOOKS - STAFF_FIRST_ROD + 1
: -1);
}