From f2bb7ce8d322ae249bff9cea8a5df8180e23f18e Mon Sep 17 00:00:00 2001 From: Vsevolod Kozlov Date: Mon, 23 Nov 2009 21:33:12 +0300 Subject: Fix off-by-one error in mapping of rod subtypes to spellbook numbers. --- crawl-ref/source/items.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crawl-ref/source/items.cc') 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); } -- cgit v1.2.3-54-g00ecf