- summary: The server opened an NPC shop: which NPC sells, in which currency, and what it has on its shelf with prices and purchase limits.
- area: Game.Exchange
The server opened an NPC shop: which NPC sells, in which currency, and what it has on its shelf with prices and purchase limits.
Kind event · Area Game.Exchange
The server has opened an NPC SHOP for your character, typically in answer to the
NPC's buy/sell action (NpcGenericActionRequest with that action). You are now
in an exchange with the shop until it closes.
WHAT TO DO WHEN YOU RECEIVE IT
1. RECORD THE SELLER. ExchangeNpcShopStartedEvent.npc_seller_id is the NPC's
actor id on the current map, the same id you used to talk to it.
2. RECORD THE CURRENCY. ExchangeNpcShopStartedEvent.token_id is 0 when prices
are in kamas. Otherwise it is the template id of the token item the shop takes,
and every price is a number of those tokens.
3. READ THE STOCK. ExchangeNpcShopStartedEvent.objects lists the items on sale:
template and effects in ItemMinimalInformation, price and purchase
allowance in ItemToSellInNpcShop. The client shows only entries that carry
the shop branch; skip the others.
4. SEND NOTHING BACK. The client builds no request from it.
WHAT THE OFFICIAL CLIENT DOES WITH IT
- Converts every stock entry into a shop entry (template, effects, price, criterion, allowance) and hands the list, the seller id and the currency to its exchange service. - The service looks the seller up among the map's actors to draw its portrait, builds a display item for each entry, and opens the shop window. - The window shows your kamas, or how many tokens you hold in a token shop, and can hide what you cannot buy.
PADDING. Several builds add an unread member (an int64, a string, or an int64 and an int32). Use the recovered names, never the field order.
When you may send it
- Requires
character_loadedinferred
State it changes
- Establishes
exchange_openinferred — the client hands the shop to its exchange service, which records the started exchange and opens the shop window
Related messages
- Arrives after
NpcGenericActionRequest - Reply not yet recovered: buying, selling and closing the shop are not recovered here; none of those messages has a signature yet.
Fields
| # | Field | Type | Meaning | You set it |
|---|---|---|---|---|
| 1 | npc_seller_id | int64 | The selling NPC's actor id on the current map. (entity id) Observed: -20000The same id as the NPC you sent NpcGenericActionRequest to; the client looks the actor up by it to draw the seller's portrait. | never |
| 2 | token_id | int32 | The currency of the shop: 0 for kamas, otherwise the template id of the token item every price is counted in. (item template id) Observed: 0 | never |
| 3 | objects | repeated ItemMinimalInformation | The items on sale, one entry per item. Element type ItemMinimalInformation; its ItemMinimalInformation.item_to_sell_in_npc_shop carries the price and allowance. The client skips entries without it. | never |