Quantcast

Fixed ES condition

Taracque [05-16-11 - 15:31]
Fixed ES condition
Filename
Elementarist.lua
diff --git a/Elementarist.lua b/Elementarist.lua
index 315ff60..bbb75d6 100755
--- a/Elementarist.lua
+++ b/Elementarist.lua
@@ -29,7 +29,7 @@ Elementarist.lastPersonTablePurged = 0.0;
 Elementarist.configPanel = nil
 Elementarist.prevDB = {}
 Elementarist.DPSTable = {}
-Elementarist.DebugMode = false
+Elementarist.DebugMode = true
 Elementarist.inParty = 0
 Elementarist.OmniCC = _G['OmniCC']
 Elementarist.SpellFlash = _G['SpellFlashAddon']
@@ -271,10 +271,12 @@ function Elementarist:RemoveFromTables(guid)
 	if (Elementarist.person["friend"][guid]) and (Elementarist.person["friend"][guid] ~= 0) then
 		Elementarist.person["friend"][guid] = 0
 		Elementarist.person["friendCount"] = Elementarist.person["friendCount"] - 1
+		Elementarist:Debug('Enemy died:', Elementarist.person["foeCount"])
 	end
 	if (Elementarist.person["foe"][guid]) and (Elementarist.person["foe"][guid] ~= 0) then
 		Elementarist.person["foe"][guid] = 0
 		Elementarist.person["foeCount"] = Elementarist.person["foeCount"] - 1
+		Elementarist:Debug('Friend died:', Elementarist.person["friendCount"])
 	end
 end

@@ -332,8 +334,8 @@ function Elementarist:CountPerson(time, event, sguid, sname, sflags, dguid, dnam
 		Elementarist:PurgePersonTable()
 	end
 	--
-	Elementarist:Debug('Enemy count:', Elementarist.person["foeCount"])
-	Elementarist:Debug('Friend count:', Elementarist.person["friendCount"])
+	-- Elementarist:Debug('Enemy count:', Elementarist.person["foeCount"])
+	-- Elementarist:Debug('Friend count:', Elementarist.person["friendCount"])
 end

 function Elementarist.HighDMGFormat(dmg_amount)
@@ -719,9 +721,12 @@ function Elementarist:NextSpell(timeshift,exspell1,exspell2)
 		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 (lscount>=9) ) or
-					( (lscount>=7) and ((fsExpiration - GetTime() - timeshift) > Elementarist.lastShockCD) and ((fsExpiration - GetTime() - timeshift) < Elementarist.lastShockCD + 2) )
+				( (d) and ((d-timeshift) <= 0) and (lscount) ) and (
+					(lscount>=9) or
+					( (lscount>=7) and
+						( (fsExpiration - GetTime() - timeshift) > Elementarist.lastShockCD ) and
+						( (fsExpiration - GetTime() - timeshift) < Elementarist.lastShockCD + 2 )
+					)
 				)
 			) then
 			return Elementarist.SpellList["Earth Shock"]