Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Spells

Casting, levelling spells, cooldowns, and the missiles casts send out.

Casting

A client asks to cast from one of its champion’s slots with CastSpell, at a point or at a unit. A server answers with SpellCastAnswer, which says the unit is casting and carries the whole casting: the spell, its level, its target, its timings and the missile it will send. A client shows the cast from that answer; CastSpell alone shows nothing. A server then sets how long until the slot is ready with SpellCooldown, and, for a spell with uses, how many are left with SpellCharges. A client reports a cooldown it sets by itself with CooldownSet.

Which slots a client lets its player cast from at all is a value of the champion’s that replication carries.

In 0.8.13.26–0.9.25.35

A client still casts from a casting record whose length disagrees with its count of targets.

A spell held down before it is let go charges where the cast answer leaves its flags clear. While it charges, a client sends SpellCharge with the cursor’s position, and once more as the charge ends.

A server ends a spell’s aiming on a client with CancelTargeting, shows and takes away a spell’s targeter on a client’s own champion with SpellTargeterShown and SpellTargeterHidden, and sets which spells a unit casts by itself with Autocast.

Levelling

A client asks to put a point into a spell with UpgradeSpell. A server answers with SpellUpgraded, and a client shows the new level; SpellLevel sets a level outright. The spell points a champion has to spend are what LevelUp carries. A server can set how far each spell can be raised, and at which champion levels, with SpellRankLimits.

A client spends the point as it sends UpgradeSpell. LevelUp states the champion’s level and its points.

In 0.9.25.24–1.0.0.24

A command its player types sends UpgradeSpell without checking anything.

What a slot holds

SpellInSlot puts a spell in a slot. SpellSlotChanged changes one thing about a spell already there: how it is aimed, its name, its ranges, its icon, or the units it is cast from. SpellTargetingChanged, SpellNameChanged, SpellRangeChanged, SpellIconChanged and SpellOffsetTargetChanged each change one of these alone, and SpellSlotChangedForOwner changes a slot as SpellSlotChanged does, for the owner’s client alone. SpellToggled turns a spell on or off, SpellNumbers fills in the numbers a client shows beside a unit’s spells, and SpellCostChanged changes what a spell costs. A server can also draw rings around its player’s cursor with CursorRings.

A marker has no slots. A server MUST NOT send SpellInSlot naming a marker: a client fails on it, whatever the slot.

Missiles

A missile is named by its own id. MissileState says where one is and what it is doing, with the casting that sent it; MissileLaunched says the missile a swing or a cast prepared has left the unit. A server changes what a missile flies at with MissileRetarget and how fast with MissileSpeed, says what it struck with MissileHits, and is rid of it with DestroyMissile. A missile that bounces from unit to unit does so with BounceMissile, and a server can name in advance the units a chain missile will strike with ChainTargets. MissileCourse sets where a missile starts and how fast it flies, and restarts its flight. A client reports where a missile that flies straight is, and where it is going, with MissileReport, which a server MAY ignore.

In 0.9.25.24–1.0.0.24

Only a missile that flies straight acts on MissileHits.

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).

CastSpell

What a client sends to cast something from a slot, at a point or at a unit. The header names the sender’s champion.

Definition.

In 0.8.13.26–0.9.22.13

Command 35 on requests, sent by the client, reliable.

FieldTypeWhat it is
how1-byte bits
how.summonerSpellbit 0Set where the slot is a summoner spell’s.
how.slotbit 1 to 7Which slot is being cast from, from 0 to 22. A client still sends a larger slot, its low seven bits only.
xf32A point on the ground the cast is described by, along one axis, in world units.
yf32The same point, in height, in world units: the height of the place aimed at.
zf32The same point, along the other axis, in world units.
endXf32The second point of what aims the spell; for a spell that takes no aim it is the caster’s own position, the same as the first.
endYf32The second point, in height, in world units: the height of where the cast ends.
endZf32The second point, along the other axis, in world units.
targetu32The unit aimed at; for a spell that takes no aim, the caster itself, with its own position in both points. Zero only where no unit is aimed at.
Vectors (1)

one-on-0-8-13-26

In 0.9.22.14–1.0.0.24

Command 35 on requests, sent by the client, reliable.

