From 4cf8463f3525c8fd4fffc0fd9f90f7d20f0a461c Mon Sep 17 00:00:00 2001 From: Taracque Date: Wed, 8 Jul 2015 16:38:35 +0200 Subject: [PATCH] Fixed a bug, when lightning shield count wasn't used as is should --- modules/elemental.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/elemental.lua b/modules/elemental.lua index 4784f96..0f0a697 100755 --- a/modules/elemental.lua +++ b/modules/elemental.lua @@ -46,7 +46,8 @@ Elementarist.elemental = { local lastSpell local doFS = false local _ - + local lscount + if (exspell1) then if (exspell2) then lastSpell = exspell2 @@ -63,14 +64,15 @@ Elementarist.elemental = { local LvBct = 2 - (2 * Elementarist.spellHaste * .01) -- check Shock CD - local s, d = GetSpellCooldown(Elementarist.SpellList["Flame Shock"]) + s, d = GetSpellCooldown(Elementarist.SpellList["Flame Shock"]) if (d) and (d>0) and (s == 0) then Elementarist.lastShockCD = d end - local s, d = GetSpellCooldown(Elementarist.SpellList["Earth Shock"]) + s, d = GetSpellCooldown(Elementarist.SpellList["Earth Shock"]) if (d) and (d>0) and (s == 0) then Elementarist.lastShockCD = d end + lscount = Elementarist:hasBuff("player",Elementarist.SpellList["Lightning Shield"]) -- if target is dead, return "" if (UnitHealth("target")<=0) then @@ -217,7 +219,6 @@ Elementarist.elemental = { if (Elementarist:Count(Elementarist.SpellList["Flame Shock"],spellInCast,exspell1,exspell2) == 0 and Elementarist:Count(Elementarist.SpellList["Earth Shock"],spellInCast,exspell1,exspell2) == 0) 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>=17) or -- Lightning shield has 17 charge -- 1.7.9.5