Quantcast

Added notes for version 4 changes.

Scott King [09-22-15 - 19:50]
Added notes for version 4 changes.
Filename
PortraitHealth.lua
PortraitHealth.toc
diff --git a/PortraitHealth.lua b/PortraitHealth.lua
index a5c3340..2693091 100755
--- a/PortraitHealth.lua
+++ b/PortraitHealth.lua
@@ -1,9 +1,9 @@
 -- Global information

-local classDisplayName, class, classID = UnitClass("player");
-local PlayerClass = classID;
-local PlayerClassName = classDisplayName;
-local PlayerClassNameIndex = class;
+local classDisplayName, class, classID = UnitClass("player"); -- **
+local PlayerClass = classID;                                  -- this code and variables
+local PlayerClassName = classDisplayName;                     -- could be redundant. fix later.
+local PlayerClassNameIndex = class;                           -- **
 local PH_v = '3.0.2'; -- version number
 local limit1 = 0; -- limiter for sounds
 local executeSound = "Sound\\interface\\AuctionWindowClose.ogg";
@@ -33,6 +33,7 @@ PH_p[8] = 10 		-- Mage				  8
 PH_p[9] = 25 		-- Warlock			9
 PH_p[10] = 10 	-- Monk				  10
 PH_p[11] = 25 	-- Druid			  11
+-- PH_p[12] = 10  -- Demon Hunter ** check UI updates for class IDs if changing **


 -- Welcome message (delay message and check to see if the addon is loaded)
@@ -132,9 +133,7 @@ function HealthPercentage(event)
   end


-	-- Class detection
-
-  -- All in one experiment
+	-- Class detection : Checks for Paladin, as their execute phase is "less than or equal to 20%" unlike other classes.
   if PlayerClass ~= 2 and TargetPercentHealth < PH_p[PlayerClass] then
     PortraitHealth_Health:SetTextColor(1,0,0);
     if not UnitIsDead("target") and limit1 == 0 and PH_sound == 1 then
diff --git a/PortraitHealth.toc b/PortraitHealth.toc
index c19094d..79ee7ed 100755
--- a/PortraitHealth.toc
+++ b/PortraitHealth.toc
@@ -2,7 +2,7 @@
 ## Title: Portrait Health
 ## Notes: See your target's health percentage in bold text over their portrait.
 ## Author: Cilcraft
-## Version: 3.0.2
+## Version: 4.0
 ##SavedVariablesPerCharacter: PH_sound, PH_on
 PortraitHealth.lua
 PortraitHealth.xml