FieldTypeWhat it is
how1-byte bits
how.summonerSpellbit 0Set where the slot is a summoner spell’s.
how.slotbit 1 to 7Which slot is being cast from, from 0 to 44. A client still sends a larger slot, its low seven bits only.
xf32A point on the ground the cast is described by, along one axis, in world units.
yf32The same point, in height, in world units: the height of the place aimed at.
zf32The same point, along the other axis, in world units.
endXf32The second point of what aims the spell; for a spell that takes no aim it is the caster’s own position, the same as the first.
endYf32The second point, in height, in world units: the height of where the cast ends.
endZf32The second point, along the other axis, in world units.
targetu32The unit aimed at; for a spell that takes no aim, the caster itself, with its own position in both points. Zero only where no unit is aimed at.
Vectors (1)

one-on-0-9-22-14

SpellCastAnswer

What a server sends to say a unit is casting a spell. The header names the unit casting, as the casting inside does.

Definition.

In every range of this book

Command 36 on events, sent by the server, reliable.

There is no byte for ending a charge and no sync id: the casting follows the header at once.

FieldTypeWhat it is
castSpellCastThe casting.

SpellCooldown

What a server sends to set how long until one of a unit’s spells is ready. The header names the unit this is about.

Definition.

In 0.8.13.26–0.9.22.13

Command 33 on events, sent by the server, reliable.

It carries no whole cooldown to show the time left against.

FieldTypeWhat it is
unreadbytes, 5A client reads nothing here. A server writes zero.
which1-byte bits
which.slotbit 0 to 6Which slot.
which.summonerSpellbit 7Set where the slot counts among the summoner slots, so that 0 and 1 name those two.
timeLeftf32How long is left, in seconds.
Vectors (1)

one-on-0-8-13-26

In 0.9.22.14–1.0.0.24

Command 33 on events, sent by the server, reliable.

It carries no whole cooldown to show the time left against.

FieldTypeWhat it is
which1-byte bits
which.slotbit 0 to 6Which slot.
which.summonerSpellbit 7Set where the slot counts among the summoner slots, so that 0 and 1 name those two. A client fails where it is set for a unit that is not a champion.
timeLeftf32How long is left, in seconds.

CooldownSet

What a client sends where a script of its own sets a spell slot’s cooldown. The header names the unit.

Definition.

In 0.8.13.26–0.9.22.13

Command 33 on requests, sent by the client, reliable.

FieldTypeWhat it is
tokenu32Names this report: its low 24 bits count up by one with each numbered request the client sends, of any kind, and its high 8 bits hold the byte below.
clientByteu8A byte of the client’s own, as in token.
which1-byte bits
which.slotbit 0 to 6Which slot, 0 to 22.
which.summonerSpellbit 7Set where a script names the unit’s second set of spells.
cooldownf32The cooldown set, in seconds.
Vectors (1)

one-on-0-8-13-26

In 0.9.22.14–1.0.0.24

Command 33 on requests, sent by the client, reliable.

FieldTypeWhat it is
which1-byte bits
which.slotbit 0 to 6Which slot. For a slot outside the unit’s range a client sends 0.
which.summonerSpellbit 7Set where the slot is one from 4 to 40; slot still carries that slot’s own number.
cooldownf32The cooldown set, in seconds.

Autocast

What a server sends to set which spells a unit casts by itself. The header names the unit.

Definition.

In 0.8.13.26–0.9.22.13

Command 40 on events, sent by the server, reliable.

It names one slot: there is no slot for a critical strike.

FieldTypeWhat it is
sloti8The slot cast by itself, from -1 to 22. A client takes a value outside that range as it stands. What -1 does is not recorded.
Vectors (1)

one-on-0-8-13-26

In 0.9.22.14–1.0.0.24

Command 40 on events, sent by the server, reliable.

It names one slot: there is no slot for a critical strike.

FieldTypeWhat it is
sloti8The slot cast by itself, from -1 to 44. A client takes a value outside that range as it stands. What -1 does is not recorded.
Vectors (1)

one-on-0-9-22-14

UpgradeSpell

What a client sends to put a point into a spell. The header names the sender’s champion.

Definition.

In every range of this book

Command 18 on requests, sent by the client, reliable.

