From 6637de1ead3f67e7cfa7a256f43f59adec557122 Mon Sep 17 00:00:00 2001 From: Taracque Date: Tue, 13 Jan 2015 11:40:51 +0100 Subject: [PATCH] Fixed: Ligthning Shield charge count is 17 for Earth Shock Added: Lava Burst predicted, if Echo of the Elements buff is active --- Change_log.txt | 4 ++++ Elementarist.lua | 6 +++--- Elementarist.toc | 2 +- modules/elemental.lua | 23 +++++++++++++++++++---- 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/Change_log.txt b/Change_log.txt index 2f5c58c..697846d 100755 --- a/Change_log.txt +++ b/Change_log.txt @@ -1,3 +1,7 @@ +***v3.3.6 +* Fixed: Ligthning Shield charge count is 17 for Earth Shock +* Added: Lava Burst predicted, if Echo of the Elements buff is active + ***v3.3.5 * Fixed: Alchemist flask not shown for level > 90 diff --git a/Elementarist.lua b/Elementarist.lua index 42c85e4..b30662e 100755 --- a/Elementarist.lua +++ b/Elementarist.lua @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Elementarist 3.3.5 +-- Elementarist 3.3.6 -- -- 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.5'; +Elementarist.versionNumber = '3.3.6'; Elementarist.enabled = true; Elementarist.playerName = UnitName("player") Elementarist.playerGUID = UnitGUID("player") @@ -73,7 +73,7 @@ Elementarist.SpellList = { ["Earthquake"] = GetSpellInfo(61882), ["Elemental Blast"] = GetSpellInfo(117014), ["Ascendance"] = GetSpellInfo(114049), - + ["Echo of the Elements"] = GetSpellInfo(108283), -- racials ["Berserking"] = GetSpellInfo(26297), -- Troll racial ["Blood Fury"] = GetSpellInfo(33697), -- Orc racial diff --git a/Elementarist.toc b/Elementarist.toc index c42a89e..81033b0 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.5 +## Version: 3.3.6 ## SavedVariables: ElementaristDB ## OptionalDeps: OmniCC, SpellFlash ## Dependencies: diff --git a/modules/elemental.lua b/modules/elemental.lua index bce9eb2..66600c5 100755 --- a/modules/elemental.lua +++ b/modules/elemental.lua @@ -149,7 +149,22 @@ Elementarist.elemental = { end end end - + + -- Echo of the Elements + -- if precvious spell is Lava Burst, add it once more + local eoeBuff, _, _, _, _, _, eoeExp = Elementarist:hasBuff("player",Elementarist.SpellList["Echo of the Elements"]); + if (eoeExp == nil) then + eoeExp = 0 + end + if (eoeBuff) and ((eoeExp-GetTime()-timeshift) > 0) then + if (exspell2 == Elementarist.SpellList["Lava Burst"] and (exspell1 ~= Elementarist.SpellList["Lava Burst"])) or + ((exspell1 == Elementarist.SpellList["Lava Burst"]) and (spellInCast ~= Elementarist.SpellList["Lava Burst"]) and not(exspell2)) or + ((spellInCast == Elementarist.SpellList["Lava Burst"]) and not(exspell1)) + then + return Elementarist.SpellList["Lava Burst"] + end + end + -- Lava Burst if not on Cooldown local ascendance, _, _, _, _, _, ascendanceExp = Elementarist:hasBuff("player",Elementarist.SpellList["AscendanceElementalBuff"]); if (ascendance == nil) then @@ -190,15 +205,15 @@ Elementarist.elemental = { end end - -- Earth shock if Lightning Shield count >=12 and not on cd, and FS debuff remaining > FS cooldown, or FS debuff remaining between FS and FS cd + 2sec and LS count>=10 + -- Earth shock if Lightning Shield count >=17 and not on cd, and FS debuff remaining > FS cooldown, or FS debuff remaining between FS and FS cd + 2sec and LS count>=13 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>=12) or -- Lightning shield has 12 charge - ( (lscount>=10) and ( (fsExpiration - GetTime() - timeshift) < Elementarist.lastShockCD + 2 ) ) -- or, has 10 or more charges but FS expiration within 2 secs to FS CD + (lscount>=17) or -- Lightning shield has 17 charge + ( (lscount>=13) and ( (fsExpiration - GetTime() - timeshift) < Elementarist.lastShockCD + 2 ) ) -- or, has 13 or more charges but FS expiration within 2 secs to FS CD ) ) then return Elementarist.SpellList["Earth Shock"] -- 1.7.9.5