Quantcast

5.0.4 Compatible

Taracque [08-27-12 - 11:45]
5.0.4 Compatible

Made MOP compatible. Non existent totems removed, spells updated.
Filename
Change_log.txt
Ele_GUI.lua
Elementarist.lua
Elementarist.toc
Localization_enUS.lua
diff --git a/Change_log.txt b/Change_log.txt
old mode 100644
new mode 100755
index e8632cf..db77c3b
--- a/Change_log.txt
+++ b/Change_log.txt
@@ -1,3 +1,6 @@
+**v2.9.0**
+* Mists of Pandaria (5.0.4) compatibility
+
 **v2.1.5**
 * Added: Option to disable misc and int frames.

diff --git a/Ele_GUI.lua b/Ele_GUI.lua
old mode 100644
new mode 100755
index 72b1748..1c1f784
--- a/Ele_GUI.lua
+++ b/Ele_GUI.lua
@@ -307,20 +307,17 @@ function Elementarist:CreateConfig()
 	ShieldAlpha:SetPoint("TOPLEFT",200,-218)
 	ShieldAlpha:Show()

-	local FireNovaBtn = Elementarist:CreateCheckButton(L.CONFIG_ENABLE_NOVA, Elementarist.configPanel, ElementaristDB, "FireNova", false)
-	FireNovaBtn:SetPoint('TOPLEFT', 10, -268)
-
 	local FSBehaviourMenu = Elementarist:CreateDropDownMenu(L.CONFIG_BEHAVIOUR, Elementarist.configPanel, ElementaristDB, "Behaviour", {{text = Elementarist.Behaviours["1"]}, {text = Elementarist.Behaviours["2"]}},200)
-	FSBehaviourMenu:SetPoint('TOPLEFT', 10, -298)
+	FSBehaviourMenu:SetPoint('TOPLEFT', 10, -268)

 	local UEEnableBtn = Elementarist:CreateCheckButton(L.CONFIG_ENABLE_UE_SPELL, Elementarist.configPanel, ElementaristDB, "EnableUE", false)
-	UEEnableBtn:SetPoint('TOPLEFT', 10, -328)
+	UEEnableBtn:SetPoint('TOPLEFT', 10, -298)

 	local EQEnableBtn = Elementarist:CreateCheckButton(L.CONFIG_ENABLE_EQ_SPELL, Elementarist.configPanel, ElementaristDB, "EnableEQ", false)
-	EQEnableBtn:SetPoint('TOPLEFT', 10, -358)
+	EQEnableBtn:SetPoint('TOPLEFT', 10, -328)

 	local ThreatWarnBtn = Elementarist:CreateCheckButton(L.CONFIG_THREAT_WARNING, Elementarist.configPanel, ElementaristDB, "ThreatWarning", false)
-	ThreatWarnBtn:SetPoint('TOPLEFT', 10, -388)
+	ThreatWarnBtn:SetPoint('TOPLEFT', 10, -358)

 	local ResetBtn = Elementarist:CreateButton(L.CONFIG_RESET_POSITIONS, Elementarist.configPanel)
 	ResetBtn:SetWidth(160)
diff --git a/Elementarist.lua b/Elementarist.lua
old mode 100644
new mode 100755
index de53c77..f6d1607
--- a/Elementarist.lua
+++ b/Elementarist.lua
@@ -1,5 +1,5 @@
 -------------------------------------------------------------------------------
--- Elementarist 2.1.5
+-- Elementarist 2.9.0
 --
 -- 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.1.5'
+Elementarist.versionNumber = '2.9.0'
 Elementarist.playerName = UnitName("player")
 Elementarist.playerGUID = UnitGUID("player")
 Elementarist.targetGUID = nil
@@ -44,12 +44,11 @@ Elementarist.SFHistory = {
 }
 Elementarist.isEle = false
 Elementarist.talentUnsure = true
