Quantcast

Unleashed fury once again moved in priority.

Taracque [12-10-12 - 14:28]
Unleashed fury once again moved in priority.
Filename
modules/elemental.lua
diff --git a/modules/elemental.lua b/modules/elemental.lua
index e99471d..42cc49b 100755
--- a/modules/elemental.lua
+++ b/modules/elemental.lua
@@ -112,6 +112,19 @@ Elementarist.elemental = {
 			end
 		end

+		-- if Tier6 talent is Unleashed Fury Unleash Elements
+		if (Elementarist.tier6Talent == 16) then
+			name, _, _, _, _, _, e, unitCaster = Elementarist:hasDeBuff("target", Elementarist.SpellList["Unleashed Fury"], "player");
+			if (name == nil) or (e - GetTime() - timeshift) then
+				if (GetWeaponEnchantInfo()) and (exspell1 ~= Elementarist.SpellList["Unleash Elements"]) and (exspell2 ~= Elementarist.SpellList["Unleash Elements"]) and (IsSpellInRange(Elementarist.SpellList["Unleash Elements"], "target") == 1) then
+					e = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Unleash Elements"])
+					if (e-timeshift <= 0) then
+						return Elementarist.SpellList["Unleash Elements"];
+					end
+				end
+			end
+		end
+
 		local ascendance, _, _, _, _, _, ascendanceExp = Elementarist:hasBuff("player",Elementarist.SpellList["AscendanceElementalBuff"]);
 		if (ascendance == nil) then
 			ascendanceExp = 0
@@ -136,19 +149,6 @@ Elementarist.elemental = {
 			end
 		end

-		-- if Tier6 talent is Unleashed Fury Unleash Elements
-		if (Elementarist.tier6Talent == 16) then
-			name, _, _, _, _, _, e, unitCaster = Elementarist:hasDeBuff("target", Elementarist.SpellList["Unleashed Fury"], "player");
-			if (name == nil) or (e - GetTime() - timeshift) then
-				if (GetWeaponEnchantInfo()) and (exspell1 ~= Elementarist.SpellList["Unleash Elements"]) and (exspell2 ~= Elementarist.SpellList["Unleash Elements"]) and (IsSpellInRange(Elementarist.SpellList["Unleash Elements"], "target") == 1) then
-					e = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Unleash Elements"])
-					if (e-timeshift <= 0) then
-						return Elementarist.SpellList["Unleash Elements"];
-					end
-				end
-			end
-		end
-
 		-- Earth shock if Lightning Shield count >=7 and not on cd, and FS debuff remaining > FS cooldown, or FS debuff remaining between FS and FS cd + 2sec and LS count>=5
 		if ( (exspell1 ~= Elementarist.SpellList["Earth Shock"]) and (exspell2 ~= Elementarist.SpellList["Earth Shock"]) and (exspell1 ~= Elementarist.SpellList["Flame Shock"]) and (exspell2 ~= Elementarist.SpellList["Flame Shock"]) ) then
 			if ( (fsExpiration - GetTime() - timeshift) > Elementarist.lastShockCD ) then