Quantcast

Legion prep. Errors still present on Beta.

Cilcraft [06-20-16 - 03:53]
Legion prep. Errors still present on Beta.
Filename
CHANGELOG.txt
PortraitHealth.lua
PortraitHealthConfig.lua
PortraitHealthConfig.xml
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index a3318db..9b1a46b 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,6 @@
+v4.0
+	- Demon Hunter additions
+
 v3.0.2
 	- simplified execute phase code

diff --git a/PortraitHealth.lua b/PortraitHealth.lua
index 2693091..de4d29e 100755
--- a/PortraitHealth.lua
+++ b/PortraitHealth.lua
@@ -4,7 +4,7 @@ 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 PH_v = '4.0'; -- version number
 local limit1 = 0; -- limiter for sounds
 local executeSound = "Sound\\interface\\AuctionWindowClose.ogg";
 local total = 0 -- timer start
@@ -33,7 +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 **
+PH_p[12] = 10   -- Demon Hunter 12


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

 	-- Health value to display. Whole numbers only.
-	TargetPercentHealth = (UnitHealth("target") / UnitHealthMax("target") * 100);
+	 TargetPercentHealth = (UnitHealth("target") / UnitHealthMax("target") * 100); --causes "division by zero error on beta."
+

   -- Reset notifier when target changes or the target's health increases beyond the execute range
   if event == "PLAYER_TARGET_CHANGED" then
diff --git a/PortraitHealthConfig.lua b/PortraitHealthConfig.lua
deleted file mode 100644
index 79de7a1..0000000
--- a/PortraitHealthConfig.lua
+++ /dev/null
@@ -1,17 +0,0 @@
-function PH_ConfigFrame_OnLoad(panel)
-       -- Set the name for the Category for the Panel
-       --
-       panel.name = "Portrait Health";
-
-       -- When the player clicks okay, run this function.
-       --
-       panel.okay = function (self) PH_ConfigFrame_Close(); end;
-
-       -- When the player clicks cancel, run this function.
-       --
-       panel.cancel = function (self)  PH_ConfigFrame_CancelOrLoad();  end;
-
-       -- Add the panel to the Interface Options
-       --
-       InterfaceOptions_AddCategory(panel);
-end
diff --git a/PortraitHealthConfig.xml b/PortraitHealthConfig.xml
deleted file mode 100644
index acae76a..0000000
--- a/PortraitHealthConfig.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/"
-                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                   xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-                   ..\..\FrameXML\UI.xsd">
-<Script File="PortraitHealthConfig.lua"/>
-  <Frame name="PH_ConfigFrame">
-    <Frames>
-
-<!-- Sound Toggle CheckButton -->
-    <CheckButton name="$parentSoundToggle" inherits="InterfaceOptionsCheckButtonTemplate">
-      <Anchors>
-        <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT" x="20" y="-24" />
-      </Anchors>
-      <Scripts>
-        <OnLoad>
-          _G[self:GetName().."Text"]:SetText("Play sound when execute phase is reached.");
-
-        </OnLoad>
-      </Scripts>
-    </CheckButton>
-
-<!-- Display Toggle CheckButton -->
-    <CheckButton name="$parentDisplayToggle" inherits="InterfaceOptionsCheckButtonTemplate">
-      <Anchors>
-        <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT" x="20" y="-48" />
-      </Anchors>
-      <Scripts>
-        <OnLoad>
-          _G[self:GetName().."Text"]:SetText("Display the target health.");
-
-        </OnLoad>
-      </Scripts>
-    </CheckButton>
-
-    </Frames>
-    <Scripts>
-      <OnLoad>
-        PH_ConfigFrame_OnLoad(self);
-      </OnLoad>
-      <OnEvent>
-      </OnEvent>
-    </Scripts>
-  </Frame>
-</Ui>