Quantcast

Fix Casting() condition to work when passed a spell ID.

Johnny C. Lam [07-18-14 - 20:15]
Fix Casting() condition to work when passed a spell ID.

The checks in Casting() were missing one for if the spell ID parameter was
passed and was not the name of spell list, "helpful" or "harmful".

This fixes ticket 382 by @Genkidama.
Filename
conditions/Casting.lua
diff --git a/conditions/Casting.lua b/conditions/Casting.lua
index ffa7f88..52d4063 100644
--- a/conditions/Casting.lua
+++ b/conditions/Casting.lua
@@ -78,6 +78,10 @@ do
 				return start, ending
 			elseif spellId == "helpful" and API_IsHelpfulSpell(castSpellName) then
 				return start, ending
+			elseif spellId == castSpellId then
+				return start, ending
+			elseif type(spellId) == "number" and OvaleSpellBook:GetSpellName(spellId) == castSpellName then
+				return start, ending
 			end
 		end
 		return nil