+Elementarist.tier6Talent = nil
 Elementarist.lastSpell = nil
 Elementarist.CustomIDs = {
-	["Flask of Enhancement Item"] = 58149,
-	["Flask of Enhancement Spell"] = 79640,
-	["Moonkin Aura"] = 24907,
-	["Mind Quickening"] = 49868
+	["Alchemist's Flask Item"] = 75525,
+	["Alchemist's Flask Spell"] = 79640
 }
 Elementarist.SpellList = {
 	["Flame Shock"] = GetSpellInfo(8050),
@@ -61,28 +60,23 @@ Elementarist.SpellList = {
 	["Wind Shear"] = GetSpellInfo(57994),
 	["Water Shield"] = GetSpellInfo(52127),
 	["Flametongue Weapon"] = GetSpellInfo(8024),
-	["Wrath of Air Totem"] = GetSpellInfo(3738),
-	["Mana Spring Totem"] = GetSpellInfo(5675),
 	["Elemental Mastery"] = GetSpellInfo(16166),
-	["Fire Nova"] = GetSpellInfo(1535),
 	["Earth Shock"] = GetSpellInfo(8042),
 	["Searing Totem"] = GetSpellInfo(3599),
+	["Magma Totem"] = GetSpellInfo(8190),
 	["Lightning Shield"] = GetSpellInfo(324),
 	["Unleash Elements"] = GetSpellInfo(73680),
 	["Earthquake"] = GetSpellInfo(61882),
+	["Elemental Blast"] = GetSpellInfo(117014),

 	-- racials
 	["Berserking"] = GetSpellInfo(26297),	-- Troll racial
 	["Blood Fury"] = GetSpellInfo(33697),	-- Orc racial

-	-- debuffs
-	["Totem of Wrath Debuff"] = GetSpellInfo(30708),
-	["Heart of the Crusader"] = GetSpellInfo(54499),
-
 	-- other buffs
 	["Demonic Pact"] = GetSpellInfo(48090),
-	["Flask of Enhancement"] = GetSpellInfo(Elementarist.CustomIDs["Flask of Enhancement Spell"]),
-	["Flask of the Draconic Mind"] = GetSpellInfo(79470),
+	["Alchemist's Flask"] = GetSpellInfo(Elementarist.CustomIDs["Alchemist's Flask Spell"]),
+	["Flask of the Warm Sun"] = GetSpellInfo(105691),
 	["Lifeblood"] = GetSpellInfo(55503)
 }
 Elementarist.debuffCooldownFrame = {
@@ -152,6 +146,7 @@ function Elementarist:GetDebugFrame()
 	for i=1,NUM_CHAT_WINDOWS do
 		local windowName = GetChatWindowInfo(i);
 		if windowName == "EleDBG" then
+			Elementarist.DebugMode = true
 			return getglobal("ChatFrame" .. i)
 		end
 	end
@@ -274,14 +269,12 @@ function Elementarist:InitSettings()
 end

 function Elementarist:detectTalent()
-	local _,_,_,_,rest,_ = GetTalentTabInfo(3)
-	local _,_,_,_,enha,_ = GetTalentTabInfo(2)
-	local _,_,_,_,elem,_ = GetTalentTabInfo(1)
+	local spec = GetSpecialization()

-	if (elem+rest+enha>0) then
-		Elementarist.isEle = ((elem>=enha) and (elem>=rest))
-	end
-	if (elem + enha + rest == 0) then
+	Elementarist.isEle = (spec == 1)
+	_, Elementarist.tier6Talent = GetTalentRowSelectionInfo(6)
+	Elementarist:Debug("Tier6",Elementarist.tier6Talent)
+	if (spec == nil) then
 		Elementarist.talentUnsure = true
 	else
 		Elementarist.talentUnsure = false
@@ -289,9 +282,9 @@ function Elementarist:detectTalent()
 end

 function Elementarist:PlayerInParty()
-	if (GetNumRaidMembers()>0) then
+	if (IsInRaid()>0) then
 		return 2
-	elseif (GetNumPartyMembers()>0) then
+	elseif (GetNumGroupMembers()>0) then
 		return 1
 	else
 		return 0
@@ -711,6 +704,21 @@ function Elementarist:NextSpell(timeshift,exspell1,exspell2)
 			timeshift = timeshift + Elementarist.lastBaseGCD
 		end
 	end
+
+	-- if Tier6 talent is Unleashed Fury Unleash Elements
+	if (Elementarist.tier6Talent == 16) then
+		if (GetWeaponEnchantInfo()) and (exspell1 ~= Elementarist.SpellList["Unleash Elements"]) and (exspell2 ~= Elementarist.SpellList["Unleash Elements"]) then
+			return Elementarist.SpellList["Unleash Elements"];
+		end
+	-- if Tier6 talent is Elemental Blast use it
+	elseif (Elementarist.tier6Talent == 18) then
+		if (exspell1 ~= Elementarist.SpellList["Elemental Blast"]) and (exspell2 ~= Elementarist.SpellList["Elemental Blast"]) then
+			d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Flame Shock"])
+			if ((d - timeshift) <= 0) then
+				return Elementarist.SpellList["Elemental Blast"]
+			end
+		end
+	end

 	-- check if Flame shock applied on target first
 	name, _, _, _, _, _, fsExpiration, unitCaster = Elementarist:hasDeBuff("target", Elementarist.SpellList["Flame Shock"], "player");
@@ -793,15 +801,15 @@ function Elementarist:NextSpell(timeshift,exspell1,exspell2)
 		end
 	end

-	-- Earth shock if Lightning Shield count >=9 and not on cd, and FS debuff remaining > FS cooldown, or FS debuff remaining between FS and FS cd + 2sec and LS count>=7
+	-- 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
 			d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Earth Shock"])
 			local _, _, _, lscount = Elementarist:hasBuff("player",Elementarist.SpellList["Lightning Shield"])
 			if (
 				( (d) and ((d-timeshift) <= 0) and (lscount) ) and (	-- Earth Shock is available, and has lightning shield
-					(lscount>=9) or 														-- Lightning shield has 9 charge
-					( (lscount>=7) and ( (fsExpiration - GetTime() - timeshift) < Elementarist.lastShockCD + 2 ) )	-- or, has 7 or more charges but FS expiration within 2 secs to FS CD
+					(lscount>=7) or 														-- Lightning shield has 7 charge
+					( (lscount>=5) and ( (fsExpiration - GetTime() - timeshift) < Elementarist.lastShockCD + 2 ) )	-- or, has 5 or more charges but FS expiration within 2 secs to FS CD
 				)
 			) then
 				return Elementarist.SpellList["Earth Shock"]
@@ -828,8 +836,6 @@ function Elementarist:MiscSpell()
 	-- Flametongoue weapon
 	-- Lightning Shield
 	-- Searing Totem
-	-- Totem of Wrath
-	-- Wrath of Air totem
 	-- Elemental Mastery
 	-- Berserking troll racial (if available)
 	-- Blood Fury orc racial
@@ -839,13 +845,13 @@ function Elementarist:MiscSpell()
 	local name, expirationTime

 	-- Alchemy Flask of Enhancement
-	if GetItemCount(Elementarist.CustomIDs["Flask of Enhancement Item"]) ~= 0 then
-		name = Elementarist:hasBuff("player", Elementarist.SpellList["Flask of the Draconic Mind"]);
+	if GetItemCount(Elementarist.CustomIDs["Alchemist's Flask Item"]) ~= 0 then
+		name = Elementarist:hasBuff("player", Elementarist.SpellList["Flask of the Warm Sun"]);
 		if (name == nil) then
-			name, _, _, _, _, _, expirationTime = Elementarist:hasBuff("player", Elementarist.SpellList["Flask of Enhancement"], false, Elementarist.CustomIDs["Flask of Enhancement Spell"]);
+			name, _, _, _, _, _, expirationTime = Elementarist:hasBuff("player", Elementarist.SpellList["Alchemist's Flask"], false, Elementarist.CustomIDs["Alchemist's Flask Spell"]);
 			if (name == nil) or (expirationTime < 2) then
 				if (icon == nil) then
-					icon = GetItemIcon(Elementarist.CustomIDs["Flask of Enhancement Item"])
+					icon = GetItemIcon(Elementarist.CustomIDs["Alchemist's Flask Item"])
 				end
 				return nil,icon
 			end
@@ -877,17 +883,6 @@ function Elementarist:MiscSpell()
 		end
 	end

-	-- Wrath of Air totem
-	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"]), 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
-	end
-
 	-- Elemental Mastery
 	if Elementarist:SpellAvailable(Elementarist.SpellList["Elemental Mastery"]) then
 		d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Elemental Mastery"])
@@ -967,20 +962,6 @@ function Elementarist:IntSpell()
 		end
 	end

-	-- if >=4 foes are available, and Fire Nova enabled in settings, and not in cd (and has Flame Shock applied to 3 or more targets)
-	if (exspell1 ~= Elementarist.SpellList["Fire Nova"]) and (exspell2 ~= Elementarist.SpellList["Fire Nova"]) and (Elementarist.fsCount >= 3) then
-		if (ElementaristDB.FireNova) and (Elementarist.person["foeCount"]>=4) then
-			-- is Flame Shock on target
-			local f = Elementarist:hasDeBuff("target",Elementarist.SpellList["Flame Shock"],"player")
-			if f then
-	            d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Fire Nova"])
-				if (d<0.5) then
-					return Elementarist.SpellList["Fire Nova"]
-				end
-			end
-		end
-	end
-
 	-- check if purgeable buff is on target (not sure if this is ok)
 	if Elementarist:SpellAvailable(Elementarist.SpellList["Purge"]) then
 		if IsSpellInRange(Elementarist.SpellList["Purge"], "target") == 1 then
diff --git a/Elementarist.toc b/Elementarist.toc
index 08bbbd5..d5d3360 100755
--- a/Elementarist.toc
+++ b/Elementarist.toc
@@ -1,8 +1,8 @@
-## Interface: 40300
+## Interface: 50001
 ## Title: Elementarist
 ## Notes: Elemental shaman spell rotation helper
 ## Author: Taracque, Felmosórongy of Arathor
-## Version: 2.1.5
+## Version: 2.9.0
 ## SavedVariables: ElementaristDB
 ## OptionalDeps: OmniCC, SpellFlash
 ## Dependencies:
diff --git a/Localization_enUS.lua b/Localization_enUS.lua
index 7f40a3d..6e258b8 100755
--- a/Localization_enUS.lua
+++ b/Localization_enUS.lua
@@ -17,7 +17,6 @@ if GetLocale() then
 	L.CONFIG_DISABLE_DEBUFF_TRACKER = "Disable debuff tracker"
 	L.CONFIG_DEBUFF_TRACKER_SCALE = "Debuff tracker scale"
 	L.CONFIG_DEBUFF_TRACKER_ALPHA = "Debuff tracker alpha"
-	L.CONFIG_ENABLE_NOVA = "Enable Fire Nova in rotation"
 	L.CONFIG_BEHAVIOUR = "Flame Shock behaviour"
 	L.CONFIG_THREAT_WARNING = "Threat warning"
 	L.CONFIG_RESET_POSITIONS = "Reset frame positions"