Skip to content

Commit

Permalink
Final touches before publish
Browse files Browse the repository at this point in the history
- Fix mp5 ticker related nil error
- Fix combo point options missing
- Adjust spacing
- Disable inc heals for non party/raid units
- Change default layout of raidframes to match LUF2
  • Loading branch information
Aviana committed Jun 1, 2019
1 parent cab9e22 commit 4dc1ddf
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 41 deletions.
2 changes: 1 addition & 1 deletion LunaUnitFrames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LunaUF = select(2, ...)

local L = LunaUF.L
local ACR = LibStub("AceConfigRegistry-3.0", true)
LunaUF.version = 3000
LunaUF.version = 3001
LunaUF.unitList = {"player", "pet", "pettarget", "target", "targettarget", "targettargettarget", "party", "partytarget", "partypet", "raid", "raidpet", "maintank", "maintanktarget", "mainassist", "mainassisttarget"}
LunaUF.fakeUnits = {["targettarget"] = true, ["targettargettarget"] = true, ["pettarget"] = true, ["partytarget"] = true, ["maintanktarget"] = true, ["mainassisttarget"] = true}
LunaUF.enabledUnits = {}
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ https://www.wowinterface.com/downloads/info24924-RealMobHealth.html
Clickcasting:
https://www.warcrafttavern.com/addons/clique/

List of stuff that is still missing:
- Vertical bars

Feel free to fork this but give credit (at least author & link to this github)

