Quantcast

Enabled checking of FlameShockBehaviour Flag in rotation

BillLive [01-31-16 - 03:21]
Enabled checking of FlameShockBehaviour Flag in rotation
Renamed doFS to boostFSpriority
Signed-off-by: BillLive <bill@live.com.au>
Filename
Elementarist.toc
modules/elemental.lua
diff --git a/Elementarist.toc b/Elementarist.toc
index 82f3b4a..63a35f1 100755
--- a/Elementarist.toc
+++ b/Elementarist.toc
@@ -6,9 +6,6 @@
 ## SavedVariables: ElementaristDB
 ## OptionalDeps: OmniCC, SpellFlash
 ## Dependencies:
-## X-Curse-Project-Name: Elementarist
-## X-Curse-Project-ID: elementarist
-## X-Curse-Repository-ID: wow/elementarist/mainline

 Elementarist.lua
 Ele_GUI.lua
diff --git a/modules/elemental.lua b/modules/elemental.lua
index 97a4960..eeccd37 100755
--- a/modules/elemental.lua
+++ b/modules/elemental.lua
@@ -83,7 +83,7 @@ Elementarist.elemental = {
 		local s,d,e
 		local haveFireTotem,fireTotemName,fireTotemStart,fireTotemDuration
 		local lastSpell
-		local doFS = false
+		local boostFSpriority = false
 		local _
 		local EBTalent = (Elementarist.tier6Talent == 19267)
 		local UFTalent = (Elementarist.tier6Talent == 21773)
@@ -198,10 +198,10 @@ Elementarist.elemental = {
 		-- Determine if  Flameshock is to be boosted in Priority
 		-- which occurs if the Boosting checking based on configuration and if they have the relevant talent to boost the DOT,
 		-- boost if any available boost is missing or if the  time remaining is less than the configured threshold
-		if (ElementaristDB.maximizeFS) and (UFTalent) and (Elementarist.auraCooldowns[tguid] and Elementarist.auraCooldowns[tguid]["BuffCount1"] ~= 1 ) then doFS = true end
-		if (ElementaristDB.maximizeFS) and (EFTalent) and (Elementarist.auraCooldowns[tguid] and Elementarist.auraCooldowns[tguid]["BuffCount2"] ~= 2 ) then doFS = true end
-		if ElementaristDB.doFSThreshold > (fsExpiration - currentTime - timeshift) then doFS = true end
-		if doFS then Elementarist:Debug("doFS    ufCount:" .. ufCount, " efCount"..efCount)	else Elementarist:Debug("-----    ufCount:" .. ufCount, " efCount"..efCount)	end
+		if (ElementaristDB.maximizeFS) and (UFTalent) and (Elementarist.auraCooldowns[tguid] and Elementarist.auraCooldowns[tguid]["BuffCount1"] ~= 1 ) then boostFSpriority = true end
+		if (ElementaristDB.maximizeFS) and (EFTalent) and (Elementarist.auraCooldowns[tguid] and Elementarist.auraCooldowns[tguid]["BuffCount2"] ~= 2 ) then boostFSpriority = true end
+		if ElementaristDB.doFSThreshold > (fsExpiration - currentTime - timeshift) then boostFSpriority = true end
+		if boostFSpriority then Elementarist:Debug("boostFSpriority    ufCount:" .. ufCount, " efCount"..efCount)	else Elementarist:Debug("-----    ufCount:" .. ufCount, " efCount"..efCount)	end


 		-----------------------------------------------------
@@ -313,7 +313,7 @@ Elementarist.elemental = {
 		-- Only allow this if we are not boosting Flameshock priority
 		if (Elementarist:ZeroCount(Elementarist.SpellList["Flame Shock"],spellInCast,exspell1,exspell2)  and
 			Elementarist:ZeroCount(Elementarist.SpellList["Earth Shock"],spellInCast,exspell1,exspell2)) and
-			not (doFS) then
+			not (boostFSpriority) then
 			if ( (fsExpiration - GetTime() - timeshift) > Elementarist.lastShockCD ) then
 				d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Earth Shock"])
 				if (
@@ -331,16 +331,17 @@ Elementarist.elemental = {
 		-- Priority 6
 		-- Flameshock if not present or at less than 30% duration
 		-- lame_shock,cycle_targets=1,if=dot.flame_shock.remains<=(dot.flame_shock.duration*0.3)
-		if 	(Elementarist:ZeroCount(Elementarist.SpellList["Flame Shock"],spellInCast,exspell1,exspell2) ) and
-			(Elementarist:ZeroCount(Elementarist.SpellList["Earth Shock"],spellInCast,exspell1,exspell2) ) then
-			d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Flame Shock"])
-			if ((d - timeshift) <= 0) then
-				if ((fsExpiration - GetTime() - timeshift) < (9) ) then
-					return Elementarist.SpellList["Flame Shock"]
+		if (ElementaristDB.Behavior == Elementarist.Behaviors["1"]) or (lvbCharges > 0)	then
+			if 	(Elementarist:ZeroCount(Elementarist.SpellList["Flame Shock"],spellInCast,exspell1,exspell2) ) and
+				(Elementarist:ZeroCount(Elementarist.SpellList["Earth Shock"],spellInCast,exspell1,exspell2) ) then
+				d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Flame Shock"])
+				if ((d - timeshift) <= 0) then
+					if ((fsExpiration - GetTime() - timeshift) < (9) ) then
+						return Elementarist.SpellList["Flame Shock"]
+					end
 				end
 			end
 		end
-
 		-- Priority 6b
 		-- Lava Burst if Ascendance but not able to flame shock..you should never get here!!.. Flameshock before you Assend!
 		if ( (ascendanceExp-GetTime()-timeshift) > 0)  and
@@ -364,7 +365,7 @@ Elementarist.elemental = {
 		-- Priority 8
 		-- If Tier6 talent is Unleashed Fury cast Unleash Flame or (buffs & cooldowns & reamaining time are correct)
 		-- Unleash_flame,if=talent.unleashed_fury.enabled&!buff.ascendance.up|(talent.elemental_fusion.enabled&buff.elemental_fusion.stack=2&(dot.flame_shock.remains)<(dot.flame_shock.duration*(0.3+t18_class_trinket*(0.48+talent.unleashed_fury.enabled*0.22)))&cooldown.flame_shock.remains<gcd)
-		if ((UFTalent) and not (doFS))or
+		if ((UFTalent) and not (boostFSpriority))or
 		   (efCount==2 and ( (fsExpiration - currentTime - timeshift) < (fsDuration * fsRefreshPercentage )  and (fsExpiration - currentTime - timeshift) > Elementarist.lastShockCD)    ) then
 			if (Elementarist:ZeroCount(Elementarist.SpellList["Unleash Flame"],spellInCast,exspell1,exspell2) ) then
 				d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Unleash Flame"])