From 720441b258f72f676ff59aca61ec2392cb629d07 Mon Sep 17 00:00:00 2001 From: haranp Date: Thu, 17 May 2007 21:41:30 +0000 Subject: Refix for 1719721: what I thought was a simple fix in InvEntry turned out to be a bug...We might want a 'bool inv_prefix' argument to name(), or an appropriate description_type. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1479 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/invent.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index 121768c4d7..18773c5643 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -61,7 +61,16 @@ std::string InvTitle::get_text() const InvEntry::InvEntry( const item_def &i ) : MenuEntry( "", MEL_ITEM ), item( &i ) { data = const_cast( item ); - text = i.name(DESC_NOCAP_A, false); + + if ( in_inventory(i) && i.base_type != OBJ_GOLD ) + { + // We need to do this in order to get the 'wielded' annotation. + // We then toss out the first four characters, which look + // like this: "a - ". Ow. FIXME. + text = i.name(DESC_INVENTORY_EQUIP, false).substr(4); + } + else + text = i.name(DESC_NOCAP_A, false); if (i.base_type != OBJ_GOLD && in_inventory(i)) add_hotkey(index_to_letter( i.link )); -- cgit v1.2.3-54-g00ecf