Returns the maximum number of an item allowed in a single purchase. Determines the largest value usable for the second argument (quantity
) of BuyMerchantItem()
when purchasing the item. For most items, this is the same as the maximum stack size of the item.
See also Merchant functions.
Signature:
maxStack
=
GetMerchantItemMaxStack(index)
Arguments:
index
- Index of an item in the vendor's listing (between 1 andGetMerchantNumItems()
) (number
)
Returns:
maxStack
- Largest number of items allowed in a single purchase (number
)
Examples:
-- Buys the largest quantity possible in one purchase for the given index BuyMerchantItem(index, GetMerchantItemMaxStack(index))