diff options
author | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-09 20:29:31 -0700 |
---|---|---|
committer | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-09 22:02:03 -0700 |
commit | d4491263ab3907a7ccb7a342e9da60437b4c8a04 (patch) | |
tree | e118fd7096c11cb250d9ca79fdad6f962251c60c /crawl-ref/source/items.cc | |
parent | 2e2f7582159d562570de933a4b4711cadaa7a006 (diff) | |
download | crawl-ref-d4491263ab3907a7ccb7a342e9da60437b4c8a04.tar.gz crawl-ref-d4491263ab3907a7ccb7a342e9da60437b4c8a04.zip |
Refactor a check to use is_ranged_weapon_type()
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r-- | crawl-ref/source/items.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index f6b778bbc4..83372fdc42 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -2782,12 +2782,8 @@ static bool _similar_equip(const item_def& pickup_item, return true; // Launchers of the same type are similar. - if ((pickup_item.sub_type >= WPN_BLOWGUN - && pickup_item.sub_type <= WPN_LONGBOW) - || pickup_item.sub_type == WPN_SLING) - { + if (is_ranged_weapon_type(pickup_item.sub_type)) return pickup_item.sub_type != inv_item.sub_type; - } return (weapon_skill(pickup_item) == weapon_skill(inv_item)) && (get_damage_type(pickup_item) == get_damage_type(inv_item)); |