Quantcast

Fixed: talent detection

Taracque [08-30-16 - 19:17]
Fixed: talent detection
Fixed: enhancement rotation
Filename
Change_log.txt
Elementarist.lua
Elementarist.toc
modules/enhancement.lua
diff --git a/Change_log.txt b/Change_log.txt
index e22ddd6..646c9e9 100755
--- a/Change_log.txt
+++ b/Change_log.txt
@@ -1,3 +1,7 @@
+** v3.8.1
+* Fixed: talent detection
+* Fixed: enhancement rotation
+
 ** v3.8.0
 * 7.0 compatibility

diff --git a/Elementarist.lua b/Elementarist.lua
index 97b42ac..ea6862e 100755
--- a/Elementarist.lua
+++ b/Elementarist.lua
@@ -1,5 +1,5 @@
 -------------------------------------------------------------------------------
--- Elementarist 3.8.0 Release
+-- Elementarist 3.8.1 Release
 --
 -- 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.8.0';
+Elementarist.versionNumber = '3.8.1';
 Elementarist.enabled = true;
 Elementarist.playerName = UnitName("player")
 Elementarist.playerGUID = UnitGUID("player")
@@ -413,7 +413,7 @@ function Elementarist:detectTalent()
 	for i=1,7 do
 		Elementarist.talents[i] = 0
 		for j=1,3 do
-			if select(3,GetTalentInfo(i,j,1)) then
+			if select(4,GetTalentInfo(i,j,1)) then
 				Elementarist.talents[i] = j
 			end
 		end
@@ -686,7 +686,7 @@ function Elementarist:UpdateShieldTracker()
 	Elementarist.shieldTrackerUpdate = GetTime()
 	if (name) then
 		Elementarist:SetTexture(Elementarist.textureList["shield"],icon)
-		Elementarist.textList["shield"]:SetText(format('%.0f', count))
+--		Elementarist.textList["shield"]:SetText(format('%.0f', count))
 		if (not ElementaristDB.shieldcooldowndisabled) then
 			Elementarist.shieldCooldownFrame:SetCooldown( e-d, d)
 		end
diff --git a/Elementarist.toc b/Elementarist.toc
index 35e5a97..3223120 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.8.0
+## Version: 3.8.1
 ## SavedVariables: ElementaristDB
 ## OptionalDeps: OmniCC, SpellFlash
 ## Dependencies:
diff --git a/modules/enhancement.lua b/modules/enhancement.lua
index 5216a07..d3b1135 100755
--- a/modules/enhancement.lua
+++ b/modules/enhancement.lua
@@ -20,7 +20,7 @@ Elementarist.enhancement = {
 			["AscendanceEnhancementBuff"] = GetSpellInfo(114051),
 			["Ancestral Swiftness"] = GetSpellInfo(16188),
 			["Feral Spirit"] = GetSpellInfo(51533),
-			["Fire Nova"] = GetSpellInfo(1535),
+			["Lightning Shield"] = GetSpellInfo(192106),

 			["Flametongue"] = GetSpellInfo(193796),
 			["Boulderfist"] = GetSpellInfo(201897),
@@ -273,17 +273,6 @@ Elementarist.enhancement = {
 			end
 		end

-		-- Liquid Magma if not in rotation and Tier7 talent is Liquid Magma and fire totem has 10 sec or more
-		if (Elementarist.tier7Talent == 21200) and (ElementaristDB.DisableLM) then
-			local haveFireTotem,fireTotemName,fireTotemStart,fireTotemDuration = GetTotemInfo(1);
-			if (fireTotemName ~= "") and (fireTotemDuration and (fireTotemStart + fireTotemDuration - GetTime() ) >= 10) then
-				d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Liquid Magma"])
-				if (d<=0.5) then
-					return Elementarist.SpellList["Liquid Magma"]
-				end
-			end
-		end
-
 		-- Storm Elemental Totem
 		if (Elementarist.tier7Talent == 21199) then
 			if Elementarist:SpellAvailable(Elementarist.SpellList["Storm Elemental Totem"]) then
@@ -294,18 +283,6 @@ Elementarist.enhancement = {
 			end
 		end

-		-- Healing Stream Totem
-		if (ElementaristDB.ShowHealingStream) and (Elementarist:SpellAvailable(Elementarist.SpellList["Healing Stream Totem"])) then
-			local haveWaterTotem,waterTotemName,_,_ = GetTotemInfo(3)
-			if (waterTotemName == "") then
-				e = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Healing Stream Totem"]);
-				if (e < 1) then
-					return Elementarist.SpellList["Healing Stream Totem"];
-				end;
-			end
-		end
-
-
 		-- Feral Spirit
 		if Elementarist:SpellAvailable(Elementarist.SpellList["Feral Spirit"]) then
 			d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Feral Spirit"])
@@ -359,55 +336,12 @@ Elementarist.enhancement = {

 		-- AOE at least 3 enemies
  		if (Elementarist.person["foeCount"]>=3) then
-			-- Searing Totem if no fire totem or fire totem about to expire
-			local haveFireTotem,fireTotemName,fireTotemStart,fireTotemDuration = GetTotemInfo(1);
-			if (
-				(fireTotemName == "") or (fireTotemName == "Searing Totem") or
-				(fireTotemDuration and (fireTotemStart + fireTotemDuration - GetTime() ) <= 0)
-			) then
-				return Elementarist.SpellList["Magma Totem"];
-			end
-
-			-- Liquid  if not in rotation and Tier7 talent is Liquid Magma and fire totem has 10 sec or more
-			if (Elementarist.tier7Talent == 21200) then
-				if (fireTotemName ~= "") and (fireTotemDuration and (fireTotemStart + fireTotemDuration - GetTime() ) >= 10) then
-					d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Liquid Magma"])
-					if (d<=0.5) then
-						return Elementarist.SpellList["Liquid Magma"]
-					end
-				end
-			end
-
-			-- Flame shock if <9 sec remaining and Unleash Flame is up
-			local name, _, _, _, _, _, fsExpiration, unitCaster = Elementarist:hasDeBuff("target", Elementarist.SpellList["Flame Shock"], "player");
-			if (not fsExpiration) then
-				fsExpiration = 0
-			end
-			d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Flame Shock"])
-			if (d <= 0.5) and (fsExpiration - GetTime() < 9) then
-				return Elementarist.SpellList["Flame Shock"]
-			end
-
-			if Elementarist.trackSpread then
-				local LLCharges, maxLLCharges, cdLLStart, cdLLLength  = GetSpellCharges(Elementarist.SpellList["Lava Lash"]);
-				if (LLCharges > 0) then
-					return Elementarist.SpellList["Lava Lash"]
-				end
-			end
-
-			d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Fire Nova"])
-			if ((d ) <= 0.5) then
-				return Elementarist.SpellList["Fire Nova"]
-			end
-
-			---- Chain Lightning in place of Lightning Bolt
-			if Elementarist.exspell1 == Elementarist.SpellList["Lightning Bolt"] then
-				if Elementarist:SpellAvailable(Elementarist.SpellList["Chain Lightning"]) then
-					return Elementarist.SpellList["Chain Lightning"]
+			if (Elementarist.lastSpell ~= Elementarist.SpellList["Crash Lightning"]) and Elementarist:SpellAvailable(Elementarist.SpellList["Crash Lightning"]) then
+				d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Crash Lightning"])
+				if d-timeshift <= 0.5 then
+					return Elementarist.SpellList["Crash Lightning"]
 				end
 			end
-
-			return Elementarist.exspell1
 		end

         -- Wind Shear