diff options
author | Vsevolod Kozlov <zaba@thorium.homeunix.org> | 2009-11-06 15:54:52 +0300 |
---|---|---|
committer | Jude Brown <bookofjude@users.sourceforge.net> | 2009-11-06 23:22:04 +1000 |
commit | 8aaaca3d1c38a41d88b6dddf55fa48fd9aecb539 (patch) | |
tree | 7e3d75c7a1f32cc41facc17d36986df022a5870a /crawl-ref/source/delay.cc | |
parent | cddc002566e2f235a3785e12d534ebc0202bb53e (diff) | |
download | crawl-ref-8aaaca3d1c38a41d88b6dddf55fa48fd9aecb539.tar.gz crawl-ref-8aaaca3d1c38a41d88b6dddf55fa48fd9aecb539.zip |
Rename is_valid_item to item_def::is_valid.
Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
Diffstat (limited to 'crawl-ref/source/delay.cc')
-rw-r--r-- | crawl-ref/source/delay.cc | 12 |
1 files changed, 6 insertions, 6 deletions
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 |