Skip to main content

Merchant.CanBuyFromPlayer

Declaration#

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

Parameters#

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

Description#

Checks if a certain number of an item can be bought from player

Usage#

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