summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-24 01:26:49 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-24 01:26:49 +0000
commit65a683c34d136d590f41eeb63cb96358d0e528b4 (patch)
treeeceb4dc2d8f9a8ab94e7c0ff65d3a57e2b28487c /crawl-ref/source/mon-util.cc
parent37b045fd72eed3915eeae31341f658f70c8df5cf (diff)
downloadcrawl-ref-65a683c34d136d590f41eeb63cb96358d0e528b4.tar.gz
crawl-ref-65a683c34d136d590f41eeb63cb96358d0e528b4.zip
Don't include inscription in a dancing weapon's name if the desc type
is BASENAME, QUALNAME or DBNAME. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6091 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 91e073f839..9836615fba 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -1746,9 +1746,17 @@ static std::string _str_monam(const monsters& mon, description_level_type desc,
if (mon.type == MONS_DANCING_WEAPON && mon.inv[MSLOT_WEAPON] != NON_ITEM)
{
+ unsigned long ignore_flags = ISFLAG_KNOW_CURSE | ISFLAG_KNOW_PLUSES;
+ bool use_inscrip = true;
+
+ if (desc == DESC_BASENAME || desc == DESC_QUALNAME
+ || desc == DESC_DBNAME)
+ {
+ use_inscrip = false;
+ }
+
item_def item = mitm[mon.inv[MSLOT_WEAPON]];
- unset_ident_flags( item, ISFLAG_KNOW_CURSE | ISFLAG_KNOW_PLUSES );
- return item.name(desc);
+ return item.name(desc, false, false, use_inscrip, false, ignore_flags);
}
if (mon.type == MONS_PLAYER_GHOST)