Quantcast

Fix ticket 184 by limiting when OvaleState updates auras.

Author Johnny C. Lam <jlam88@gmail.com>
Author date 2012-11-27 00:20:26
Author local date 2012-11-27 00:20:26 +0000
Committer Johnny C. Lam <jlam88@gmail.com>
Committer date 2012-11-27 00:20:26
Committer local date 2012-11-27 00:20:26 +0000
Commit 1257626b108c465eea7e8c0d98e29aeb96b81478
Tree e0257ad988684b854248bf1bb156360c7934f3f3
Parent 0f53a143b37d1b1a5446dcac5ece464da93fdba8
Fix ticket 184 by limiting when OvaleState updates auras.

The purpose of OvaleState is to take the current game state and tweak it
to reflect the effects of the spell being cast in the simulator.

There are three phases to a spell being cast:

  (1) Spell cast started.
  (2) Spell is casting.
  (3) Spell cast finished and traveling to target (in flight).

We always update auras for cases (1) and (2).  However, we now insert a
check so that we only update auras in case (3) if it's not a player aura.
Player auras are updated by the game as soon as a spell cast is finished,
so OvaleState doesn't need to do anything to see the player's correct
auras while the spell is still traveling to the target.  It's different
for target auras because the game has to see if the spell will hit or not
before updating the target's auras, so we still need to account for the
spell effects while it's in flight to the target.

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@641 d5049fe3-3747-40f7-a4b5-f36d6801af5f