- summary: Move some units of one item between your inventory and the open exchange (bank, chest, trade, craft). Positive quantity puts in, negative takes out.
- area: Game.Exchange
Move some units of one item between your inventory and the open exchange (bank, chest, trade, craft). Positive quantity puts in, negative takes out.
Kind request · Area Game.Exchange
The one request that moves items in every exchange window: the bank and other storages, a trade with a player, the crafting, recycling and smithing windows. The sign of the quantity gives the direction.
HOW TO SEND IT
1. AN EXCHANGE MUST BE OPEN, for a storage the one
ExchangeStartedWithStorageEvent announced.
2. PUTTING IN (from your inventory): ExchangeObjectMoveRequest.object_uid is the
item's uid IN YOUR INVENTORY, ExchangeObjectMoveRequest.quantity the number
of units, POSITIVE.
3. TAKING OUT (from the storage or exchange): object_uid is the item's uid IN THE
STORAGE (from StorageInventoryContentEvent / StorageObjectUpdateEvent),
quantity the number of units, NEGATIVE. The bank window sends -1 for a
plain drag of one item.
4. NEVER MORE THAN THE STACK. The client checks |quantity| against the stack size
of the item it finds under that uid (it looks in your inventory first, then in
the bank).
5. WAIT FOR THE RESULT; the client sends nothing else for this move. For a storage:
StorageObjectUpdateEvent (stack added or changed) or
StorageObjectRemovedEvent (stack gone) on the storage side, and on your side
ObjectAddedEvent or ObjectQuantityEvent (or an item removal), followed by
InventoryWeightEvent.
OBSERVED (one session): putting 2 of a 14-stack into a trash bin sent (inventory uid,
2) and was answered by StorageObjectUpdateEvent (new storage uid, quantity 2) and
ObjectQuantityEvent (stack 12); taking 1 back sent (storage uid, -1).
PADDING. Builds add an unread member (a repeated bool on 3.7). Fill only the two recovered members.
When you may send it
- Requires
exchange_openinferred - Raised by: the player drags an item between the inventory and an open exchange window (bank, storage, trade, craft or recycling window), or confirms a quantity in it proven
Related messages
- You will then receive
StorageObjectUpdateEventobserved — the storage stack as it now stands, after putting in or taking out part of a stack; 3 observations in one session (trash bin) - You will then receive
StorageObjectRemovedEventobserved — when the last unit of a stored item is taken out; 3 observations (bank and trash bin)
Fields
| # | Field | Type | Meaning | You set it |
|---|---|---|---|---|
| 1 | object_uid | int32 | The uid of the item to move, in the inventory it leaves: yours when putting in, the storage's when taking out. (item uid) | required |
| 3 | quantity | int32 | How many units to move: positive puts them into the exchange, negative takes them out. (item units, signed) Range: 1 .. stack size, or -stack size .. -1 The bank window sends -1 for a plain drag of one item out of the bank. | required |