Skip to content

Merchant UI

The Merchant UI is a very simple component that acts as a middle-man between two Bag UI components - Allowing both ends to transfer or trade their contents based on a particular set of rules.

Merchant UI

This component has two fields at the top:

  • Merchant Bag UI: A Bag UI component that contains information about the Bag that represents the merchant.
  • Client Bag UI: A Bag UI component that contains information about the Bag that represents the client (usually, the Player).

Trading

When a Bag UI component is referenced by a Merchant UI, the Bag UI obtains information about the trading rules, which cascade and can be accessed from the Merchant Info section on a Bag Cell UI component.

There are also a couple of Instruction lists at the bottom that are executed when this Merchant UI executes a transaction.

Buy and Sell

Note that Buy and Sell are from the client's perspective (aka the Player). So the On Buy instructions run when the client purchases an item, and On Sell run when the client sells an item.

Back to top