cd9dfa5 - Move frame.dead to updateText as it sometimes was missed
[wowui.git] / OmaUF / BossFrames.lua
index d2a7ef7..3e74dec 100644 (file)
@@ -17,8 +17,6 @@ local bgColor = Settings.BgColor;
 local healthColor = Settings.HealthColor;
 local shieldColor = Settings.ShieldColor;
 local shieldhlColor = Settings.ShieldhlColor;
 local healthColor = Settings.HealthColor;
 local shieldColor = Settings.ShieldColor;
 local shieldhlColor = Settings.ShieldhlColor;
-local healpredColor = Settings.HealpredColor;
-local healabsorbColor = Settings.HealabsorbColor;
 local width, height = Settings.Boss.Width, Settings.Boss.Height;
 local anchorX, anchorY = Settings.Boss.AnchorX, Settings.Boss.AnchorY;
 -- placeholders with visible values when error happens
 local width, height = Settings.Boss.Width, Settings.Boss.Height;
 local anchorX, anchorY = Settings.Boss.AnchorX, Settings.Boss.AnchorY;
 -- placeholders with visible values when error happens
@@ -51,11 +49,6 @@ local function hideTooltip(secure)
     GameTooltip:FadeOut();
 end
 
     GameTooltip:FadeOut();
 end
 
-function OmaUnitFrames.UpdateBossTooltips()
-    GameTooltip = _G["GameTooltip"];
-    GameTooltip_SetDefaultAnchor = _G["GameTooltip_SetDefaultAnchor"];
-end
-
 local function bossEvent(self)
     -- INSTANCE_ENCOUNTER_ENGAGE_UNIT only
     for unit, frame in pairs(self.frames) do
 local function bossEvent(self)
     -- INSTANCE_ENCOUNTER_ENGAGE_UNIT only
     for unit, frame in pairs(self.frames) do
@@ -124,11 +117,6 @@ local function createFrame(framename, securename, parent, unit, anchorX, anchorY
     frame.shieldhl:SetPoint("BOTTOMRIGHT", frame.healthback, "BOTTOMRIGHT", 1, 0);
     frame.shieldhl:SetColorTexture(unpack(shieldhlColor));
     frame.shieldhl:Hide();
     frame.shieldhl:SetPoint("BOTTOMRIGHT", frame.healthback, "BOTTOMRIGHT", 1, 0);
     frame.shieldhl:SetColorTexture(unpack(shieldhlColor));
     frame.shieldhl:Hide();
-    frame.healabsorb = frame:CreateTexture(nil, "ARTWORK");
-    frame.healabsorb:SetPoint("TOPRIGHT", frame.health, "TOPRIGHT");
-    frame.healabsorb:SetPoint("BOTTOMRIGHT", frame.health, "BOTTOMRIGHT");
-    frame.healabsorb:SetColorTexture(unpack(healabsorbColor));
-    frame.healabsorb:Hide();
     frame.name = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight");
     frame.name:SetPoint("LEFT", frame.healthback, "LEFT", 2, 1);
     frame.name.count = 10;
     frame.name = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight");
     frame.name:SetPoint("LEFT", frame.healthback, "LEFT", 2, 1);
     frame.name.count = 10;
@@ -147,12 +135,13 @@ local function createFrame(framename, securename, parent, unit, anchorX, anchorY
     frame:SetScript("OnEvent", unitEvent);
     secure:SetScript("OnEnter", showTooltip);
     secure:SetScript("OnLeave", hideTooltip);
     frame:SetScript("OnEvent", unitEvent);
     secure:SetScript("OnEnter", showTooltip);
     secure:SetScript("OnLeave", hideTooltip);
+    -- set PowerBarAlt
+    local powerbar = _G[string.format("Boss%iTargetFramePowerBarAlt", string.sub(unit, 5, 5))];
+    powerbar:SetParent(secure);
+    powerbar:ClearAllPoints();
+    powerbar:SetPoint("RIGHT", secure, "LEFT");
     -- set attributes
     -- TODO other set of click cast on boss frames possibly
     -- set attributes
     -- TODO other set of click cast on boss frames possibly
-    --secure:RegisterForClicks("AnyDown");
-    --for attr, val in pairs(attributes) do
-    --    secure:SetAttribute(attr, val);
-    --end
     -- rest give target and menu
     secure:SetAttribute("*type1", "target");
     secure:SetAttribute("*type2", "togglemenu");
     -- rest give target and menu
     secure:SetAttribute("*type1", "target");
     secure:SetAttribute("*type2", "togglemenu");