Quantcast

Earthquake added

Taracque [05-18-11 - 14:36]
Earthquake added
Filename
Change_log.txt
Elementarist.lua
diff --git a/Change_log.txt b/Change_log.txt
index 1f4fb66..dd7e48a 100755
--- a/Change_log.txt
+++ b/Change_log.txt
@@ -3,6 +3,7 @@
 * Change: CL advised if more than 2 enemies are presents
 * Bugfix: Better (and maybe faster) friend and foe detection
 * Added: Flame Shock tracker now track untargeted Flameshocks to, up to 4 untargeted debuff tracked
+* Added: Earthquake added if >= 4 foes are detected

 **v1.9.9**
 * Bugfix: Fixed friend and foe detection
diff --git a/Elementarist.lua b/Elementarist.lua
index 1a8529d..ec57f43 100755
--- a/Elementarist.lua
+++ b/Elementarist.lua
@@ -68,6 +68,7 @@ Elementarist.SpellList = {
 	["Searing Totem"] = GetSpellInfo(3599),
 	["Lightning Shield"] = GetSpellInfo(324),
 	["Unleash Elements"] = GetSpellInfo(73680),
+	["Earthquake"] = GetSpellInfo(61882),

 	-- racials
 	["Berserking"] = GetSpellInfo(26297),	-- Troll racial
@@ -368,6 +369,8 @@ function Elementarist.HighDMGFormat(dmg_amount)
 	end
 end

+-- for 4.2:
+-- function Elementarist.events.COMBAT_LOG_EVENT_UNFILTERED(timestamp, event, hideCaster, srcGUID, srcName, srcFlags, srcRaidFlags, dstGUID, dstName, dstFlags, dstRaidFlags, spellId, spellName, spellSchool, damage, ...)
 function Elementarist.events.COMBAT_LOG_EVENT_UNFILTERED(timestamp, event, hideCaster, srcGUID, srcName, srcFlags, dstGUID, dstName, dstFlags, spellId, spellName, spellSchool, damage, ...)
 	if Elementarist.isEnabled() then
 		if srcName == Elementarist.playerName then
@@ -750,6 +753,16 @@ function Elementarist:NextSpell(timeshift,exspell1,exspell2)
 		end
 	end

+	-- if >=4 foes are available, and Earthquake not on cd
+	if (exspell1 ~= Elementarist.SpellList["Earthquake") and (exspell2 ~= Elementarist.SpellList["Earthquake") then
+		if (Elementarist.person["foeCount"]>=4) then
+			d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Earthquake"])
+			if ((d-timeshift) <= 0) then
+				return Elementarist.SpellList["Earthquake"]
+			end
+		end
+	end
+
 	-- if >=4 foes are available, and Fire Nova enabled in settings, and not in cd (and has Flame Shock applied on target)
 	if (exspell1 ~= Elementarist.SpellList["Fire Nova"]) and (exspell2 ~= Elementarist.SpellList["Fire Nova"]) then
 		if (ElementaristDB.FireNova) and (Elementarist.person["foeCount"]>=4) then