The shop
What fills the shop, what a client asks for, and what a server answers.
What fills it
A client’s catalogue of items is its own: no message sends or changes it. A client sets its shop up for its own champion, and what a match sells is settled by the client’s own data. A client filters nothing out of the shop by the champion’s level.
In 1.0.0.130–1.0.0.140
Loadoutdoes nothing to the shop: a client fills its shop from its own data, and takes the items it suggests from its champion’s own data.
In 1.0.0.130–1.0.0.140
The data of the map
VersionSyncnames lists the items that cannot be bought, and can list the only items the shop holds. No mode or variant has a list of its own, and nothing a server sends changes what can be bought.
In 1.0.0.140
Suggested items are kept per champion and chosen by the mode
VersionSyncnames, whatever the map.
Buying and selling
A client asks to buy with BuyItem, to sell or throw away an item with
RemoveItem, and to swap two slots of its inventory with SwapItems. Closing
the shop sends nothing.
In 1.0.0.130–1.0.0.140
Opening the shop sends
TutorialShopOpened, in any match, except while the shop is locked.
In 1.0.0.130–1.0.0.140
Opening the shop while the match is paused sends nothing.
A client asks to buy only where the item is one the match sells and priced within the champion’s gold.
A client asks for an item not built from others only where a slot is free or holds the same item below its stack limit.
A client asks only while the shop is not locked, with the champion dead or near a shop of its side.
A client never asks for an item a player holds only one of and holds already.
A client never places an item itself. It shows a purchase only when a server
answers with ItemAdded, a sale or loss with RemoveItemAnswer, and a swap
with SwapItemsAnswer. A server can also set a slot (InventorySlot), set the
whole inventory (InventorySnapshot), change an item’s charges
(ItemCharges), or report an item used (ItemUsed).
ItemAdded places the item and removes nothing: a server sends a
RemoveItemAnswer for each part an item built from others takes up. Gold
falls only as replication states the champion’s gold, and a purchase a server
never answers places nothing and spends nothing.
A purchase a server never answers still plays the sound of buying.
Undo
Where VersionSync’s features set shopUndo, the shop has an undo button, which
is enabled while ShopUndoCount gives the champion undos to spend. Pressing it
sends ShopUndo, whatever the count.
Closing and locking
CloseShop closes the shop where it is open. A message that locks the shop
alone, InputLock or InputLockToggled, closes it and turns off its key.
A message that locks other input along with the shop stops the shop opening, but leaves an open shop open and its key on.
Messages
Each message of this system in this book, with each layout it has across the book’s patches and every note its definition carries. A layout is the message’s body, after the header its channel’s family puts in front (see Messages).
Loadout
What a server sends to lay out everything a champion brought to the match: the runes set before it began, its summoner slots and the choices made alongside them. The header names the unit this is about.
In 1.0.0.130–1.0.0.148
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 1.0.0.130–1.0.0.143 | 44 |
| 1.0.0.144–1.0.0.148 | 41 |
A client’s shop is set up by the Loadout of its own champion: until that arrives the shop opens empty, with no items, no suggested items and no builds, and is drawn at a size that does not fit the screen. A server sends one for every champion at spawning, between SpawnStart and SpawnEnd.
| Field | Type | What it is |
|---|---|---|
| runes | 30 × u32 | The runes set before the match, thirty places in runs of nine, nine, nine and three. A place holds zero where nothing was set. |
| summoners | 2 × u32 | The spells in the champion’s summoner slots, by the numbers their names give. |
| choices | 80 × Choice | The choices made alongside them, one place each, and how far each was taken. A place stands empty where nothing was chosen. |
| level | u8 | The player’s account level. |
Vectors (2)
In 1.0.0.149–3.1.0.0
Command 41 on events, sent by the server, reliable.
A client’s shop is set up by the Loadout of its own champion: until that arrives the shop opens empty, with no items, no suggested items and no builds, and is drawn at a size that does not fit the screen. A server sends one for every champion at spawning, between SpawnStart and SpawnEnd. It also says what the champion’s wards look like.
| Field | Type | What it is |
|---|---|---|
| runes | 30 × u32 | The runes set before the match, thirty places in runs of nine, nine, nine and three. A place holds zero where nothing was set. |
| summoners | 2 × u32 | The spells in the champion’s summoner slots, by the numbers their names give. |
| choices | 80 × Choice | The choices made alongside them, one place each, and how far each was taken. A place stands empty where nothing was chosen. |
| level | u8 | The player’s account level. |
| wardSkin | u8 | What the champion’s wards look like. |
BuyItem
What a client sends to buy an item from the shop. The header names the sender’s champion.
In every range of this book
Carried on requests, sent by the client, reliable, under these commands:
| Builds | Command |
|---|---|
| 1.0.0.130–1.0.0.131 | 135 |
| 1.0.0.132–1.0.0.137 | 136 |
| 1.0.0.138 | 138 |
| 1.0.0.139–1.0.0.143 | 137 |
| 1.0.0.144–1.0.0.149 | 131 |
| 1.0.0.150–3.1.0.0 | 128 |
| Field | Type | What it is |
|---|---|---|
| item | u32 | Which item, by the number the client knows it as. |
RemoveItem
What a client sends to be rid of an item. The header names the sender’s champion.
In every range of this book
Command 9 on requests, sent by the client, reliable.
| Field | Type | What it is |
|---|---|---|
| which | 1-byte bits | |
| which.slot | bit 0 to 6 | Which slot. |
| which.sell | bit 7 | Set to sell the item, clear to throw it away. A client always sends it set. |
SwapItems
What a client sends to move an item from one slot to another. The header names the sender’s champion.
In 1.0.0.130–1.0.0.143
Command 35 on requests, sent by the client, reliable.
| Field | Type | What it is |
|---|---|---|
| from | u8 | |
| to | u8 |
Vectors (1)
In 1.0.0.144–3.1.0.0
Command 32 on requests, sent by the client, reliable.
| Field | Type | What it is |
|---|---|---|
| from | u8 | The slot the item leaves, which a 4.17 client sends only from 0 to 9. |
| to | u8 | The slot it goes to, never the one from names; a 4.17 client sends only 0 to 9. |
TutorialShopOpened
What a client sends as its player opens the shop. It carries nothing of its own. The header carries zero.
In 1.0.0.130–1.0.0.131
Command 96 on requests, sent by the client, reliable.
A client sends it each time the shop opens, in any mode and on any map, except while a script lock keeps the shop shut or the match is paused.
No body.
Vectors (1)
In 1.0.0.132–1.0.0.137
Command 97 on requests, sent by the client, reliable.
A client sends it only in the tutorial: where the version answer names the mode TUTORIAL and the map’s own data marks it as a tutorial map, as map 12’s does; elsewhere it never sends this.
No body.
Vectors (1)
In 1.0.0.138–1.0.0.143
Command 99 on requests, sent by the client, reliable.
A client sends it every time its player opens the shop, in any mode and on any map, except while a lock of its own on the shop holds or the game is paused.
No body.
Vectors (1)
In 1.0.0.144–3.1.0.0
Carried on requests, sent by the client, reliable, under these commands:
| Builds | Command |
|---|---|
| 1.0.0.144–1.0.0.149 | 93 |
| 1.0.0.150–3.1.0.0 | 90 |
A client sends it only in the tutorial: where the version answer names the mode TUTORIAL and the map’s own data marks it as a tutorial map, as map 12’s does; elsewhere it never sends this.
No body.
Vectors (2)
ShopEnabled
What a server sends to say whether a champion can use the shop. The header names the champion.
In 1.0.0.141–1.0.0.146
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 1.0.0.141–1.0.0.143 | 253 |
| 1.0.0.144–1.0.0.146 | 240 |
| Field | Type | What it is |
|---|---|---|
| enabled | u8 | Set where the shop can be used. Any nonzero value sets it. |
Vectors (2)
In 1.0.0.147–3.1.0.0
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 1.0.0.147–1.0.0.149 | 240 |
| 1.0.0.150–3.1.0.0 | 237 |
| Field | Type | What it is |
|---|---|---|
| flags | 1-byte bits | Whether it can be used. |
| flags.enabled | bit 0 | Set where the shop can be used. |
| flags.unused | bit 1 to 7 | Unused; a server writes zero. |
Vectors (2)
ItemAdded
What a server sends to set what sits in one of a unit’s item slots. The header names the unit this is about.
In 1.0.0.130–1.0.0.134
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 1.0.0.130–1.0.0.131 | 114 |
| 1.0.0.132–1.0.0.134 | 115 |
A server sends it to units nobody is buying for.
| Field | Type | What it is |
|---|---|---|
| slot | u8 | The slot it went to. A client rejects the message from 38 up. |
| item | u32 | Which item, by the number the client knows it as. |
| inSlot | u8 | How many of the item the slot holds; zero leaves the slot as it was. The slot’s charges come from the item’s own data. |
| activate | u8 | Nonzero readies the item’s own spell, in the slot four past the item’s, and has the client answer with RemoveItem for it. |
Vectors (2)
In 1.0.0.135–1.0.0.137
Command 115 on events, sent by the server, reliable.
A server sends it to units nobody is buying for.
| Field | Type | What it is |
|---|---|---|
| item | u32 | Which item, by the number the client knows it as. |
| slot | u8 | The slot it went to. A client rejects the message from 38 up. |
| inSlot | u8 | How many of the item the slot holds; zero leaves the slot as it was. The slot’s charges come from the item’s own data. |
| activate | u8 | Nonzero readies the item’s own spell, in the slot four past the item’s, and has the client answer with RemoveItem for it. |
| how | 1-byte bits | |
| how.announce | bit 0 | Set to announce the purchase: a client shows it where the unit is on its side (or it plays a replay), the item’s own data allows it, the player’s setting asks for it, and the same item was not bought in the last 5 seconds, a repeat within them restarting the wait. |
| how.unused | bit 1 to 7 | Unused; a server writes zero. |
Vectors (1)
In 1.0.0.138–1.0.0.143
Command 117 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| item | u32 | Which item, by the number the client knows it as. |
| slot | u8 | The slot it went to. A client rejects the message from 38 up. |
| inSlot | u8 | How many of the item the slot holds; zero leaves the slot as it was. The slot’s charges come from the item’s own data. |
| how | 1-byte bits | |
| how.announce | bit 0 | Set to announce the purchase: a client shows it where the unit is on its side (or it plays a replay), the item’s own data allows it, the player’s setting asks for it, and the same item was not bought within the client’s wait, 5 seconds unless a setting of its own changes it, a repeat within it restarting the wait. |
| how.unused | bit 1 to 7 | Unused; a server writes zero. |
Vectors (1)
In 1.0.0.144–1.0.0.146
Command 111 on events, sent by the server, reliable.
A server sends it to units nobody is buying for.
| Field | Type | What it is |
|---|---|---|
| item | u32 | Which item, by the number the client knows it as. |
| slot | u8 | The slot it went to. A client rejects the message from 38 up. |
| inSlot | u8 | How many of the item the slot holds; zero leaves the slot as it was. The slot’s charges come from the item’s own data. |
| how | 1-byte bits | |
| how.announce | bit 0 | Set to announce the purchase: a client shows it where the unit is on its side (or it plays a replay), the item’s own data allows it, the player’s setting asks for it, and the same item was not bought in the last 5 seconds, a repeat within them restarting the wait. |
| how.unused | bit 1 to 7 | Unused; a server writes zero. |
Vectors (1)
In 1.0.0.147–3.1.0.0
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 1.0.0.147–1.0.0.149 | 111 |
| 1.0.0.150–3.1.0.0 | 108 |
A server sends it to units nobody is buying for.
| Field | Type | What it is |
|---|---|---|
| item | u32 | Which item, by the number the client knows it as. |
| slot | u8 | The slot it went to. A client rejects the message from 38 up. |
| inSlot | u8 | How many of the item the slot holds; zero leaves the slot as it was. The slot’s charges come from the item’s own data. |
| how | 1-byte bits | |
| how.unused | bit 0 to 5 | Unused; a server writes zero. |
| how.announce | bit 6 | Set to announce the purchase: a client shows it where the unit is on its side (or it plays a replay), the item’s own data allows it, the player’s setting asks for it, and the same item was not bought in the last 5 seconds, a repeat within them restarting the wait. |
| how.unused7 | bit 7 | Unused; a server writes zero. |
Vectors (2)
RemoveItemAnswer
What a server sends to confirm an item left a slot. The header names the unit this is about.
In every range of this book
Command 11 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| slot | u8 | Which slot, 0 to 37. For a higher one a client does nothing at all; for 0 to 37 it updates the slot and tells its screens the inventory changed, whatever left is. |
| left | u8 | How many are left in the slot; zero empties it, item and charges cleared. Either way a client cancels any spell or action its player had picked. |
SwapItemsAnswer
What a server sends to confirm an item moved between slots. The header names the unit this is about.
In every range of this book
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 1.0.0.130–1.0.0.131 | 68 |
| 1.0.0.132–1.0.0.143 | 69 |
| 1.0.0.144–1.0.0.149 | 64 |
| 1.0.0.150–3.1.0.0 | 61 |
| Field | Type | What it is |
|---|---|---|
| from | u8 | The slot the item left. |
| to | u8 | The slot it went to. |
Vectors (3)
InventorySlot
What a server sends to set one slot of a unit’s inventory. The header names the unit. A client empties the slot, then fills it where count is above zero, and refreshes the shop where the unit is its own champion.
In 1.0.0.130–1.0.0.134
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 1.0.0.130–1.0.0.131 | 86 |
| 1.0.0.132–1.0.0.134 | 87 |
| Field | Type | What it is |
|---|---|---|
| slot | u8 | Which slot, 0 to 39. A client ignores the message from 40 up. |
| item | u32 | The item. It has no effect where count is zero. |
| count | u8 | How many. Zero leaves the slot empty. |
| charges | u8 | Its charges. |
Vectors (2)
In 1.0.0.135–1.0.0.137
Command 87 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| item | u32 | The item. It has no effect where count is zero. |
| slot | u8 | Which slot, 0 to 39. A client ignores the message from 40 up. |
| count | u8 | How many. Zero leaves the slot empty. |
| charges | u8 | Its charges. |
Vectors (1)
In 1.0.0.138–1.0.0.143
Command 89 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| item | u32 | The item. It has no effect where count is zero. |
| slot | u8 | Which slot, 0 to 37. A client ignores the message from 38 up. |
| count | u8 | How many. Zero leaves the slot empty. |
| charges | u8 | Its charges. |
Vectors (1)
In 1.0.0.144–3.1.0.0
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 1.0.0.144–1.0.0.149 | 83 |
| 1.0.0.150–3.1.0.0 | 80 |
| Field | Type | What it is |
|---|---|---|
| item | u32 | The item. It has no effect where count is zero. |
| slot | u8 | Which slot, 0 to 39. A client ignores the message from 40 up. |
| count | u8 | How many. Zero leaves the slot empty. |
| charges | u8 | Its charges. |
Vectors (2)
ItemUsed
What a server sends after an item in a unit’s inventory is used. The header names the unit.
In every range of this book
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 1.0.0.130–1.0.0.131 | 167 |
| 1.0.0.132–1.0.0.134 | 168 |
| 1.0.0.135 | 170 |
| 1.0.0.136–1.0.0.137 | 168 |
| 1.0.0.138 | 170 |
| 1.0.0.139–1.0.0.143 | 169 |
| 1.0.0.144–1.0.0.149 | 159 |
| 1.0.0.150–3.1.0.0 | 156 |
| Field | Type | What it is |
|---|---|---|
| slot | u8 | Which slot. |
| left | u8 | How many are left in it; zero empties the slot. |
| charges | u8 | How many charges it holds. |
CloseShop
What a server sends to close a client’s shop. The header carries zero.
In every range of this book
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 1.0.0.130–1.0.0.143 | 15 |
| 1.0.0.144–3.1.0.0 | 14 |
No body.