Quantcast

Merge branch 'master' of git.curseforge.net:wow/elementarist/mainline

Taracque [03-06-13 - 15:25]
Merge branch 'master' of git.curseforge.net:wow/elementarist/mainline
Filename
Change_log.txt
Elementarist.lua
Elementarist.toc
modules/restoration.lua
diff --git a/Change_log.txt b/Change_log.txt
index 6862e4e..22d87a2 100755
--- a/Change_log.txt
+++ b/Change_log.txt
@@ -1,5 +1,6 @@
 **v3.1.3**
 * Added: Stormlash totem now automaticaly announced to the raid/party chat.
+* Change: 5.2 Compatibiliy

 **v3.1.2**
 * Fixed: Modules now can be disabled
diff --git a/Elementarist.lua b/Elementarist.lua
index 3bbfd41..8ee6359 100755
--- a/Elementarist.lua
+++ b/Elementarist.lua
@@ -389,9 +389,9 @@ end

 function Elementarist:CountPerson(time, event, sguid, sname, sflags, dguid, dname, dflags)
 	local suffix = event:match(".+(_.-)$")
-	local stype = (tonumber(sguid:sub(5,5), 16)) % 8
-	local dtype = (tonumber(dguid:sub(5,5), 16)) % 8
 	if Elementarist.HostileFilter[suffix] then
+		local stype = (tonumber(sguid:sub(5,5), 16)) % 8
+		local dtype = (tonumber(dguid:sub(5,5), 16)) % 8
 		if (bit.band(dflags, COMBATLOG_OBJECT_REACTION_HOSTILE) == COMBATLOG_OBJECT_REACTION_HOSTILE) and (bit.band(dflags, COMBATLOG_OBJECT_AFFILIATION_OUTSIDER) == COMBATLOG_OBJECT_AFFILIATION_OUTSIDER) and ((dtype==0) or (dtype==3)) then
 			if ((not Elementarist.person["foe"][dguid]) or (Elementarist.person["foe"][dguid]==0)) then
 				Elementarist.person["foeCount"] = Elementarist.person["foeCount"] + 1
diff --git a/Elementarist.toc b/Elementarist.toc
index 105feb1..f79b13d 100755
--- a/Elementarist.toc
+++ b/Elementarist.toc
@@ -1,4 +1,4 @@
-## Interface: 50100
+## Interface: 50200
 ## Title: Elementarist
 ## Notes: Elemental shaman spell rotation helper
 ## Author: Taracque, Felmosórongy of Arathor
diff --git a/modules/restoration.lua b/modules/restoration.lua
index a9e0410..f26c23e 100755
--- a/modules/restoration.lua
+++ b/modules/restoration.lua
@@ -182,7 +182,7 @@ Elementarist.restoration = {
 				end;
 				if (count == 0) then
 					e = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Riptide"])
-					if (e-timeshift <= 0) then
+					if (e) and (e-timeshift <= 0) then
 						return Elementarist.SpellList["Riptide"];
 					end
 				end;
@@ -192,7 +192,7 @@ Elementarist.restoration = {
 		-- Healing Rain
 		if (exspell1 ~= Elementarist.SpellList["Healing Rain"]) and (exspell2 ~= Elementarist.SpellList["Healing Rain"]) then
 			e = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Healing Rain"]);
-			if (e-timeshift <= 0) then
+			if (e) and (e-timeshift <= 0) then
 				return Elementarist.SpellList["Healing Rain"];
 			end;
 		end;
@@ -208,7 +208,7 @@ Elementarist.restoration = {
 		-- Spirit Link Totem
 		if (exspell1 ~= Elementarist.SpellList["Spirit Link Totem"]) and (exspell2 ~= Elementarist.SpellList["Spirit Link Totem"]) then
 			e = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Spirit Link Totem"]);
-			if (e-timeshift <= 0) then
+			if (e) and (e-timeshift <= 0) then
 				return Elementarist.SpellList["Spirit Link Totem"];
 			end;
 		end;