Quantcast

Added sound for execute phase. Need to change to play one time only.

Scott King [07-02-15 - 05:35]
Added sound for execute phase. Need to change to play one time only.
Filename
PortraitHealth.lua
diff --git a/PortraitHealth.lua b/PortraitHealth.lua
index 262e53a..82041d4 100755
--- a/PortraitHealth.lua
+++ b/PortraitHealth.lua
@@ -80,7 +80,9 @@ function HealthPercentage()

 		elseif PlayerClass == 4 and TargetPercentHealth < 35 then 	-- Rogue
 				PortraitHealth_Health:SetTextColor(1,0,0);
-        PlaySoundFile("Sound\\interface\\AuctionWindowClose.ogg");
+        if not UnitIsDead("target") then
+          PlaySoundFile("Sound\\interface\\AuctionWindowClose.ogg");
+        end

 		elseif PlayerClass == 5 and TargetPercentHealth < 20 then 	-- Priest
 				PortraitHealth_Health:SetTextColor(1,0,0);