From 2c0a2b2364fbb07b596aba9c0b8e46dc524c27b3 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Mon, 29 Oct 2007 06:52:14 +0000 Subject: [1817715] Fixed autopickup trying to pick up nets you're caught in. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2651 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/itemprop.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/itemprop.cc') diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index f9f4857332..7163e965f0 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -479,17 +479,22 @@ void do_uncurse_item( item_def &item ) // void set_item_stationary( item_def &item ) { - item.plus2 = 1; + if (item.base_type == OBJ_MISSILES && item.sub_type == MI_THROWING_NET) + item.plus2 = 1; } void remove_item_stationary( item_def &item ) { - item.plus2 = 0; + if (item.base_type == OBJ_MISSILES && item.sub_type == MI_THROWING_NET) + item.plus2 = 0; } bool item_is_stationary( const item_def &item ) { - return (item.plus2); + return (you.attribute[ATTR_HELD] + && item.base_type == OBJ_MISSILES + && item.sub_type == MI_THROWING_NET + && item.plus2); } // -- cgit v1.2.3-54-g00ecf