summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilesdl.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-14 14:25:03 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-14 14:25:03 +0000
commita58a5788137ad5c8e81286c534ade1e82840041c (patch)
tree03b9dd0f4e90dd67c0a0b9cff0b64ef60ef92c15 /crawl-ref/source/tilesdl.cc
parentce630aeacdfb03552b7750156df37ff2a3725826 (diff)
downloadcrawl-ref-a58a5788137ad5c8e81286c534ade1e82840041c.tar.gz
crawl-ref-a58a5788137ad5c8e81286c534ade1e82840041c.zip
Fix 2858572: tiles spell memorisation crashes.
Also handles dangerous spellbooks correctly now, prompts and all. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10675 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tilesdl.cc')
-rw-r--r--crawl-ref/source/tilesdl.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc
index 0eaedbee79..2c9f70df7d 100644
--- a/crawl-ref/source/tilesdl.cc
+++ b/crawl-ref/source/tilesdl.cc
@@ -1443,7 +1443,8 @@ void TilesFramework::update_spells()
const int my = m_region_inv->my;
const unsigned int max_spells = mx * my;
- std::vector<spell_type> spells = get_mem_spell_list();
+ std::vector<int> books;
+ std::vector<spell_type> spells = get_mem_spell_list(books);
for (unsigned int i = 0; inv.size() < max_spells && i < spells.size();
++i)
{
@@ -1452,6 +1453,7 @@ void TilesFramework::update_spells()
InventoryTile desc;
desc.tile = tileidx_spell(spell);
desc.idx = (int) spell;
+ desc.special = books[i];
desc.quantity = spell_difficulty(spell);
if (spell_difficulty(spell) > you.experience_level