Quantcast

Fixed Unleashed Fury in priority

Taracque [12-06-12 - 17:10]
Fixed Unleashed Fury in priority
Filename
Elementarist.lua
Elementarist.toc
diff --git a/Elementarist.lua b/Elementarist.lua
index 9cf2376..3d05748 100755
--- a/Elementarist.lua
+++ b/Elementarist.lua
@@ -1,5 +1,5 @@
 -------------------------------------------------------------------------------
--- Elementarist 3.0.0
+-- Elementarist 3.0.1
 --
 -- Shows the advised spell for an elemental shaman for optimal DPS output.
 -------------------------------------------------------------------------------
@@ -8,7 +8,7 @@ Elementarist = {Locals = {}}

 local L = Elementarist.Locals

-Elementarist.versionNumber = '3.0.0'
+Elementarist.versionNumber = '3.0.1'
 Elementarist.playerName = UnitName("player")
 Elementarist.playerGUID = UnitGUID("player")
 Elementarist.targetGUID = nil
@@ -746,19 +746,6 @@ function Elementarist:NextSpellElem(timeshift,exspell1,exspell2)
 		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
-
 	-- check if Flame shock applied on target first
 	name, _, _, _, _, _, fsExpiration, unitCaster = Elementarist:hasDeBuff("target", Elementarist.SpellList["Flame Shock"], "player");
 	if (not fsExpiration) then
@@ -809,13 +796,26 @@ function Elementarist:NextSpellElem(timeshift,exspell1,exspell2)
 		) then
 			if (((Elementarist.SpellList["Lava Burst"]) ~= spellInCast) or (ascendance ~= nil)) then
 				d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Lava Burst"])
-				if ((d-timeshift) <= 0) then
+				if ((d-timeshift) <= 0) or ((ascendanceExp-GetTime()-timeshift) > 0) then
 					return Elementarist.SpellList["Lava Burst"]
 				end
 			end
 		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
diff --git a/Elementarist.toc b/Elementarist.toc
index b29c19e..2ec64e4 100755
--- a/Elementarist.toc
+++ b/Elementarist.toc
@@ -2,7 +2,7 @@
 ## Title: Elementarist
 ## Notes: Elemental shaman spell rotation helper
 ## Author: Taracque, Felmosórongy of Arathor
-## Version: 3.0.0
+## Version: 3.0.1
 ## SavedVariables: ElementaristDB
 ## OptionalDeps: OmniCC, SpellFlash
 ## Dependencies: