Also fixed a bad bug with spell validity (good thing that spellbooks 1-4 are long, huh…)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1300 c06c8d41-db1a-0410-9941-cceddc491573
25VJTGR3AWZJ7OHKYWS53VJ6TVMMU6UT7BA6V3QVVWDGI6FYKD7QC
DDU4A3JGN5IUIPP5IASOODKPR2WBHSDSV4FITZ6HNXNSXXQACWAQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC
QVVC7AYGVA6U64PTNA7L27422NLMO327P22BQKXEVIMPZHIHO7MQC
3A3OAIFRFU3IHF6SDNDPCN3XYOFYIBYCEYJAXAFASCFDY76SMFXQC
// no point doing anything if tome of destruction or a manual
if (sbook_type == BOOK_DESTRUCTION || sbook_type == BOOK_MANUAL)
return;
for (int i = 0; i < SPELLBOOK_SIZE; i++) //jmf: was i = 1
{
sbtemplate_pass[i] = spellbook_template_array[sbook_type][i];
}
} // end spellbook_template()
spell_type which_spell_in_book(int sbook_type, int spl)
{
FixedVector < spell_type, SPELLBOOK_SIZE > wsib_pass; // was 10 {dlb}
spellbook_template(sbook_type, wsib_pass);
return (wsib_pass[ spl + 1 ]);
return spellbook_template_array[sbook_type][spl];
FixedVector< spell_type, SPELLBOOK_SIZE > spells;
spellbook_template( you.inv[ splbook ].sub_type, spells );
if (spells[ spell ] != SPELL_NO_SPELL)
return true;
return which_spell_in_book(splbook, spell) != SPELL_NO_SPELL;
}