Skip to main content

Merchant.GetBuyFromPlayerMaxCount

Declaration#

public Int32 GetBuyFromPlayerMaxCount(Inventory playerInventory, GDTKItem item)

Parameters#

NameDescription
playerInventoryPlayer's Inventory
itemItem to check

Description#

Gets the maximum number of an item that can be bought from player

Usage#

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