From 933b0c361d7ee4914b89e725a8886abb5f5e9d2c Mon Sep 17 00:00:00 2001 From: haranp Date: Tue, 23 Oct 2007 11:25:01 +0000 Subject: Fixed bad message with RAP_MAGICAL_POWER. Type safety; this required moving randart_prop_type to enum.h. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2518 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/itemprop.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'crawl-ref/source/itemprop.cc') diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 1ed8f1cc52..dfd8fde379 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -2048,8 +2048,8 @@ bool gives_ability( const item_def &item ) // check for evokable randart properties for (int rap = RAP_INVISIBLE; rap <= RAP_MAPPING; rap++) { - if (randart_wpn_property( item, rap )) - return true; + if (randart_wpn_property( item, static_cast(rap) )) + return true; } return false; @@ -2149,11 +2149,11 @@ bool gives_resistance( const item_def &item ) // check for randart resistances for (int rap = RAP_FIRE; rap <= RAP_CAN_TELEPORT; rap++) { - if (rap == RAP_MAGIC || rap >= RAP_INVISIBLE && rap != RAP_CAN_TELEPORT) - continue; - - if (randart_wpn_property( item, rap )) - return true; + if (rap == RAP_MAGIC || rap >= RAP_INVISIBLE && rap != RAP_CAN_TELEPORT) + continue; + + if (randart_wpn_property( item, static_cast(rap) )) + return true; } return false; -- cgit v1.2.3-54-g00ecf