- summary: Casts one of the played fighter's spells on a fighter, named by its id, during its turn.
- area: Game.Game.Action
Casts one of the played fighter's spells on a fighter, named by its id, during its turn.
Kind request · Area Game.Game.Action
Casts a spell of the fighter you play on a FIGHTER, named by its id. Use
GameActionFightCastRequest to cast on a map cell.
HOW TO SEND IT
1. Only during your own turn, in a fight.
2. spell_id = the spell's data-centre id (the spell template id, NOT a spell level
id and NOT the action-bar slot), exactly as in GameActionFightCastRequest.
3. target_id = the fighter's id (players are positive, monsters and summons in a
fight are negative). The official client sends it when the player clicks a
fighter the fight preview accepts, and with the played fighter's own id for a
cast on self from the action bar.
4. Nothing else is written. One request per cast.
WHAT COMES BACK
The same as for a cell cast: the server plays the cast as an action sequence
(sequence start, fight action events, sequence end), and each finished sequence is
acknowledged with GameActionAcknowledgementRequest.
DO NOT CONFUSE WITH THE ITEM REQUEST. GameActionItemConsumeRequest (same protocol file, no signature yet) also carries an int32 and an int64; it consumes an item action for a player and has nothing to do with spells.
When you may send it
- Requires
context_readyinferred - Raised by: the player casts a spell on a fighter: a spell selected in the action bar, then a click on a fighter the fight preview accepts, or the action bar's cast-on-self shortcut (the target is then the played fighter) proven
Related messages
- Reply not yet recovered: The server answers with the fight action sequence of the cast (a sequence start, the action events, a sequence end) and the client acknowledges it with
GameActionAcknowledgementRequest. A refused cast is reported by a no-cast event that has no signature yet.
Fields
| # | Field | Type | Meaning | You set it |
|---|---|---|---|---|
| 2 | target_id | int64 | The fighter the spell is cast on. (fighter id) Proven as the int64 the caller hands to the cast service; the client passes the clicked fighter's id, or the played fighter's own id for a cast on self. | required |
| 3 | spell_id | int32 | The spell to cast: its data-centre spell id. (spell id) Proven as the member the client fills from the spell record's id (a getter returning the Spell data id). | required |