From: Aleksi Blinnikka Date: Fri, 23 Feb 2018 15:14:19 +0000 (+0200) Subject: Remove heal prediction from regular unit frames X-Git-Url: https://www.aleksib.fi/git/wowui.git/commitdiff_plain/d093a7f250aab703c69128ad4b54a31d6e0b1f83?ds=inline Remove heal prediction from regular unit frames --- diff --git a/OmaUF/Events.lua b/OmaUF/Events.lua index 862e7df..8121ae6 100644 --- a/OmaUF/Events.lua +++ b/OmaUF/Events.lua @@ -47,9 +47,6 @@ function M.RegisterUnitEvents(frame) frame:RegisterUnitEvent("UNIT_POWER_BAR_SHOW", frame.unit, displayed); frame:RegisterUnitEvent("UNIT_POWER_BAR_HIDE", frame.unit, displayed); end - if frame.healpred then - frame:RegisterUnitEvent("UNIT_HEAL_PREDICTION", frame.unit, displayed); - end if frame.shield then frame:RegisterUnitEvent("UNIT_ABSORB_AMOUNT_CHANGED", frame.unit, displayed); end @@ -146,18 +143,6 @@ local function updateName(frame, unit) frame.name:SetText(ssub(name, 1, frame.name.count)); end -local function updateHealPred(frame, unit) - local incoming = UnitGetIncomingHeals(unit) or 0; - if incoming > 0 then - local space = frame.width - frame.health:GetWidth() + 1; - incoming = (incoming / frame.health.max) * frame.width; - frame.healpred:SetWidth(min(space, incoming)); - frame.healpred:Show(); - else - frame.healpred:Hide(); - end -end - local function updateShield(frame, unit) local shield = UnitGetTotalAbsorbs(unit) or 0; if shield > 0 then @@ -352,9 +337,6 @@ local eventFuncs = { ["UNIT_AURA"] = function(frame) updateAuras(frame, frame.displayed); end, - ["UNIT_HEAL_PREDICTION"] = function(frame) - updateHealPred(frame, frame.displayed); - end, ["UNIT_ABSORB_AMOUNT_CHANGED"] = function(frame) updateShield(frame, frame.displayed); end, @@ -435,7 +417,6 @@ local eventFuncs = { end if frame.auras then updateAuras(frame, frame.displayed) end if frame.shield then updateShield(frame, frame.displayed) end - if frame.healpred then updateHealPred(frame, frame.displayed) end if frame.healabsorb then updateHealAbsorb(frame, frame.displayed) end if frame.name then updateName(frame, frame.displayed) end if frame.level then updateLevelText(frame, frame.unit) end diff --git a/OmaUF/PetFrame.lua b/OmaUF/PetFrame.lua index 4c2efef..a4d8fa5 100644 --- a/OmaUF/PetFrame.lua +++ b/OmaUF/PetFrame.lua @@ -14,7 +14,6 @@ local bgColor = Settings.BgColor; local healthColor = Settings.HealthColor; local shieldColor = Settings.ShieldColor; local shieldhlColor = Settings.ShieldhlColor; -local healpredColor = Settings.HealpredColor; local healabsorbColor = Settings.HealabsorbColor; local width, height = Settings.Pet.Width, Settings.Pet.Height; local anchorX, anchorY = Settings.Pet.AnchorX, Settings.Pet.AnchorY; diff --git a/OmaUF/PlayerFrame.lua b/OmaUF/PlayerFrame.lua index 76d5d6e..f6f8221 100644 --- a/OmaUF/PlayerFrame.lua +++ b/OmaUF/PlayerFrame.lua @@ -16,7 +16,6 @@ local bgColor = Settings.BgColor; local healthColor = Settings.HealthColor; local shieldColor = Settings.ShieldColor; local shieldhlColor = Settings.ShieldhlColor; -local healpredColor = Settings.HealpredColor; local healabsorbColor = Settings.HealabsorbColor; local width, height = Settings.Player.Width, Settings.Player.Height; local anchorX, anchorY = Settings.Player.AnchorX, Settings.Player.AnchorY; @@ -130,11 +129,6 @@ function OmaUnitFrames.InitializePlayer(parent) frame.shieldhl:SetPoint("BOTTOMRIGHT", frame.healthback, "BOTTOMRIGHT", 1, 0); frame.shieldhl:SetColorTexture(unpack(shieldhlColor)); frame.shieldhl:Hide(); - frame.healpred = frame:CreateTexture(nil, "ARTWORK"); - frame.healpred:SetPoint("TOPLEFT", frame.health, "TOPRIGHT"); - frame.healpred:SetPoint("BOTTOMLEFT", frame.health, "BOTTOMRIGHT"); - frame.healpred:SetColorTexture(unpack(healpredColor)); - frame.healpred:Hide(); frame.healabsorb = frame:CreateTexture(nil, "ARTWORK"); frame.healabsorb:SetPoint("TOPRIGHT", frame.health, "TOPRIGHT"); frame.healabsorb:SetPoint("BOTTOMRIGHT", frame.health, "BOTTOMRIGHT"); diff --git a/OmaUF/TargetFrame.lua b/OmaUF/TargetFrame.lua index d85755c..9192038 100644 --- a/OmaUF/TargetFrame.lua +++ b/OmaUF/TargetFrame.lua @@ -17,7 +17,6 @@ local bgColor = Settings.BgColor; local healthColor = Settings.HealthColor; local shieldColor = Settings.ShieldColor; local shieldhlColor = Settings.ShieldhlColor; -local healpredColor = Settings.HealpredColor; local healabsorbColor = Settings.HealabsorbColor; local width, height = Settings.Target.Width, Settings.Target.Height; local anchorX, anchorY = Settings.Target.AnchorX, Settings.Target.AnchorY; @@ -116,11 +115,6 @@ function OmaUnitFrames.InitializeTarget(parent) frame.shieldhl:SetPoint("BOTTOMRIGHT", frame.healthback, "BOTTOMRIGHT", 1, 0); frame.shieldhl:SetColorTexture(unpack(shieldhlColor)); frame.shieldhl:Hide(); - frame.healpred = frame:CreateTexture(nil, "ARTWORK"); - frame.healpred:SetPoint("TOPLEFT", frame.health, "TOPRIGHT"); - frame.healpred:SetPoint("BOTTOMLEFT", frame.health, "BOTTOMRIGHT"); - frame.healpred:SetColorTexture(unpack(healpredColor)); - frame.healpred:Hide(); frame.healabsorb = frame:CreateTexture(nil, "ARTWORK"); frame.healabsorb:SetPoint("TOPRIGHT", frame.health, "TOPRIGHT"); frame.healabsorb:SetPoint("BOTTOMRIGHT", frame.health, "BOTTOMRIGHT");