Quantcast

Mind Quickening and Boomkin Aura is now detected by ID

Taracque [05-23-11 - 08:31]
Mind Quickening and Boomkin Aura is now detected by ID
UE conditions fixed
Filename
Elementarist.lua
Elementarist.toc
diff --git a/Elementarist.lua b/Elementarist.lua
index fb0bba5..622602b 100755
--- a/Elementarist.lua
+++ b/Elementarist.lua
@@ -1,5 +1,5 @@
 -------------------------------------------------------------------------------
--- Elementarist 2.0.0
+-- Elementarist 2.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 = '2.0.0'
+Elementarist.versionNumber = '2.0.1'
 Elementarist.playerName = UnitName("player")
 Elementarist.playerGUID = UnitGUID("player")
 Elementarist.targetGUID = nil
@@ -47,7 +47,6 @@ Elementarist.CustomIDs = {
 	["Flask of Enhancement Item"] = 58149,
 	["Flask of Enhancement Spell"] = 79637,
 	["Moonkin Aura"] = 24907,
-	["Shadowform"] = 15473,
 	["Mind Quickening"] = 49868
 }
 Elementarist.SpellList = {
@@ -722,10 +721,23 @@ function Elementarist:NextSpell(timeshift,exspell1,exspell2)
 		end
 	end

-	-- Unleash Elements if LvB will be available after it, Weapon enchant is Flamtounge Weapon, and Unleash Elements are not on CD
+	-- Unleash Elements if LvB will be available after it, and target has FS debuff, and it will not expire before UE, and no LvB cast before UE
+	-- Weapon enchant has to be Flamtounge Weapon, and Unleash Elements are not on CD
 	if (ElementaristDB.EnableUE) then
 		if (exspell1 ~= Elementarist.SpellList["Unleash Elements"]) and (exspell2 ~= Elementarist.SpellList["Unleash Elements"]) then
-			if (IsSpellInRange(Elementarist.SpellList["Unleash Elements"], "target") == 1) and ( (Elementarist.SpellList["Lava Burst"]) ~= spellInCast) then
+			if (
+				(IsSpellInRange(Elementarist.SpellList["Unleash Elements"], "target") == 1) and
+				(
+					( (Elementarist.SpellList["Lava Burst"]) ~= spellInCast) and
+					( (Elementarist.SpellList["Lava Burst"]) ~= exspell1) and
+					( (Elementarist.SpellList["Lava Burst"]) ~= exspell2)
+				) and
+				(
+					(exspell1 == Elementarist.SpellList["Flame Shock"] ) or
+					(exspell2 == Elementarist.SpellList["Flame Shock"] ) or
+					(fsExpiration > timeshift + (2 * Elementarist.lastBaseGCD ) )
+				)
+			) then
 				local hasMainHandEnchant, _, _, _, _, _ = GetWeaponEnchantInfo()
 				if (hasMainHandEnchant) then
 					d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Lava Burst"])
@@ -883,9 +895,8 @@ function Elementarist:MiscSpell()
 	if Elementarist:SpellAvailable(Elementarist.SpellList["Wrath of Air Totem"]) then
 		if (
 			(Elementarist:hasTotem("player", Elementarist.SpellList["Wrath of Air Totem"]) == nil) and
-			(Elementarist:hasBuff("player", GetSpellInfo(Elementarist.CustomIDs["Moonkin Aura"])) == nil) and
-			(Elementarist:hasBuff("player", GetSpellInfo(Elementarist.CustomIDs["Shadowform"])) == nil) and
-			(Elementarist:hasBuff("player", GetSpellInfo(Elementarist.CustomIDs["Mind Quickening"])) == nil)
+			(Elementarist:hasBuff("player", GetSpellInfo(Elementarist.CustomIDs["Moonkin Aura"]), false, Elementarist.CustomIDs["Moonkin Aura"]) == nil) and
+			(Elementarist:hasBuff("player", GetSpellInfo(Elementarist.CustomIDs["Mind Quickening"]), false, Elementarist.CustomIDs["Mind Quickening"]) == nil)
 		) then
 			return Elementarist.SpellList["Wrath of Air Totem"]
 		end
diff --git a/Elementarist.toc b/Elementarist.toc
index c09f9b7..dfea284 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.0.0
+## Version: 2.0.1
 ## SavedVariables: ElementaristDB
 ## OptionalDeps: OmniCC, SpellFlash
 ## Dependencies: