Exemplo n.º 1
0
    //Returns if the durability of the item has been broken.
    public bool DamageDurability(Entity entity, ItemID item, double damage)
    {
        bool hasBeenBroken = false;

        foreach (var itemOnPlayer in entity.GetAllItemsOnPLayer())
        {
            if (item == itemOnPlayer)
            {
                hasBeenBroken = item.DamageDurability(damage);
                return(hasBeenBroken);
            }
        }
        return(hasBeenBroken);
    }