diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-14 15:31:00 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-14 15:31:00 +0000 |
commit | 2ed4f389c28fa47ae5e16d747d0eb81e3a498acf (patch) | |
tree | 06494a4ca20aacd8b75dea9d14496d2c15ef37d2 /crawl-ref/source/invent.cc | |
parent | 85e11d2d3c892c2ffcd53b0bf55c0e83ce13fb9d (diff) | |
download | crawl-ref-2ed4f389c28fa47ae5e16d747d0eb81e3a498acf.tar.gz crawl-ref-2ed4f389c28fa47ae5e16d747d0eb81e3a498acf.zip |
* Fix 2477235: Use inscription check when switching back from butchering
tool in case it was autoinscribed {!w}.
* Make TSO reclaim holy wrath weapons an Elyvilon worshipper is
attempting to destroy (flavour only). (FR 2497133)
* Disallow Dissolution outside of the Slime Pits.
* Explain 'e' as "Drain corpses" for Vampires in the command help.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8450 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/invent.cc')
-rw-r--r-- | crawl-ref/source/invent.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index c782081d2d..288950d874 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -1237,10 +1237,10 @@ bool has_warning_inscription(const item_def& item, return (false); } -// checks if current item (to be removed) has a warning inscription -// and prompts the user for confirmation -static bool _check_old_item_warning( const item_def& item, - operation_types oper ) +// Checks if current item (to be removed) has a warning inscription +// and prompts the user for confirmation. +bool check_old_item_warning( const item_def& item, + operation_types oper ) { item_def old_item; std::string prompt; @@ -1347,7 +1347,7 @@ bool check_warning_inscriptions( const item_def& item, // Don't ask if item already worn. int equip = you.equip[get_armour_slot(item)]; if (equip != -1 && item.link == equip) - return (_check_old_item_warning(item, oper)); + return (check_old_item_warning(item, oper)); } else if (oper == OPER_PUTON) { @@ -1362,23 +1362,24 @@ bool check_warning_inscriptions( const item_def& item, { equip = you.equip[EQ_LEFT_RING]; if (equip != -1 && item.link == equip) - return (_check_old_item_warning(item, oper)); - // or maybe the other ring? + return (check_old_item_warning(item, oper)); + + // Or maybe the other ring? equip = you.equip[EQ_RIGHT_RING]; } if (equip != -1 && item.link == equip) - return (_check_old_item_warning(item, oper)); + return (check_old_item_warning(item, oper)); } std::string prompt = "Really " + _operation_verb(oper) + " "; prompt += item.name(DESC_INVENTORY); prompt += "?"; return (yesno(prompt.c_str(), false, 'n') - && _check_old_item_warning(item, oper)); + && check_old_item_warning(item, oper)); } else - return (_check_old_item_warning(item, oper)); + return (check_old_item_warning(item, oper)); } // This function prompts the user for an item, handles the '?' and '*' |