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
UpgradeSpellwithout 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.
In 0.8.13.26–0.9.22.13
Command 35 on requests, sent by the client, reliable.
| Field | Type | What it is |
|---|---|---|
| how | 1-byte bits | |
| how.summonerSpell | bit 0 | Set where the slot is a summoner spell’s. |
| how.slot | bit 1 to 7 | Which slot is being cast from, from 0 to 22. A client still sends a larger slot, its low seven bits only. |
| x | f32 | A point on the ground the cast is described by, along one axis, in world units. |
| y | f32 | The same point, in height, in world units: the height of the place aimed at. |
| z | f32 | The same point, along the other axis, in world units. |
| endX | f32 | The 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. |
| endY | f32 | The second point, in height, in world units: the height of where the cast ends. |
| endZ | f32 | The second point, along the other axis, in world units. |
| target | u32 | The 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)
In 0.9.22.14–1.0.0.24
Command 35 on requests, sent by the client, reliable.
| Field | Type | What it is |
|---|---|---|
| how | 1-byte bits | |
| how.summonerSpell | bit 0 | Set where the slot is a summoner spell’s. |
| how.slot | bit 1 to 7 | Which slot is being cast from, from 0 to 44. A client still sends a larger slot, its low seven bits only. |
| x | f32 | A point on the ground the cast is described by, along one axis, in world units. |
| y | f32 | The same point, in height, in world units: the height of the place aimed at. |
| z | f32 | The same point, along the other axis, in world units. |
| endX | f32 | The 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. |
| endY | f32 | The second point, in height, in world units: the height of where the cast ends. |
| endZ | f32 | The second point, along the other axis, in world units. |
| target | u32 | The 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)
SpellCastAnswer
What a server sends to say a unit is casting a spell. The header names the unit casting, as the casting inside does.
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.
| Field | Type | What it is |
|---|---|---|
| cast | SpellCast | The 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.
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.
| Field | Type | What it is |
|---|---|---|
| unread | bytes, 5 | A client reads nothing here. A server writes zero. |
| which | 1-byte bits | |
| which.slot | bit 0 to 6 | Which slot. |
| which.summonerSpell | bit 7 | Set where the slot counts among the summoner slots, so that 0 and 1 name those two. |
| timeLeft | f32 | How long is left, in seconds. |
Vectors (1)
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.
| Field | Type | What it is |
|---|---|---|
| which | 1-byte bits | |
| which.slot | bit 0 to 6 | Which slot. |
| which.summonerSpell | bit 7 | Set 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. |
| timeLeft | f32 | How 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.
In 0.8.13.26–0.9.22.13
Command 33 on requests, sent by the client, reliable.
| Field | Type | What it is |
|---|---|---|
| token | u32 | Names 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. |
| clientByte | u8 | A byte of the client’s own, as in token. |
| which | 1-byte bits | |
| which.slot | bit 0 to 6 | Which slot, 0 to 22. |
| which.summonerSpell | bit 7 | Set where a script names the unit’s second set of spells. |
| cooldown | f32 | The cooldown set, in seconds. |
Vectors (1)
In 0.9.22.14–1.0.0.24
Command 33 on requests, sent by the client, reliable.
| Field | Type | What it is |
|---|---|---|
| which | 1-byte bits | |
| which.slot | bit 0 to 6 | Which slot. For a slot outside the unit’s range a client sends 0. |
| which.summonerSpell | bit 7 | Set where the slot is one from 4 to 40; slot still carries that slot’s own number. |
| cooldown | f32 | The cooldown set, in seconds. |
Autocast
What a server sends to set which spells a unit casts by itself. The header names the unit.
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.
| Field | Type | What it is |
|---|---|---|
| slot | i8 | The 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)
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.
| Field | Type | What it is |
|---|---|---|
| slot | i8 | The 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)
UpgradeSpell
What a client sends to put a point into a spell. The header names the sender’s champion.
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.
| Field | Type | What it is |
|---|---|---|
| slot | u8 | Which 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.
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.
| Field | Type | What it is |
|---|---|---|
| slot | u8 | Which slot. |
| level | u8 | The level the spell now stands at. A client takes any level above 5 as 5. |
| pointsLeft | u8 | How 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.
In 0.9.22.14–0.9.25.35
Command 133 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| which | 1-byte bits | |
| which.slot | bit 0 to 6 | Which slot. A champion’s own spells count from 0. |
| which.summonerSlots | bit 7 | Set where the slot counts among the summoner slots, so that 0 and 1 name those two. |
| targeting | u8 | How 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)
In 0.9.25.36–1.0.0.24
Command 132 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| which | 1-byte bits | |
| which.slot | bit 0 to 6 | Which slot. A champion’s own spells count from 0. |
| which.summonerSlots | bit 7 | Set 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. |
| targeting | u8 | How 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.
In 0.9.25.36–1.0.0.24
Command 172 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| which | 1-byte bits | |
| which.slot | bit 0 to 6 | Which slot. A champion’s own spells count from 0. |
| which.summonerSlots | bit 7 | Set 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. |
| name | text, ended by a zero byte | The 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.
In 0.9.25.21–0.9.25.35
Command 168 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| entryCount | u16 | How many sets of numbers follow. A client reads every set it names. |
| entries | count in entryCount × record | The sets themselves. |
| entries[].unit | u32 | The unit whose spell this is. |
| entries[].slot | u8 | Which of the unit’s spell slots. A client fails where the unit has no such slot. |
| entries[].values | 3 × f32 | The numbers themselves, one place each. |
Vectors (1)
In 0.9.25.36–1.0.0.24
Command 166 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| entryCount | u16 | How many sets of numbers follow. A client reads every set it names. |
| entries | count in entryCount × record | The sets themselves. |
| entries[].unit | u32 | The unit whose spell this is. |
| entries[].slot | u8 | Which slot. |
| entries[].values | 3 × f32 | The numbers themselves, one place each. |
Vectors (1)
MissileState
What a server sends to say where a missile is and what it is doing.
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.
| Field | Type | What it is |
|---|---|---|
| atX | f32 | Where the missile is, along one ground axis, in world units. |
| atY | f32 | Where the missile is, in height, in world units. |
| atZ | f32 | Where the missile is, along the other ground axis, in world units. |
| cast | SpellCast | The casting that threw it. |
Vectors (1)
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.
| Field | Type | What it is |
|---|---|---|
| atX | f32 | Where the missile is, along one ground axis, in world units. |
| atY | f32 | Where the missile is, in height, in world units. |
| atZ | f32 | Where the missile is, along the other ground axis, in world units. |
| keptX | f32 | A value along one ground axis that a line missile keeps and reports back in MissileReport. Any other missile reads nothing here. |
| keptY | f32 | The same, in height. |
| keptZ | f32 | The same, along the other ground axis. |
| directionX | f32 | The 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. |
| directionY | f32 | The same, in height. |
| directionZ | f32 | The same, along the other ground axis. |
| how | 1-byte bits | |
| how.flag | bit 0 | Changes how a line missile is set up; any other missile reads nothing here. |
| how.unused | bit 1 to 7 | Unused; a server writes zero. |
| cast | SpellCast | The casting that threw it. |
Vectors (1)
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.
| Field | Type | What it is |
|---|---|---|
| atX | f32 | Where the missile is, along one ground axis, in world units. |
| atY | f32 | Where the missile is, in height, in world units. |
| atZ | f32 | Where the missile is, along the other ground axis, in world units. |
| casterAtX | f32 | Where the unit that threw it stood when it left, along one ground axis, in world units. |
| casterAtY | f32 | Where the unit that threw it stood when it left, in height, in world units. |
| casterAtZ | f32 | Where the unit that threw it stood when it left, along the other ground axis, in world units. |
| facingX | f32 | Which way the missile points, along one ground axis. |
| facingY | f32 | Which way the missile points, in height. |
| facingZ | f32 | Which way the missile points, along the other ground axis. |
| velocityX | f32 | How fast the missile travels, along one ground axis, in world units a second. |
| velocityY | f32 | How fast the missile travels, in height, in world units a second. |
| velocityZ | f32 | How fast the missile travels, along the other ground axis, in world units a second. |
| endX | f32 | Where the missile is bound for, along one ground axis, in world units. |
| endY | f32 | Where the missile is bound for, in height, in world units. |
| endZ | f32 | Where the missile is bound for, along the other ground axis, in world units. |
| unitAtX | f32 | Where to place the casting unit, along one ground axis, in world units, unless the casting itself places it. |
| unitAtY | f32 | Its height, in world units. |
| unitAtZ | f32 | Where to place the casting unit, along the other ground axis, in world units. |
| how | 1-byte bits | |
| how.bounced | bit 0 | Set 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.unused | bit 1 to 7 | Unused; a server writes zero. |
| cast | SpellCast | The casting that threw it. |
MissileHits
What a server sends to say which units a missile struck. The header names the missile.
In 0.9.22.16–1.0.0.24
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 0.9.22.16–0.9.25.35 | 163 |
| 0.9.25.36–1.0.0.24 | 161 |
| Field | Type | What it is |
|---|---|---|
| count | u16 | How 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. |
| targets | count in count × u32 | The 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)
DestroyMissile
What a server sends to be rid of a missile a client is drawing. The header names the missile.
In every range of this book
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 0.8.13.26–0.9.22.13 | 105 |
| 0.9.22.14–1.0.0.24 | 102 |
No body.
Vectors (1)
ChainTargets
What a server sends to name the units a chain missile will strike in turn. The header names the missile.
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.
| Field | Type | What it is |
|---|---|---|
| count | i32 | How 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. |
| caster | u32 | The 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. |
| targets | 32 × u32 | Always 32 slots; those past count have no effect. |
Vectors (1)
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.
| Field | Type | What it is |
|---|---|---|
| count | i32 | How 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. |
| caster | u32 | The 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. |
| targets | 32 × u32 | Always 32 slots; those past count have no effect. |
Vectors (1)
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.
| Field | Type | What it is |
|---|---|---|
| count | i32 | How 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. |
| caster | u32 | The 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. |
| targets | 32 × u32 | Always 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.
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.
| Field | Type | What it is |
|---|---|---|
| atX | f32 | Where the missile is, in world units, along one ground axis. |
| atY | f32 | Where the missile is, in world units, in height. |
| atZ | f32 | Where the missile is, in world units, along the other ground axis. |
| keptX | f32 | What the line missile keeps from MissileState’s keptX. |
| keptY | f32 | The same, in height. |
| keptZ | f32 | The same, along the other ground axis. |
| directionX | f32 | The way the line missile travels, along one ground axis. |
| directionY | f32 | The same, in height. |
| directionZ | f32 | The same, along the other ground axis. |
| flag | u8 | The line missile’s flag, as MissileState carried it. |
| cast | bytes, 128 | A description of the cast the missile belongs to, with whatever stood in memory after it up to the field’s end. |
Vectors (1)
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.
| Field | Type | What it is |
|---|---|---|
| atX | f32 | Where the missile is, in world units, along one ground axis. |
| atY | f32 | Where the missile is, in world units, in height. |
| atZ | f32 | Where the missile is, in world units, along the other ground axis. |
| unknownAX | f32 | What this holds is not recorded. |
| unknownAY | f32 | What this holds is not recorded. |
| unknownAZ | f32 | What this holds is not recorded. |
| travelX | f32 | Its end less its start, in world units, along one ground axis. |
| travelY | f32 | Its end less its start, in world units, in height. |
| travelZ | f32 | Its end less its start, in world units, along the other ground axis. |
| velocityX | f32 | How fast it travels, in world units a second, along one ground axis. |
| velocityY | f32 | How fast it travels, in world units a second, in height. |
| velocityZ | f32 | How fast it travels, in world units a second, along the other ground axis. |
| endX | f32 | Where it ends, in world units, along one ground axis. |
| endY | f32 | Where it ends, in world units, in height. |
| endZ | f32 | Where it ends, in world units, along the other ground axis. |
| targetX | f32 | Where its target is, or the point it aims at, in world units, along one ground axis. |
| targetY | f32 | Where its target is, or the point it aims at, in world units, in height. |
| targetZ | f32 | Where its target is, or the point it aims at, in world units, along the other ground axis. |
| flag | u8 | Zero or one; what it means is not recorded. |
| cast | bytes, sized by remaining | A description of the cast the missile belongs to, at most 512 bytes. |