Quantcast

Ascendance not displayed while active, and during Ascendance Lava Burst are shown as suggestion

Taracque [10-01-12 - 10:47]
Ascendance not displayed while active, and during Ascendance Lava Burst are shown as suggestion
Filename
Change_log.txt
Elementarist.lua
Elementarist.toc
diff --git a/Change_log.txt b/Change_log.txt
index 64a548c..8da67ef 100755
--- a/Change_log.txt
+++ b/Change_log.txt
@@ -1,3 +1,6 @@
+**v2.9.7**
+* Fixed: Ascendance not displayed while active, and during Ascendance Lava Burst are shown as suggestion
+
 **v2.9.6**
 * Fixed: Elemental Blast and Unleashed Fury

diff --git a/Elementarist.lua b/Elementarist.lua
index 20c93b3..2346534 100755
--- a/Elementarist.lua
+++ b/Elementarist.lua
@@ -1,5 +1,5 @@
 -------------------------------------------------------------------------------
--- Elementarist 2.9.6
+-- Elementarist 2.9.7
 --
 -- Shows the advised spell for an elemental shaman for optimal DPS output.
 -------------------------------------------------------------------------------
@@ -8,7 +8,7 @@ Elementarist = {Locals = {}}

 local L = Elementarist.Locals

-Elementarist.versionNumber = '2.9.6'
+Elementarist.versionNumber = '2.9.7'
 Elementarist.playerName = UnitName("player")
 Elementarist.playerGUID = UnitGUID("player")
 Elementarist.targetGUID = nil
@@ -79,6 +79,7 @@ Elementarist.SpellList = {
 	["Flask of the Draconic Mind"] = GetSpellInfo(79470),
 	["Flask of the Warm Sun"] = GetSpellInfo(105691),
 	["Lifeblood"] = GetSpellInfo(55503),
+	["AscendanceElementalBuff"] = GetSpellInfo(114050),

 	-- debuff
 	["Unleashed Fury"] = GetSpellInfo(118470),
@@ -743,7 +744,7 @@ function Elementarist:NextSpellElem(timeshift,exspell1,exspell2)

 	-- if Tier6 talent is Unleashed Fury Unleash Elements
 	if (Elementarist.tier6Talent == 16) then
-		name, _, _, _, _, _, e, unitCaster = Elementarist:hasDeBuff("target", Elementarist.SpellList["unleashed Fury"], "player");
+		name, _, _, _, _, _, e, unitCaster = Elementarist:hasDeBuff("target", Elementarist.SpellList["Unleashed Fury"], "player");
 		if (name) and (e - GetTime() - timeshift) then
 			if (GetWeaponEnchantInfo()) and (exspell1 ~= Elementarist.SpellList["Unleash Elements"]) and (exspell2 ~= Elementarist.SpellList["Unleash Elements"]) then
 				return Elementarist.SpellList["Unleash Elements"];
@@ -824,14 +825,22 @@ function Elementarist:NextSpellElem(timeshift,exspell1,exspell2)
 	if (not fsExpiration) then
 		fsExpiration = 0
 	end
-	if (exspell1 ~= Elementarist.SpellList["Lava Burst"]) and (exspell2 ~= Elementarist.SpellList["Lava Burst"]) then
+	local ascendance, _, _, _, _, _, ascendanceExp = Elementarist:hasBuff("player",Elementarist.SpellList["AscendanceElementalBuff"]);
+	if (ascendance == nil) then
+		ascendanceExp = 0
+	end
+	if (
+		((exspell1 ~= Elementarist.SpellList["Lava Burst"]) and (exspell2 ~= Elementarist.SpellList["Lava Burst"]))
+		or
+		((ascendanceExp-GetTime()-timeshift) > 0)
+	) then
 		if (IsSpellInRange(Elementarist.SpellList["Lava Burst"], "target") == 1) and
 		(
 			((fsExpiration~=0) and ((fsExpiration-GetTime()-timeshift) > LvBct)) or
 			(exspell1 == Elementarist.SpellList["Flame Shock"]) or
 			(exspell2 == Elementarist.SpellList["Flame Shock"])
 		) then
-			if ((Elementarist.SpellList["Lava Burst"]) ~= spellInCast) then
+			if (((Elementarist.SpellList["Lava Burst"]) ~= spellInCast) or (ascendance ~= nil)) then
 				d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Lava Burst"])
 				if ((d-timeshift) <= 0) then
 					return Elementarist.SpellList["Lava Burst"]
@@ -984,9 +993,12 @@ function Elementarist:MiscSpellElem()

 	-- Ascendance
 	if Elementarist:SpellAvailable(Elementarist.SpellList["Ascendance"]) then
-		d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Ascendance"])
-		if d <= 0.5 then
-			return Elementarist.SpellList["Ascendance"]
+		local name = Elementarist:hasBuff("player",Elementarist.SpellList["AscendanceElementalBuff"])
+		if (name == nil) then
+			d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Ascendance"])
+			if d <= 0.5 then
+				return Elementarist.SpellList["Ascendance"]
+			end
 		end
 	end

diff --git a/Elementarist.toc b/Elementarist.toc
index 5affa70..d51fdb7 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: 2.9.6
+## Version: 2.9.7
 ## SavedVariables: ElementaristDB
 ## OptionalDeps: OmniCC, SpellFlash
 ## Dependencies: