[top]Spell Casting Mechanics
>
[top]Introduction
All classes in World of Warcraft cast spells of one form or another. An understanding of the mechanics behind spell casting is therefore important to theorycrafting and to playing optimally in general.
This article seeks to describe the mechanics of spell casting as completely as we can given what we can observe of the game.
[top]Activating a Skill or a Spell
In order to activate a skill or spell, you press and release the button corresponding to the spell or skill you want to activate. Note that the skill is activated upon releasing the button as opposed to when the button is pressed.
[top]The Casting State
Upon activating a skill or spell your character enters a casting animation. This animation reflects that your character is indeed casting a spell. The animation usually indicates the school of the spell that is being cast. While the casting animation is maintained, the actions your character can do are limited as follows:
- your character can neither dodge nor parry physical attacks
- with the exception of certain spells, your character cannot move or be moved without leaving the casting state and hence interrupting your cast or channel
- with certain exceptions (such as channeled spells), your character is considered to be in the middle of a spell and cannot perform other spells without explicitly interrupting the current spell in progress.
- in the case of channeled spells, activating another skill implicitly interrupts your channel.
- as of 2.4.3, you cannot change your equipment without leaving the casting state on a cast spell.
Other than those restrictions, your character can perform any other action you would normally be able to do while not casting (chatting, turning, talking to NPCs, activating/deactivating autoattack, removing buffs). For the intents and purposes of this article, crafting, gathering and activating objects are spells.
Note that entering the casting state usually activates a cooldown (commonly referred to as the
Global Cooldown) on the majority of your other actions.
[top]The Types of Spellcast
Spell can be broadly be categorized as having one of three cast types:
- Cast spells
- Instant cast spells
- Channeled spells
The majority of spells in World of Warcraft are cast spells. Upon activation of a cast spell, the character enters the casting state for a period of time. When the period of time has elapsed, the action of the spell is performed. This action can include one or more of the following items:
- Application of a buff/debuff to the target
- Application of a buff/debuff to the caster
- Application of direct damage/healing to the target
- Creation/destruction of an object in the caster's inventory
- Creation of an object in the target's inventory
- Marking of an area in which enemies/allies will be buffed/debuffed while in that area
- Marking of an area in which enemies/allies will take damage or be healed.
- Summoning of a minion or several minions
- Launching of a projectile that performs one or more of the above actions
- Initiation of a channeled spell or ritual.
If you leave the casting state without completing your cast due to an action you perform, the global cooldown is rescinded - however the rescission of the cooldown is affected by latency.
Instant cast spells are a special subset of cast spells for which the period of time that the caster must maintain the casting state is zero. This largely removes the restrictions of the casting state from these spells, allowing them to be cast on the move and without suffering any penalties to character defense upon activation.
Channeled spells are a special class of spells in which the character enters a casting state and the action of the spell is performed while the casting state is maintained. When the channel ends, the spell ends. In World of Warcraft, the channeling system has been implemented by making a channeled spell an instant spell that puts the caster into a channeling state. Buffs/debuffs are applied to the channeler and/or the target/targets/area for as long as this channeling state is maintained. For instance, the implementation of Drain Soul applies a debuff to the target that does periodic damage while the channel is maintained; if the debuff is removed by death of the target, the caster generates a Soul Shard.
[top]The Cast Bar and Lag
The cast bar is a representation of how far along in the spell cast/channel the character is. The length of the cast bar is determined by the base cast time of the spell, flat cast time reductions and application of spell haste, (whether from talents, gear or buff/debuffs) in that order.
There are several copies of the cast bar maintained at any given time: one on the client machine which controls the caster, one on the World of Warcraft server and copies of the cast bar are distributed from the server to other clients' machines as they need.
Following is a brief nontechnical explanation of how the initiation of a cast is handled by World of Warcraft:
- The client initiates an spell cast
- The client locks out the majority of the actions on the character's action bars and sends a message to the server saying that a spell cast has been initiated.
- The server receives the message and checks to see if another action is being performed. If not, it begins counting down the castbar; the server sends a message to the client that it has received notice of the action being taken. Otherwise, the server rejects the action
- The client receives notice that the server has received its initiation of a spellcast and starts rendering the cast bar if the action has been accepted.
So, if one attempts to perform an action while casting, the client will pass that action on to the server, regardless of the casting state as registered by the client. Previously, the client could reject actions based on the state of its casting bar. This led to the filling up of macro slots with macros that altered the state of the client-side cast bar to account for latency. Currently, however, these are not necessary. However, it is important to activate your spells at the right time.
If one initiates one's casts late (that is, after the spell effect is rendered on the client) this has the same effect as adding approximately one's latency to the cast time of one's spells. This is due to the manner in which the rendered castbar lags the actual start of spell cast by one's latency. When the spell is shown to be going off on the client side, it has gone off server side earlier by the value of one's latency, so waiting for the spell effect animation will cause one to lose dps.
If one initiates an action too early, the action may be just about to complete server side, but the server will send a notice rejecting the action back to the client. This notice will take the same amount of time as one's latency to get back to the client. During this time, the action might have been completed server side but one will be unable to act until the client gets the message from the server to rescind the global cooldown and allow initiation of another action. The upshot of this is that mashing the button while you wait for the cast bar to fill up will, on average, add latency to your cast time.
Hence, it is important to initiate your next action at the right time while your client shows that you are casting. The proper method for casting would be to wait until the cast bar indicator reaches the point where the time left until completion of the cast is equal to your latency and then mash the button you use to activate your spell. A good castbar mod will tell you when that time is, which will reduce, if not eliminate, loss in dps/hps due to latency.
One of the most important aspects to spell casting in World of Warcraft is that of spell pushback. Taking direct damage impedes the progress of spell casts in progress and reduces the effectiveness of channeled spells. The effects of pushback on spells are predictable. Certain talents and effects reduce the effect of pushback on your casting by reducing the effects of pushback by a certain percentage. I will refer to an
instance of pushback as a direct damage event that causes pushback on a single spell.
For cast spells, an instance of pushback will set the cast bar back a certain amount of time. The two instances of pushback will add up to 0.5 seconds to the cast time of a spell. After taking two incidences of direct damage, cast spells are no longer affected by spell pushback, so the maximum amount of time added to a cast by pushback is 1.0 seconds. You cannot be pushed back to before the beginning of your spell cast on the cast bar. So, if you are 0.1 seconds into a cast when you suffer from pushback, you will have 0.1 seconds added to your cast time as opposed to 0.5 seconds.
For channeled spells, first two instances of pushback will decrease the nominal duration of the channel by 25% of the total duration the channel. Subsequent instances of pushback will have no effect on your channel. Depending on the primary effect of the channeled spell, the real duration of the spell may be reduced by more than 25% of the total time. Most channeled spells apply periodic effects while the channel is maintained. If insufficient time remains on the channeled spell to have another period lapse (to apply the effect), then the channel ends. This effect is most often noticed by Warlocks farming soul shards without Fel Concentration.
[top]Application of stats to spells
As mentioned, the duration of the cast bar is set by base cast time of the spell, flat reductions in cast time and spell haste in that order. This implies that spell haste rating is applied at the beginning of the spell cast. But what about other stats, such as spell damage, crit rating, buffs and debuffs? When are they applied?
In the case of direct damage spells, everything is determined when the spell cast is complete. Once the spell cast is complete, the amount of damage the spell does, whether it crits or not, the degree to which it is partially resisted is known.
For direct damage projectiles, most debuffs and buffs are taken to account at this time as well. The only target buffs and debuffs taken into account when a spell actually lands (as opposed to when it is cast) are:
- immunities
- absorption shields
- buffs and debuffs with charges (Stormstrike, Improved Shadowbolt)
Everything else is taken into consideration when the spell cast is complete.
In the case of DoTs, all caster stats buffs and debuffs are taken into account when the spell cast is complete. However, periodic damage takes into account the target's buffs and debuffs when the periodic damage is applied.
For channeled spells, all caster stats, buffs and debuffs are taken into account at the beginning of the channel. Target buffs and debuffs are taken into account whenever an effect is applied. An exception to this rule is Arcane Missiles, which applies all stats and effects as each missile leaves the caster's hands. This is due to each Arcane Missile being a new cast spell independent of previous missiles.