diff options
author | Vsevolod Kozlov <zaba@thorium.homeunix.org> | 2009-11-23 21:33:12 +0300 |
---|---|---|
committer | Vsevolod Kozlov <zaba@thorium.homeunix.org> | 2009-11-23 21:33:12 +0300 |
commit | f2bb7ce8d322ae249bff9cea8a5df8180e23f18e (patch) | |
tree | 021c7db11186a5d864606bab610c5a579c9ccd92 /crawl-ref/source/items.cc | |
parent | 10523dc6979030b6e243d304468a7a24aed77569 (diff) | |
download | crawl-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.cc | 2 |
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); } |