Quantcast

Fix ticket 254 - InFlightToTarget

Johnny C. Lam [07-12-13 - 07:43]
Fix ticket 254 - InFlightToTarget

The InFlightToTarget script condition was not working due to an old
implementation bug from the MoP merge in 5.0.0 where it was ignoring the
spell ID parameter.

Fix this issue by putting parentheses in the proper places and reordering
for efficiency.

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@957 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
OvaleCondition.lua
diff --git a/OvaleCondition.lua b/OvaleCondition.lua
index 1421717..41d53a7 100644
--- a/OvaleCondition.lua
+++ b/OvaleCondition.lua
@@ -1812,7 +1812,8 @@ end
 --     Spell(haunt)

 OvaleCondition.conditions.inflighttotarget = function(condition)
-	return TestBoolean(OvaleFuture:InFlight(condition[1] or OvaleState.currentSpellId == condition[1]), condition[2])
+	local spellId = condition[1]
+	return TestBoolean(OvaleState.currentSpellId == spellId or OvaleFuture:InFlight(spellId), condition[2])
 end

 --- Test if the distance from the player to the target is within the spell's range.