summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-15 22:25:11 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-15 22:25:11 +0000
commit9555f782913d3cf3ab1e57a3280a6a0439df9154 (patch)
treed66fd342bc5da8000986a05b013c8ab6401dfe7d /crawl-ref/source/item_use.cc
parent420044b3c16c778b37fde736c26a7e4863b69a48 (diff)
downloadcrawl-ref-9555f782913d3cf3ab1e57a3280a6a0439df9154.tar.gz
crawl-ref-9555f782913d3cf3ab1e57a3280a6a0439df9154.zip
Fix Evaporate prompt doing the opposite of the player's answer.
Fix some more instances of crashes resulting from PROMPT_NOTHING. Change shadow dragon corpse type to rotting. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6569 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc21
1 files changed, 9 insertions, 12 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 88f6d9cb23..9fc7428131 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -798,7 +798,7 @@ bool armour_prompt( const std::string & mesg, int *index, operation_types oper)
}
return (succeeded);
-} // end armour_prompt()
+}
static bool cloak_is_being_removed( void )
{
@@ -3158,8 +3158,8 @@ bool puton_ring(int slot, bool prompt_finger)
else
{
item_slot = prompt_invent_item( "Put on which piece of jewellery?",
- MT_INVLIST, OBJ_JEWELLERY, true, true, true, 0, -1,
- NULL, OPER_PUTON );
+ MT_INVLIST, OBJ_JEWELLERY, true, true,
+ true, 0, -1, NULL, OPER_PUTON );
}
if (prompt_failed(item_slot))
@@ -3304,10 +3304,10 @@ bool remove_ring(int slot, bool announce)
if (hand_used == EQ_NONE)
{
const int equipn =
- (slot == -1)? prompt_invent_item( "Remove which piece of jewellery?",
- MT_INVLIST,
- OBJ_JEWELLERY, true, true, true,
- 0, -1, NULL, OPER_REMOVE)
+ (slot == -1)? prompt_invent_item("Remove which piece of jewellery?",
+ MT_INVLIST,
+ OBJ_JEWELLERY, true, true, true,
+ 0, -1, NULL, OPER_REMOVE)
: slot;
if (prompt_failed(equipn))
@@ -3593,6 +3593,7 @@ void prompt_inscribe_item()
}
item_slot = prompt_invent_item("Inscribe which item? ",
MT_INVLIST, OSEL_ANY );
+
if (prompt_failed(item_slot))
return;
@@ -4101,12 +4102,8 @@ static bool _handle_enchant_armour( int item_slot )
OSEL_ENCH_ARM, true, true, false );
}
- if (item_slot == PROMPT_ABORT || item_slot == PROMPT_NOTHING)
- {
- if (item_slot == PROMPT_ABORT)
- canned_msg( MSG_OK );
+ if (prompt_failed(item_slot))
return (false);
- }
item_def& arm(you.inv[item_slot]);