Skip to main content

Merchant.CanSellToPlayer

Declaration#

public bool CanSellToPlayer(Inventory playerInventory, GDTKItem item, Int32 count)

Parameters#

NameDescription
playerInventoryPlayer's Inventory
itemItem to sell
countNumber of the item

Description#

Checks if a certain number of item can be sold to player

Usage#

using NullSave.GDTK.Inventory;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(Merchant target, Inventory other)    {        bool result = target.CanSellToPlayer(other, other.items[0], 1);    }
}