Quantcast

Fix ticket 296 - Ovale double deducting for energy cost

Author Johnny C. Lam <jlam88@gmail.com>
Author date 2013-09-28 12:49:46
Author local date 2013-09-28 12:49:46 +0000
Committer Johnny C. Lam <jlam88@gmail.com>
Committer date 2013-09-28 12:49:46
Committer local date 2013-09-28 12:49:46 +0000
Commit ccdbcf0d590e14c1e90933255c90ca39413eb18c
Tree 3b23e58adbbef6f11dc1064204c9f589bfa142dd
Parent 1b9d860e4d0674f9fe67f23b303a63e971d8b231
Fix ticket 296 - Ovale double deducting for energy cost

Only apply the power cost of the spell if the spellcast hasn't already
finished.  A spellcast that has finished in-game has already had the power
adjusted, which would be picked up when :Reset() is called to reset the
frame state.

Also, make this more readable by splitting out code from :ApplySpell()
method to update the power state into a new method :ApplySpellCost().

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