From 8aaaca3d1c38a41d88b6dddf55fa48fd9aecb539 Mon Sep 17 00:00:00 2001 From: Vsevolod Kozlov Date: Fri, 6 Nov 2009 15:54:52 +0300 Subject: Rename is_valid_item to item_def::is_valid. Signed-off-by: Jude Brown --- crawl-ref/source/delay.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/delay.cc') diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index 5784a95c82..f9b887cbf5 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -794,7 +794,7 @@ void handle_delay() case DELAY_BUTCHER: case DELAY_BOTTLE_BLOOD: - if (!is_valid_item(mitm[delay.parm1])) + if (!mitm[delay.parm1].is_valid()) break; mprf(MSGCH_MULTITURN_ACTION, "You start %s the %s.", @@ -854,7 +854,7 @@ void handle_delay() if (you.hunger_state == HS_ENGORGED || you.hunger_state > HS_SATIATED && player_in_bat_form() || you.hunger_state >= HS_SATIATED - && is_valid_item(mitm[delay.parm1]) + && mitm[delay.parm1].is_valid() && is_poisonous(mitm[delay.parm1])) { // Messages handled in _food_change() in food.cc. @@ -876,7 +876,7 @@ void handle_delay() // monster could die and create a corpse with the same ID number... // However, it would not be at the player's square like the // original and that's why we do it this way. - if (is_valid_item(mitm[ delay.parm1 ]) + if (mitm[delay.parm1].is_valid() && mitm[ delay.parm1 ].base_type == OBJ_CORPSES && mitm[ delay.parm1 ].pos == you.pos()) { @@ -950,7 +950,7 @@ void handle_delay() while (!items_for_multidrop.empty() // Don't look for gold in inventory && items_for_multidrop[0].slot != PROMPT_GOT_SPECIAL - && !is_valid_item(you.inv[ items_for_multidrop[0].slot ])) + && !you.inv[items_for_multidrop[0].slot].is_valid()) { items_for_multidrop.erase( items_for_multidrop.begin() ); } @@ -1214,7 +1214,7 @@ static void _finish_delay(const delay_queue_item &delay) case DELAY_BOTTLE_BLOOD: { item_def &item = mitm[delay.parm1]; - if (is_valid_item(item) && item.base_type == OBJ_CORPSES) + if (item.is_valid() && item.base_type == OBJ_CORPSES) { if (item.sub_type == CORPSE_SKELETON) { @@ -1336,7 +1336,7 @@ static void _finish_delay(const delay_queue_item &delay) // quantity (delay.parm2). -- bwr // Make sure item still exists. - if (!is_valid_item( you.inv[ delay.parm1 ] )) + if (!you.inv[delay.parm1].is_valid()) break; // Must handle unwield_item before we attempt to copy -- cgit v1.2.3-54-g00ecf