diff --git a/Elementarist.lua b/Elementarist.lua index e03feec..cef4363 100755 --- a/Elementarist.lua +++ b/Elementarist.lua @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Elementarist 3.3.3 +-- Elementarist 3.3.4 -- -- 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.3.3'; +Elementarist.versionNumber = '3.3.4'; Elementarist.enabled = true; Elementarist.playerName = UnitName("player") Elementarist.playerGUID = UnitGUID("player") @@ -20,6 +20,7 @@ Elementarist.shieldTrackerUpdate = 0 Elementarist.spellPower = GetSpellBonusDamage(4); -- nature spell bonus Elementarist.lastBaseGCD = 1.5 Elementarist.lastShockCD = 6 +Elementarist.debuffCount = 0; Elementarist.person = { ["foeCount"] = 0, ["friendCount"] = 0, @@ -674,7 +675,8 @@ function Elementarist:UpdateAuraTracker() end end; end; - end + end; + Elementarist.debuffCount = m; for i=m,10,1 do Elementarist:SetTexture(Elementarist.textureList["debuff_" .. tostring(m)],"") Elementarist.auraCooldownFrame["mini_" .. tostring(m)]:SetCooldown( 0, 0) diff --git a/Elementarist.toc b/Elementarist.toc index 8cf9498..d1d5bd1 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.3.3 +## Version: 3.3.4 ## SavedVariables: ElementaristDB ## OptionalDeps: OmniCC, SpellFlash ## Dependencies: diff --git a/modules/elemental.lua b/modules/elemental.lua index 368d838..a6a9dc4 100755 --- a/modules/elemental.lua +++ b/modules/elemental.lua @@ -225,7 +225,6 @@ Elementarist.elemental = { -- Elemental Mastery -- Berserking troll racial (if available) -- Blood Fury orc racial - -- Lifeblood Herbalism spell local d, e local name, expirationTime, _, name2, exp2 @@ -318,15 +317,7 @@ Elementarist.elemental = { return Elementarist.SpellList["Blood Fury"] end end - - -- Lifeblood - if Elementarist:SpellAvailable(Elementarist.SpellList["Lifeblood"]) then - d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Lifeblood"]) - if d <= 0.5 then - return Elementarist.SpellList["Lifeblood"] - end - end - + return "" end; IntSpell = function(self) diff --git a/modules/enhancement.lua b/modules/enhancement.lua index 6fb9f1a..a276561 100755 --- a/modules/enhancement.lua +++ b/modules/enhancement.lua @@ -15,7 +15,7 @@ Elementarist.enhancement = { ["Healing Stream Totem"] = GetSpellInfo(5394), ["Maelstrom Weapon"] = GetSpellInfo(51530), ["Stormstrike"] = GetSpellInfo(17364), - ["Windstrike"] = (115357), + ["Windstrike"] = 115357, -- not is spellbook ID used ["Lava Lash"] = GetSpellInfo(60103), ["Unleash Flame"] = GetSpellInfo(165462), ["Unleash Elements"] = GetSpellInfo(73680), @@ -28,6 +28,7 @@ Elementarist.enhancement = { Elementarist.trackAura = Elementarist.SpellList["Flame Shock"]; Elementarist.trackFilter = "PLAYER|HARMFUL"; Elementarist.trackDuration = 39; + Elementarist.debuffCount = 0; end; NextSpell = function(self,timeshift,exspell1,exspell2) local guid = UnitGUID("target") @@ -57,7 +58,7 @@ Elementarist.enhancement = { if (d) and (d>0) and (s == 0) then Elementarist.lastShockCD = d end - local s, d = GetSpellCooldown(Elementarist.SpellList["Earth Shock"]) + local s, d = GetSpellCooldown(Elementarist.SpellList["Frost Shock"]) if (d) and (d>0) and (s == 0) then Elementarist.lastShockCD = d end @@ -120,7 +121,9 @@ Elementarist.enhancement = { -- if Maelstrom Weapon has 5 stacks cast Lightning Bolt local _, _, _, mwcount = Elementarist:hasBuff("player",Elementarist.SpellList["Maelstrom Weapon"]) if (mwcount) and (mwcount >= 5) then - if (IsSpellInRange(Elementarist.SpellList["Lightning Bolt"], "target") == 1) and (exspell1 ~= Elementarist.SpellList["Lightning Bolt"]) and (exspell2 ~= Elementarist.SpellList["Lightning Bolt"]) then + if (IsSpellInRange(Elementarist.SpellList["Lightning Bolt"], "target") == 1) and + (exspell1 ~= Elementarist.SpellList["Lightning Bolt"]) and + (exspell2 ~= Elementarist.SpellList["Lightning Bolt"]) then return Elementarist.SpellList["Lightning Bolt"] end end @@ -130,13 +133,7 @@ Elementarist.enhancement = { if (ascendance == nil) then ascendanceExp = 0 end - d = nil - if (ascendance) and ((ascendanceExp-GetTime()-timeshift) > 0) then - d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Windstrike"]) - end - if (d == nil) then - d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Stormstrike"]) - end + d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Stormstrike"]) if ( ((d - timeshift) <= 0) and (exspell1 ~= Elementarist.SpellList["Stormstrike"]) and @@ -145,10 +142,8 @@ Elementarist.enhancement = { (exspell2 ~= Elementarist.SpellList["Windstrike"]) ) then if (ascendance) and ((ascendanceExp-GetTime()-timeshift) > 0) then - Elementarist:Debug("Windstrike",ascendanceExp) return Elementarist.SpellList["Windstrike"] else - Elementarist:Debug("Stormstrike",ascendanceExp) return Elementarist.SpellList["Stormstrike"] end end @@ -168,7 +163,11 @@ Elementarist.enhancement = { if (not fsExpiration) then fsExpiration = 0 end - if (Elementarist:hasBuff("player",Elementarist.SpellList["Unleash Flame"])) and (exspell1 ~= Elementarist.SpellList["Frost Shock"]) and (exspell2 ~= Elementarist.SpellList["Frost Shock"]) and (exspell1 ~= Elementarist.SpellList["Flame Shock"]) and (exspell2 ~= Elementarist.SpellList["Flame Shock"]) then + if (Elementarist:hasBuff("player",Elementarist.SpellList["Unleash Flame"])) and + (exspell1 ~= Elementarist.SpellList["Frost Shock"]) and + (exspell2 ~= Elementarist.SpellList["Frost Shock"]) and + (exspell1 ~= Elementarist.SpellList["Flame Shock"]) and + (exspell2 ~= Elementarist.SpellList["Flame Shock"]) then if IsSpellInRange(Elementarist.SpellList["Flame Shock"], "target") == 1 then d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Flame Shock"]) if ((d - timeshift) <= 0) and ((fsExpiration - GetTime() - timeshift) < 9) then @@ -185,7 +184,11 @@ Elementarist.enhancement = { -- Frost Shock d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Frost Shock"]) - if ((d - timeshift) <= 0) and (exspell1 ~= Elementarist.SpellList["Frost Shock"]) and (exspell2 ~= Elementarist.SpellList["Frost Shock"]) and (exspell1 ~= Elementarist.SpellList["Flame Shock"]) and (exspell2 ~= Elementarist.SpellList["Flame Shock"]) then + if ((d - timeshift) <= 0) and + (exspell1 ~= Elementarist.SpellList["Frost Shock"]) and + (exspell2 ~= Elementarist.SpellList["Frost Shock"]) and + (exspell1 ~= Elementarist.SpellList["Flame Shock"]) and + (exspell2 ~= Elementarist.SpellList["Flame Shock"]) then return Elementarist.SpellList["Frost Shock"] end @@ -203,10 +206,8 @@ Elementarist.enhancement = { -- Miscelaneous spell order: -- Lightning Shield -- Searing Totem - -- Elemental Mastery -- Berserking troll racial (if available) -- Blood Fury orc racial - -- Lifeblood Herbalism spell local d, e local name, expirationTime, _, name2, exp2 @@ -242,12 +243,22 @@ Elementarist.enhancement = { end end - -- Searing Totem - if Elementarist:SpellAvailable(Elementarist.SpellList["Searing Totem"]) then - local haveFireTotem,fireTotemName,_,_ = GetTotemInfo(1) - if (fireTotemName == "") then - -- no fire totem - return Elementarist.SpellList["Searing Totem"] + -- Searing or Magma Totem + if (Elementarist.person["foeCount"]>=2) then + if Elementarist:SpellAvailable(Elementarist.SpellList["Magma Totem"]) then + local haveFireTotem,fireTotemName,_,_ = GetTotemInfo(1) + if (fireTotemName == "") then + -- no fire totem + return Elementarist.SpellList["Magma Totem"] + end + end + else + if Elementarist:SpellAvailable(Elementarist.SpellList["Searing Totem"]) then + local haveFireTotem,fireTotemName,_,_ = GetTotemInfo(1) + if (fireTotemName == "") then + -- no fire totem + return Elementarist.SpellList["Searing Totem"] + end end end @@ -262,14 +273,6 @@ Elementarist.enhancement = { end end - -- Elemental Mastery - if Elementarist:SpellAvailable(Elementarist.SpellList["Elemental Mastery"]) then - d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Elemental Mastery"]) - if d <= 0.5 then - return Elementarist.SpellList["Elemental Mastery"] - end - end - -- Ascendance if Elementarist:SpellAvailable(Elementarist.SpellList["Ascendance"]) then name = Elementarist:hasBuff("player",Elementarist.SpellList["AscendanceElementalBuff"]) @@ -296,15 +299,7 @@ Elementarist.enhancement = { return Elementarist.SpellList["Blood Fury"] end end - - -- Lifeblood - if Elementarist:SpellAvailable(Elementarist.SpellList["Lifeblood"]) then - d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Lifeblood"]) - if d <= 0.5 then - return Elementarist.SpellList["Lifeblood"] - end - end - + return "" end; IntSpell = function(self) @@ -342,26 +337,12 @@ Elementarist.enhancement = { end end - -- Lava Beam if there are multiple targets, (count in a dirty way from combat log, not to accurate!!!) - if Elementarist:SpellAvailable(Elementarist.SpellList["Lava Beam"]) then - if (Elementarist.person["foeCount"]>2) then - if IsSpellInRange(Elementarist.SpellList["Lava Beam"], "target") == 1 then - d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Lava Beam"]) - if (d) and (d<0.5) then - return Elementarist.SpellList["Lava Beam"] - end - end - end - end - - -- EQ if not in rotataion and has 3 or more targets - if (not ElementaristDB.EnableEQ) then - if ((Elementarist.iLvl>=550) and (Elementarist.person["foeCount"]>1)) or (Elementarist.person["foeCount"]>2) then - if (exspell1 ~= Elementarist.SpellList["Earthquake"]) and (exspell2 ~= Elementarist.SpellList["Earthquake"]) and ((Elementarist.SpellList["Earthquake"]) ~= spellInCast) then - d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Earthquake"]) - if (d) and (d<0.5) then - return Elementarist.SpellList["Earthquake"] - end + -- Fire Nova if there are multiple targets, (count in a dirty way from combat log, not to accurate!!!) + if Elementarist:SpellAvailable(Elementarist.SpellList["Fire Nova"]) then + if (Elementarist.person["foeCount"]>2) and (Elementarist.debuffCount > 0) then + d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Fire Nova"]) + if (d) and (d<0.5) then + return Elementarist.SpellList["Fire Nova"] end end end @@ -385,5 +366,4 @@ Elementarist.enhancement = { ShieldName = function(self) return "Lightning Shield"; end; - };