Quantcast

All in one execute phase experiment. Need a way to make an exception for Paladins, as they execute >= 20%

Scott King [07-05-15 - 06:24]
All in one execute phase experiment. Need a way to make an exception for Paladins, as they execute >= 20%
Filename
PortraitHealth.lua
diff --git a/PortraitHealth.lua b/PortraitHealth.lua
index 5baee65..e3645ee 100755
--- a/PortraitHealth.lua
+++ b/PortraitHealth.lua
@@ -134,6 +134,14 @@ function HealthPercentage(event)

 	-- Class detection

+  -- All in one experiment
+  if PlayerClass == PlayerClass and TargetPercentHealth < PH_p[PlayerClass] then
+    PortraitHealth_Health:SetTextColor(1,0,0);
+    if not UnitIsDead("target") and limit == 0 and PH_sound == 1 then
+      PlaySoundFile(executeSound);
+      limit = 1;
+    end
+--[[
 	if PlayerClass == 1 and TargetPercentHealth < 20 then 			-- Warrior
 		PortraitHealth_Health:SetTextColor(1,0,0);
     if not UnitIsDead("target") and limit1 == 0 and PH_sound == 1 then
@@ -203,6 +211,7 @@ function HealthPercentage(event)
           PlaySoundFile(executeSound);
           limit1 = 1;
         end
+--]]

 	else
 		PortraitHealth_Health:SetTextColor(1,1,0);