summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/itemprop.cc11
-rw-r--r--crawl-ref/source/items.cc7
2 files changed, 12 insertions, 6 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index 12bd224998..ba5d23828c 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -458,17 +458,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);
}
//
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 156e7e852d..7f93cb7796 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -1318,9 +1318,7 @@ int find_free_slot(const item_def &i)
// the player's inventory is full.
int move_item_to_player( int obj, int quant_got, bool quiet )
{
- if (you.attribute[ATTR_HELD] && mitm[obj].base_type == OBJ_MISSILES
- && mitm[obj].sub_type == MI_THROWING_NET
- && item_is_stationary(mitm[obj]))
+ if (item_is_stationary(mitm[obj]))
{
mpr("You cannot pick up the net that holds you!");
return (1);
@@ -2776,6 +2774,9 @@ static bool is_forced_autopickup(const item_def &item, std::string &iname)
bool item_needs_autopickup(const item_def &item)
{
+ if (item_is_stationary(item))
+ return (false);
+
if (strstr(item.inscription.c_str(), "=g") != 0)
return (true);