From 542cf75b89614ad8859fd345230fbd124316a48d Mon Sep 17 00:00:00 2001 From: haranp Date: Tue, 15 May 2007 03:31:38 +0000 Subject: Fix for 1718108, ability_letter_table was meaningless. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1472 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/abl-show.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'crawl-ref/source/abl-show.cc') diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index fa958a625a..116e8336a6 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -1963,6 +1963,7 @@ std::vector your_talents( bool check_confused ) if ( good_key ) { talents[i].hotkey = k; + you.ability_letter_table[k] = talents[i].which; break; } } @@ -2059,14 +2060,20 @@ static int find_ability_slot( ability_type which_ability ) for (int slot = startpoint; slot < 52; slot++) { if (you.ability_letter_table[slot] == ABIL_NON_ABILITY) + { + you.ability_letter_table[slot] = which_ability; return slot; + } } // if we skipped over a-e to reserve them, try them now for (int slot = startpoint - 1; slot >= 0; slot--) { if (you.ability_letter_table[slot] == ABIL_NON_ABILITY) + { + you.ability_letter_table[slot] = which_ability; return slot; + } } // All letters are assigned. -- cgit v1.2.3-54-g00ecf