From b7f1d329dce6d5d3b3bf5e6412b15e7efa04fa50 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Wed, 27 Nov 2013 14:04:30 +0000 Subject: [PATCH] Fix usage of properties that were moved to the state machine. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1224 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- conditions/Casting.lua | 7 ++++--- conditions/InFlightToTarget.lua | 3 ++- conditions/PreviousSpell.lua | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/conditions/Casting.lua b/conditions/Casting.lua index 94937b5..20c532f 100644 --- a/conditions/Casting.lua +++ b/conditions/Casting.lua @@ -23,6 +23,7 @@ do local API_UnitCastingInfo = UnitCastingInfo local API_UnitChannelInfo = UnitChannelInfo local ParseCondition = OvaleCondition.ParseCondition + local state = OvaleState.state local function IsSameSpell(spellIdA, spellIdB, spellNameB) if spellIdB then @@ -55,9 +56,9 @@ do local target = ParseCondition(condition) local start, ending, castSpellId, castSpellName, _ if target == "player" then - start = OvaleState.startCast - ending = OvaleState.endCast - castSpellId = OvaleState.currentSpellId + start = state.startCast + ending = state.endCast + castSpellId = state.currentSpellId else castSpellName, _, _, _, start, ending = API_UnitCastingInfo(target) if not castSpellName then diff --git a/conditions/InFlightToTarget.lua b/conditions/InFlightToTarget.lua index b907102..8e4e73c 100644 --- a/conditions/InFlightToTarget.lua +++ b/conditions/InFlightToTarget.lua @@ -15,6 +15,7 @@ do local OvaleState = Ovale.OvaleState local TestBoolean = OvaleCondition.TestBoolean + local state = OvaleState.state --- Test if the given spell is in flight for spells that have a flight time after cast, e.g., Lava Burst. -- @name InFlightToTarget @@ -30,7 +31,7 @@ do local function InFlightToTarget(condition) local spellId, yesno = condition[1], condition[2] - local boolean = (OvaleState.currentSpellId == spellId) or OvaleFuture:InFlight(spellId) + local boolean = (state.currentSpellId == spellId) or OvaleFuture:InFlight(spellId) return TestBoolean(boolean, yesno) end diff --git a/conditions/PreviousSpell.lua b/conditions/PreviousSpell.lua index 8f94343..c56536b 100644 --- a/conditions/PreviousSpell.lua +++ b/conditions/PreviousSpell.lua @@ -15,6 +15,7 @@ do local OvaleState = Ovale.OvaleState local TestBoolean = OvaleCondition.TestBoolean + local state = OvaleState.state --- Test if the previous spell cast matches the given spell. -- @name PreviousSpell @@ -27,7 +28,7 @@ do local function PreviousSpell(condition) local spellId, yesno = condition[1], condition[2] - local boolean = (spellId == OvaleState.lastSpellId) + local boolean = (spellId == state.lastSpellId) return TestBoolean(boolean, yesno) end -- 1.7.9.5