summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/wpn-misc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/wpn-misc.cc')
-rw-r--r--crawl-ref/source/wpn-misc.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/crawl-ref/source/wpn-misc.cc b/crawl-ref/source/wpn-misc.cc
index c6d38f98e6..afc7494c01 100644
--- a/crawl-ref/source/wpn-misc.cc
+++ b/crawl-ref/source/wpn-misc.cc
@@ -178,10 +178,15 @@ unsigned char launched_by(unsigned char weapon_subtype)
}
} // end launched_by()
+int weapon_skill(const item_def &item)
+{
+ return weapon_skill(item.base_type, item.sub_type);
+}
+
// this function returns the skill that the weapon would use in melee
-char weapon_skill(unsigned char wclass, unsigned char wtype)
+int weapon_skill(int wclass, int wtype)
{
- char skill2use = SK_FIGHTING;
+ int skill2use = SK_FIGHTING;
if (wclass == OBJ_STAVES
&& (wtype < STAFF_SMITING || wtype >= STAFF_AIR))