A client takes the point off its own count before it sends this. There is no evolution point.

FieldTypeWhat it is
slotu8Which slot is being raised: 0 to 3, for the champion’s own spells, though a client does not hold itself to that range.

SpellUpgraded

What a server sends to confirm a unit’s spell went up a level. The header names the unit this is about.

Definition.

In every range of this book

Command 19 on clock, sent by the server, reliable.

A client handles it the same on every channel: it sets the slot’s level and the points left. It does this only for a champion, and nothing for any other unit.

FieldTypeWhat it is
slotu8Which slot.
levelu8The level the spell now stands at. A client takes any level above 5 as 5.
pointsLeftu8How many spell points are left unspent.

SpellTargetingChanged

What a server sends to change how a spell already in a unit’s slot is aimed. The header names the unit this is about.

Definition.

In 0.9.22.14–0.9.25.35

Command 133 on events, sent by the server, reliable.

FieldTypeWhat it is
which1-byte bits
which.slotbit 0 to 6Which slot. A champion’s own spells count from 0.
which.summonerSlotsbit 7Set where the slot counts among the summoner slots, so that 0 and 1 name those two.
targetingu8How the spell is aimed, 0 to 6. A client fails for any larger value; no value asks for the spell’s own default.
Vectors (1)

one-on-0-9-25-24

In 0.9.25.36–1.0.0.24

Command 132 on events, sent by the server, reliable.

FieldTypeWhat it is
which1-byte bits
which.slotbit 0 to 6Which slot. A champion’s own spells count from 0.
which.summonerSlotsbit 7Set where the slot counts among the summoner slots, so that 0 and 1 name those two. A client fails where it is set for a unit that is not a champion.
targetingu8How the spell is aimed, 0 to 6. For a larger value a client still writes it onto the slot but builds no aiming for it, which has no defined effect; no value asks for the spell’s own default.

SpellNameChanged

What a server sends to put another spell into a slot of a unit’s that already holds one. The header names the unit this is about.

Definition.

In 0.9.25.36–1.0.0.24

Command 172 on events, sent by the server, reliable.

FieldTypeWhat it is
which1-byte bits
which.slotbit 0 to 6Which slot. A champion’s own spells count from 0.
which.summonerSlotsbit 7Set where the slot counts among the summoner slots, so that 0 and 1 name those two. A client fails where it is set for a unit that is not a champion.
nametext, ended by a zero byteThe name the client loads the spell under, ended by a zero byte. A client shows the named spell’s icon in the slot, and treats a name it has no spell for as an error.

SpellNumbers

What a server sends to fill in the numbers a client shows beside a unit’s spells. The header names no object: a server writes zero.

Definition.

In 0.9.25.21–0.9.25.35

Command 168 on events, sent by the server, reliable.

FieldTypeWhat it is
entryCountu16How many sets of numbers follow. A client reads every set it names.
entriescount in entryCount × recordThe sets themselves.
entries[].unitu32The unit whose spell this is.
entries[].slotu8Which of the unit’s spell slots. A client fails where the unit has no such slot.
entries[].values3 × f32The numbers themselves, one place each.
Vectors (1)

one-on-0-9-25-24

In 0.9.25.36–1.0.0.24

Command 166 on events, sent by the server, reliable.

FieldTypeWhat it is
entryCountu16How many sets of numbers follow. A client reads every set it names.
entriescount in entryCount × recordThe sets themselves.
entries[].unitu32The unit whose spell this is.
entries[].slotu8Which slot.
entries[].values3 × f32The numbers themselves, one place each.
Vectors (1)

one-on-0-9-25-36

MissileState

What a server sends to say where a missile is and what it is doing.

Definition.

In 0.8.13.26–0.9.22.13

Command 67 on events, sent by the server, reliable.

The casting names the caster; the header need not. Where the header names a missile the client already holds, that missile moves to atX to atZ as well. A client sets the missile at atX to atZ, finite or not.

FieldTypeWhat it is
atXf32Where the missile is, along one ground axis, in world units.
atYf32Where the missile is, in height, in world units.
atZf32Where the missile is, along the other ground axis, in world units.
castSpellCastThe casting that threw it.
Vectors (1)

one-on-0-8-13-26

In 0.9.22.14–0.9.22.15

