From 504bcf4bd3bc5297ca3c508193d7590bae6c1836 Mon Sep 17 00:00:00 2001 From: Vsevolod Kozlov Date: Thu, 5 Nov 2009 22:03:07 +1000 Subject: Combine player_knows_spell, player_has_spell into player::has_spell. Signed-off-by: Jude Brown --- crawl-ref/source/item_use.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/item_use.cc') diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 50119d4f55..2bab2ccfce 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -196,10 +196,10 @@ static bool _valid_weapon_swap(const item_def &item) if (item.base_type == OBJ_MISSILES) { if (item.sub_type == MI_STONE) - return (player_knows_spell(SPELL_SANDBLAST)); + return (you.has_spell(SPELL_SANDBLAST)); if (item.sub_type == MI_ARROW) - return (player_knows_spell(SPELL_STICKS_TO_SNAKES)); + return (you.has_spell(SPELL_STICKS_TO_SNAKES)); return (false); } @@ -208,11 +208,11 @@ static bool _valid_weapon_swap(const item_def &item) if (item.base_type == OBJ_CORPSES) { return (item.sub_type == CORPSE_SKELETON - && player_knows_spell(SPELL_BONE_SHARDS)); + && you.has_spell(SPELL_BONE_SHARDS)); } // Sublimation of Blood. - if (!player_knows_spell(SPELL_SUBLIMATION_OF_BLOOD)) + if (!you.has_spell(SPELL_SUBLIMATION_OF_BLOOD)) return (false); if (item.base_type == OBJ_FOOD) -- cgit v1.2.3-54-g00ecf