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 +++++++ crawl-ref/source/command.cc | 2 +- crawl-ref/source/itemname.cc | 4 ++-- crawl-ref/source/tags.cc | 1 - 4 files changed, 10 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source') 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. diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index 429790f7cd..140b5b07e1 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -387,7 +387,7 @@ static void adjust_ability(void) << ability_name(talents[selected].which) << std::endl; - // swap references in the letter table: + // swap references in the letter table ability_type tmp = you.ability_letter_table[index2]; you.ability_letter_table[index2] = you.ability_letter_table[index1]; you.ability_letter_table[index1] = tmp; diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc index b89363e494..0464cdb998 100644 --- a/crawl-ref/source/itemname.cc +++ b/crawl-ref/source/itemname.cc @@ -47,7 +47,7 @@ static bool is_random_name_vowel( char let ); static char retvow(int sed); static char retlet(int sed); -static bool is_tried_type( int basetype, int subtype ) +static bool is_tried_type( object_class_type basetype, int subtype ) { switch ( basetype ) { @@ -432,7 +432,7 @@ static const char* wand_secondary_string(int s) case 12: return "worn "; case 13: return "encrusted "; case 14: return "runed "; - case 15: return "sharpened "; + case 15: return "sharpened "; default: return "buggily "; } } diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc index 0a511cfe10..d88f2dcda1 100644 --- a/crawl-ref/source/tags.cc +++ b/crawl-ref/source/tags.cc @@ -1146,7 +1146,6 @@ static void tag_read_you_items(struct tagHeader &th, char minorVersion) for (i = 0; i < count_c; ++i) { you.inv[i].orig_monnum = you.inv[i].orig_place = 0; - you.inv[i].inscription.clear(); you.inv[i].base_type = static_cast(unmarshallByte(th)); you.inv[i].sub_type = (unsigned char) unmarshallByte(th); -- cgit v1.2.3-54-g00ecf