Command 63 on events, sent by the server, reliable.

A client sets every missile at atX to atZ, and reads the rest of the prefix for a line missile alone. The header names the unit casting, as the casting inside does.

FieldTypeWhat it is
atXf32Where the missile is, along one ground axis, in world units.
atYf32Where the missile is, in height, in world units.
atZf32Where the missile is, along the other ground axis, in world units.
keptXf32A value along one ground axis that a line missile keeps and reports back in MissileReport. Any other missile reads nothing here.
keptYf32The same, in height.
keptZf32The same, along the other ground axis.
directionXf32The way a line missile travels, along one ground axis: the client scales it by the missile’s speed and adds it to the position. Any other missile reads nothing here.
directionYf32The same, in height.
directionZf32The same, along the other ground axis.
how1-byte bits
how.flagbit 0Changes how a line missile is set up; any other missile reads nothing here.
how.unusedbit 1 to 7Unused; a server writes zero.
castSpellCastThe casting that threw it.
Vectors (1)

one-on-0-9-22-14

In 0.9.22.16–1.0.0.24

Command 63 on events, sent by the server, reliable.

A client reads neither a speed nor a part of the missile’s life spent. Neither the ground-height rule for endY nor a trail moved on by an age is confirmed. A client places the casting’s second unit, where it holds that unit, where the thrower stood rather than with the casting unit. The header names the unit casting, as the casting inside does.

FieldTypeWhat it is
atXf32Where the missile is, along one ground axis, in world units.
atYf32Where the missile is, in height, in world units.
atZf32Where the missile is, along the other ground axis, in world units.
casterAtXf32Where the unit that threw it stood when it left, along one ground axis, in world units.
casterAtYf32Where the unit that threw it stood when it left, in height, in world units.
casterAtZf32Where the unit that threw it stood when it left, along the other ground axis, in world units.
facingXf32Which way the missile points, along one ground axis.
facingYf32Which way the missile points, in height.
facingZf32Which way the missile points, along the other ground axis.
velocityXf32How fast the missile travels, along one ground axis, in world units a second.
velocityYf32How fast the missile travels, in height, in world units a second.
velocityZf32How fast the missile travels, along the other ground axis, in world units a second.
endXf32Where the missile is bound for, along one ground axis, in world units.
endYf32Where the missile is bound for, in height, in world units.
endZf32Where the missile is bound for, along the other ground axis, in world units.
unitAtXf32Where to place the casting unit, along one ground axis, in world units, unless the casting itself places it.
unitAtYf32Its height, in world units.
unitAtZf32Where to place the casting unit, along the other ground axis, in world units.
how1-byte bits
how.bouncedbit 0Set where the missile has bounced. A client tests the whole byte, so any set bit counts. For a missile it already holds that flies in a straight line, a client then starts the line again from the caster’s position, raised by the missile’s height above the ground, aiming it from where the missile now is.
how.unusedbit 1 to 7Unused; a server writes zero.
castSpellCastThe casting that threw it.

MissileHits

What a server sends to say which units a missile struck. The header names the missile.

Definition.

In 0.9.22.16–1.0.0.24

Carried on events, sent by the server, reliable, under these commands:

BuildsCommand
0.9.22.16–0.9.25.35163
0.9.25.36–1.0.0.24161
FieldTypeWhat it is
countu16How many units follow. A client reads it as signed, so a count of zero or above 32767 carries no units, and a server sends at most 32767.
targetscount in count × u32The units struck, in order. A client still takes a unit it does not know, with nothing shown on it, and nothing after the hit that destroys the missile shows.
Vectors (1)

one-on-0-9-25-24

DestroyMissile

What a server sends to be rid of a missile a client is drawing. The header names the missile.

Definition.

In every range of this book

Carried on events, sent by the server, reliable, under these commands:

BuildsCommand
0.8.13.26–0.9.22.13105
0.9.22.14–1.0.0.24102

No body.

Vectors (1)

one-on-0-8-13-26

ChainTargets

What a server sends to name the units a chain missile will strike in turn. The header names the missile.

Definition.

In 0.8.13.26–0.9.22.13

Command 106 on events, sent by the server, reliable.

Where the client holds the caster, the caster takes the list, whether or not the client already holds the missile.

