Table of Contents

Method Drop

Namespace
GrindFest
Assembly
GrindFest.dll

Drop(ItemBehaviour)

Drops an item from inventory onto the ground.

public bool Drop(ItemBehaviour item)

Parameters

item ItemBehaviour

Item to drop

Returns

bool

True if the item was dropped, false otherwise

Remarks

This method will drop an item from the hero's inventory onto the ground at the hero's position.

Drop unwanted items:
var junkItems = Inventory.Where(item => item.GoldValue < 100).ToList(); // ToList() creates a copy to avoid modifying the collection while iterating
foreach(var item in junkItems)
{
    Drop(item);
    Say($"Dropped {item.name}, it's worthless!");
}