Quantcast

Player entering world only runs if Elementarist is enabled… (good class, good spec etc…)

Taracque [01-30-16 - 20:36]
Player entering world only runs if Elementarist is enabled… (good class, good spec etc…)
Filename
Elementarist.lua
diff --git a/Elementarist.lua b/Elementarist.lua
index e037103..fe15908 100755
--- a/Elementarist.lua
+++ b/Elementarist.lua
@@ -214,16 +214,18 @@ end

 function Elementarist.events.PLAYER_ENTERING_WORLD()
 	Elementarist:detectTalent();
-	Elementarist:detectiLevel();
-	Elementarist.hasT17_4pcs = Elementarist:HasSetBonus( 165580, 4 );
-	Elementarist.hasT18_4pcs = Elementarist:HasSetBonus( 185872, 4 );
-	Elementarist.hasT18_Class_Trinket = Elementarist:HasTrinket(124521);
-	Elementarist.faction = UnitFactionGroup("player");
-	if (ElementaristDB.DebugMode) then
-	Elementarist.DebugChat = Elementarist:GetDebugFrame()
-		DEFAULT_CHAT_FRAME:AddMessage ("Elementarist ".. Elementarist.talent .. " module registered - Debug Mode",1,0,1)
-	else
-		DEFAULT_CHAT_FRAME:AddMessage ("Elementarist ".. Elementarist.talent .. " module registered",.7,.2,.2)
+	if Elementarist.isEnabled() then
+		Elementarist:detectiLevel();
+		Elementarist.hasT17_4pcs = Elementarist:HasSetBonus( 165580, 4 );
+		Elementarist.hasT18_4pcs = Elementarist:HasSetBonus( 185872, 4 );
+		Elementarist.hasT18_Class_Trinket = Elementarist:HasTrinket(124521);
+		Elementarist.faction = UnitFactionGroup("player");
+		if (ElementaristDB.DebugMode) then
+			Elementarist.DebugChat = Elementarist:GetDebugFrame()
+			DEFAULT_CHAT_FRAME:AddMessage ("Elementarist ".. Elementarist.talent .. " module registered - Debug Mode",1,0,1)
+		else
+			DEFAULT_CHAT_FRAME:AddMessage ("Elementarist ".. Elementarist.talent .. " module registered",.7,.2,.2)
+		end
 	end
 end