DO NOT REUPLOAD! LINK HERE INSTEAD.
Expand Down
2 changes: 1 addition & 1 deletion libs/LibClassicHealComm-1.0/LibClassicHealComm-1.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ local function parseHealEnd(casterGUID, pending, checkField, spellID, interrupte

-- Hots use spell IDs while everything else uses spell names. Avoids naming conflicts for multi-purpose spells such as Lifebloom or Regrowth
if( not pending ) then
pending = checkField == "id" and pendingHots[casterGUID][spellID] or pendingHeals[casterGUID][spellID]
pending = checkField == "id" and pendingHots[casterGUID] and pendingHots[casterGUID][spellID] or checkField ~= "id" and pendingHeals[casterGUID] and pendingHeals[casterGUID][spellID]
end
if( not pending or not pending.bitType ) then return end

Expand Down
2 changes: 1 addition & 1 deletion locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ local L = {
["druid:missingpp"] = "Returns missing mana even in druid form",
["druid:perpp"] = "Returns mana percentage even in druid form",
["incheal"] = "Value of incoming heal",
["numheals"] = "Number of incoming heals",
--["numheals"] = "Number of incoming heals",
["combatcolor"] = "Red when in combat",
["pvpcolor"] = "White for unflagged units, green for flagged friendlies and red for flagged enemies",
["reactcolor"] = "Red for enemies, yellow for neutrals, and green for friendlies",
Expand Down
21 changes: 3 additions & 18 deletions modules/Options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ local HealthnPowerTags = {
["druid:missingpp"] = true,
["druid:perpp"] = true,
["incheal"] = true,
["numheals"] = true,
-- ["numheals"] = true,
}
local ColorTags = {
["combatcolor"] = true,
Expand Down Expand Up @@ -532,21 +532,6 @@ function LunaUF:CreateConfig()
order = 3,
values = {["HIDE"] = L["Hide"], ["LEFT"] = L["Left"], ["RIGHT"] = L["Right"]},
},
background = {
name = L["Background"],
desc = string.format(L["Enable or disable the %s."], L["Background"]),
type = "toggle",
order = 4,
},
backgroundAlpha = {
name = L["Background alpha"],
desc = L["Set the background alpha."],
type = "range",
order = 5,
min = 0.01,
max = 1,
step = 0.01,
},
height = {
name = L["Height"],
desc = L["Set the height."],
Expand Down Expand Up @@ -2682,7 +2667,7 @@ function LunaUF:CreateConfig()
type = "group",
order = -1,
inline = true,
hidden = function(info) return info[1] ~= "target" or not (select(2,UnitClass("player")) == "DRUID" or select(2,UnitClass("player") ~= "ROGUE")) end,
hidden = function(info) return info[1] ~= "target" or (select(2,UnitClass("player")) ~= "ROGUE" and select(2,UnitClass("player")) ~= "DRUID") end,
args = {
enabled = {
name = L["Enable"],
Expand Down Expand Up @@ -2751,7 +2736,7 @@ function LunaUF:CreateConfig()
order = 1,
},
descriptiontext = {
name = "Luna Unit Frames by Aviana\nDonate: paypal.me/LunaUnitFrames",
name = "Luna Unit Frames by Aviana\nDonate: paypal.me/LunaUnitFrames\n".."Version: "..LunaUF.version,
type = "description",
width = "full",
order = 1.1,
Expand Down
1 change: 0 additions & 1 deletion modules/cast.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ function Cast:OnEnable(frame)
frame.castBar.bar = LunaUF.Units:CreateBar(frame)
frame.castBar.background = frame.castBar.bar.background
frame.castBar.bar.parent = frame
frame.castBar.bar.background = frame.castBar.background

frame.castBar.icon = frame.castBar.bar:CreateTexture(nil, "ARTWORK")
end
Expand Down
20 changes: 10 additions & 10 deletions modules/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1112,10 +1112,10 @@ function LunaUF:LoadDefaults()
},
raid = {
enabled = true,
healthBar = { enabled = true, background = true, backgroundAlpha = 0.2, colorType = "class", reactionType="npc", height = 1.20, order = 10},
healthBar = { enabled = true, background = true, backgroundAlpha = 0.2, colorType = "class", reactionType="npc", height = 10, order = 10, vertical = true},
portrait = {enabled = false, type = "3D", alignment = "LEFT", width = 0.22, height = 0.50, order = 15, fullBefore = 0, fullAfter = 50},
castBar = { enabled = false, background = true, backgroundAlpha = 0.2, height = 0.60, icon = "HIDE", autoHide = true, order = 60},
powerBar = { enabled = true, background = true, backgroundAlpha = 0.2, height = 1.0, order = 20, colorType = "type" },
powerBar = { enabled = true, background = true, backgroundAlpha = 0.2, height = 1, order = 20, colorType = "type" },
emptyBar = { enabled = false, height = 0.4, order = 50, reactionType="npc", class = true, alpha = 0.2},
range = { enabled = false },
highlight = { enabled = true, debuff = false },
Expand Down Expand Up @@ -1146,13 +1146,13 @@ function LunaUF:LoadDefaults()
},
tags = {
["healthBar"] = {
size = 10,
size = 8,
["left"] = {
tagline = "",
size = 100,
},
["center"] = {
tagline = "[smarthealth]",
tagline = "[name][br][healerhealth]",
size = 100,
},
["right"] = {
Expand All @@ -1167,7 +1167,7 @@ function LunaUF:LoadDefaults()
size = 100,
},
["center"] = {
tagline = "[pp]",
tagline = "",
size = 100,
},
["right"] = {
Expand Down Expand Up @@ -1255,10 +1255,10 @@ function LunaUF:LoadDefaults()
},
raidpet = {
enabled = false,
healthBar = { enabled = true, background = true, backgroundAlpha = 0.2, colorType = "class", reactionType="npc", height = 1.20, order = 10},
healthBar = { enabled = true, background = true, backgroundAlpha = 0.2, colorType = "class", reactionType="npc", height = 10, order = 10, vertical = true},
portrait = {enabled = false, type = "3D", alignment = "LEFT", width = 0.22, height = 0.50, order = 15, fullBefore = 0, fullAfter = 50},
castBar = { enabled = false, background = true, backgroundAlpha = 0.2, height = 0.60, icon = "HIDE", autoHide = true, order = 60},
powerBar = { enabled = true, background = true, backgroundAlpha = 0.2, height = 1.0, order = 20, colorType = "type" },
powerBar = { enabled = true, background = true, backgroundAlpha = 0.2, height = 1, order = 20, colorType = "type" },
emptyBar = { enabled = false, height = 0.4, order = 50, reactionType="npc", class = true, alpha = 0.2},
range = { enabled = false },
highlight = { enabled = true, debuff = false },
Expand Down Expand Up @@ -1289,13 +1289,13 @@ function LunaUF:LoadDefaults()
},
tags = {
["healthBar"] = {
size = 10,
size = 8,
["left"] = {
tagline = "",
size = 100,
},
["center"] = {
tagline = "[smarthealth]",
tagline = "[name][br][healerhealth]",
size = 100,
},
["right"] = {
Expand All @@ -1310,7 +1310,7 @@ function LunaUF:LoadDefaults()
size = 100,
},
["center"] = {
tagline = "[pp]",
tagline = "",
size = 100,
},
["right"] = {
Expand Down
2 changes: 1 addition & 1 deletion modules/incheal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ end
function IncHeal:UpdateIncoming(...)
for frame in pairs(frames) do
for i=1, select("#", ...) do
if( select(i, ...) == frame.unitGUID ) then
if( select(i, ...) == frame.unitGUID ) and (UnitPlayerOrPetInParty(frame.unit) or UnitPlayerOrPetInRaid(frame.unit) or UnitIsUnit("player",frame.unit) or UnitIsUnit("pet",frame.unit)) then
self:Update(frame)
break
end
Expand Down
4 changes: 2 additions & 2 deletions modules/layout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ function Layout:PositionWidgets(frame, config)

-- Position and size everything
local portraitHeight, xOffset = 0, -clip
local availableHeight = frame:GetHeight() - clipDoubled - (1.25 * totalBars)
local availableHeight = frame:GetHeight() - clipDoubled - (1.02 * totalBars)
for id, key in pairs(barOrder) do
local bar = frame[key]
-- Position the actual bar based on it's type
Expand All @@ -444,7 +444,7 @@ function Layout:PositionWidgets(frame, config)
portraitAnchor = bar
end

xOffset = xOffset - bar:GetHeight() + (-1.25)
xOffset = xOffset - bar:GetHeight() + (-1.02)
end

-- Now position the portrait and set the height
Expand Down
4 changes: 2 additions & 2 deletions modules/power.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function Power:UpdateColor(frame)
end
end

if frame.unit == "player" then
if frame.unitRealType == "player" then
if not LunaUF.db.profile.units.player.powerBar.ticker or UnitPowerType("player") ~= Enum.PowerType.Energy then
frame.powerBar.ticker:Hide()
elseif LunaUF.db.profile.units.player.powerBar.ticker and UnitPowerType("player") == Enum.PowerType.Energy then
Expand Down Expand Up @@ -174,7 +174,7 @@ function Power:Update(frame, event, unit, powerType)
frame.powerBar.ignorePowerChange = nil
elseif frame.powerBar.currentPower < UnitPower(frame.unit) and UnitPowerType("player") == Enum.PowerType.Energy then
frame.powerBar.ticker.startTime = GetTime()
elseif frame.powerBar.currentPower > UnitPower(frame.unit) and UnitPowerType("player") == Enum.PowerType.Mana then
elseif frame.powerBar.currentPower > UnitPower(frame.unit) and not (UnitPowerMax(frame.unit) == UnitPower(frame.unit)) and UnitPowerType("player") == Enum.PowerType.Mana then
frame.powerBar.ticker.startTime = GetTime()
frame.powerBar.ticker:Show()
end
Expand Down
4 changes: 3 additions & 1 deletion modules/units.lua
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ local function SetBlockColor(self, bar, key, r, g, b)
if( not bgColor ) then
bar.background:SetVertexColor(r, g, b)--, LunaUF.db.profile.bars.backgroundAlpha)
else
bar.background:SetVertexColor(bgColor.r, bgColor.g, bgColor.b, LunaUF.db.profile.bars.backgroundAlpha)
bar.background:SetVertexColor(r, g, b, LunaUF.db.profile.bars.backgroundAlpha)
end
else
bar.background:SetVertexColor(r, g, b, LunaUF.db.profile.bars.alpha)
Expand Down Expand Up @@ -1026,6 +1026,8 @@ function Units:LoadGroupHeader(type)
if( type == "party" or type == "raid" ) then
self:CheckGroupVisibility()
end

LunaUF.Layout:AnchorFrame(headerFrames[type], LunaUF.db.profile.units[type])
return
end

Expand Down

0 comments on commit 4dc1ddf

Please sign in to comment.