FieldTypeWhat it is
counti32How many of the slots are used, 0 to 32; 0 or less leaves the targets the client holds as they are. A client sets no bound, and more than 32 has no defined effect.
casteru32The unit casting the missile. Where a client does not hold it, the client starts no missile, though a missile it already holds under the header’s name still takes the targets.
targets32 × u32Always 32 slots; those past count have no effect.
Vectors (1)

one-on-0-8-13-26

In 0.9.22.14–0.9.25.35

Command 103 on events, sent by the server, reliable.

Where the client already holds the missile, the missile takes the list, and so does the caster’s current cast; otherwise the list waits for the caster’s next chain missile.

FieldTypeWhat it is
counti32How many of the slots are used, 0 to 32; 0 or less leaves the targets the client holds as they are. A client sets no bound, and more than 32 has no defined effect.
casteru32The unit casting the missile. Where a client does not hold it, the client starts no missile, though a missile it already holds under the header’s name still takes the targets.
targets32 × u32Always 32 slots; those past count have no effect.
Vectors (1)

one-on-0-9-25-24

In 0.9.25.36–1.0.0.24

Command 103 on events, sent by the server, reliable.

Where the client already holds the missile, the missile takes the list; otherwise the list waits for the caster’s next chain missile.

FieldTypeWhat it is
counti32How many of the slots are used, 0 to 32; 0 clears every target the client holds, and a count below zero names no targets and clears nothing. A count above 32 has no defined effect.
casteru32The unit casting the missile. Where a client does not hold it, the client starts no missile, though a missile it already holds under the header’s name still takes the targets.
targets32 × u32Always 32 slots; those past count have no effect. A slot naming a unit the client does not know is left empty.

MissileReport

What a client sends to report where a missile that flies straight is and where it is going. A server need do nothing with it. The header names the missile.

Definition.

In 0.9.22.14–0.9.22.15

Command 63 on requests, sent by the client, reliable.

A client sends it always 173 bytes long, header included. A line missile writes every field; any other missile writes only atX to atZ and the cast, and leaves the rest unwritten.

FieldTypeWhat it is
atXf32Where the missile is, in world units, along one ground axis.
atYf32Where the missile is, in world units, in height.
atZf32Where the missile is, in world units, along the other ground axis.
keptXf32What the line missile keeps from MissileState’s keptX.
keptYf32The same, in height.
keptZf32The same, along the other ground axis.
directionXf32The way the line missile travels, along one ground axis.
directionYf32The same, in height.
directionZf32The same, along the other ground axis.
flagu8The line missile’s flag, as MissileState carried it.
castbytes, 128A description of the cast the missile belongs to, with whatever stood in memory after it up to the field’s end.
Vectors (1)

one-on-0-9-22-14

In 0.9.22.16–1.0.0.24

Command 63 on requests, sent by the client, reliable.

A client also sends it 209 bytes long, header included, from a missile of its own. That form writes only atX to atZ, velocityX to velocityZ and the cast, and leaves every other byte unwritten.

FieldTypeWhat it is
atXf32Where the missile is, in world units, along one ground axis.
atYf32Where the missile is, in world units, in height.
atZf32Where the missile is, in world units, along the other ground axis.
unknownAXf32What this holds is not recorded.
unknownAYf32What this holds is not recorded.
unknownAZf32What this holds is not recorded.
travelXf32Its end less its start, in world units, along one ground axis.
travelYf32Its end less its start, in world units, in height.
travelZf32Its end less its start, in world units, along the other ground axis.
velocityXf32How fast it travels, in world units a second, along one ground axis.
velocityYf32How fast it travels, in world units a second, in height.
velocityZf32How fast it travels, in world units a second, along the other ground axis.
endXf32Where it ends, in world units, along one ground axis.
endYf32Where it ends, in world units, in height.
endZf32Where it ends, in world units, along the other ground axis.
targetXf32Where its target is, or the point it aims at, in world units, along one ground axis.
targetYf32Where its target is, or the point it aims at, in world units, in height.
targetZf32Where its target is, or the point it aims at, in world units, along the other ground axis.
flagu8Zero or one; what it means is not recorded.
castbytes, sized by remainingA description of the cast the missile belongs to, at most 512 bytes.