From 2ba16f4a387e8470b0b60ec546987a86fb21d0ab Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Sat, 24 Oct 2009 01:23:32 -0700 Subject: Do nothing if unwielding a non-weapon artefact Fix a bug where wielding a non-weapon artefact would do nothing, but unwielding it would could change your stats, leading to permanent stat loss (or permanent stat gain). Now unwielding an artefact armor/jewellery which you accidently wielded has no effect. --- crawl-ref/source/itemprop.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crawl-ref/source/itemprop.cc') diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 6fa64ae27b..b6f4ea7e9e 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -2733,6 +2733,11 @@ size_type item_size(const item_def &item) return (static_cast(size)); } +equipment_type get_item_slot(const item_def& item) +{ + return get_item_slot(item.base_type, item.sub_type); +} + equipment_type get_item_slot(object_class_type type, int sub_type) { switch(type) -- cgit v1.2.3-54-g00ecf