diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-23 11:25:01 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-23 11:25:01 +0000 |
commit | 933b0c361d7ee4914b89e725a8886abb5f5e9d2c (patch) | |
tree | 6cd9a4618f4a953e519ba9b0af24d1a184e0b501 /crawl-ref/source/itemprop.cc | |
parent | 82fa0cb1d1d28ae309754c0dbcd620c554f7f1d9 (diff) | |
download | crawl-ref-933b0c361d7ee4914b89e725a8886abb5f5e9d2c.tar.gz crawl-ref-933b0c361d7ee4914b89e725a8886abb5f5e9d2c.zip |
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
Diffstat (limited to 'crawl-ref/source/itemprop.cc')
-rw-r--r-- | crawl-ref/source/itemprop.cc | 14 |
1 files changed, 7 insertions, 7 deletions
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<randart_prop_type>(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<randart_prop_type>(rap) )) + return true; } return false; |