Fixed a bug, when lightning shield count wasn't used as is should
Taracque [07-08-15 - 14:38]
Fixed a bug, when lightning shield count wasn't used as is should
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