diff --git a/api/config.lua b/api/config.lua index 1353a24a..c4325347 100644 --- a/api/config.lua +++ b/api/config.lua @@ -82,6 +82,17 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", nil, "layout", "default") pfUI:UpdateConfig("unitframes", nil, "globalclick", "0") + pfUI:UpdateConfig("unitframes", nil, "show_hots", "0") + pfUI:UpdateConfig("unitframes", nil, "all_hots", "0") + pfUI:UpdateConfig("unitframes", nil, "show_procs", "0") + pfUI:UpdateConfig("unitframes", nil, "all_procs", "0") + pfUI:UpdateConfig("unitframes", nil, "debuffs_class", "0") + + pfUI:UpdateConfig("unitframes", nil, "clickcast", "") -- TODO raid.clickcast -> nil.clickcast + pfUI:UpdateConfig("unitframes", nil, "clickcast_shift", "") + pfUI:UpdateConfig("unitframes", nil, "clickcast_alt", "") + pfUI:UpdateConfig("unitframes", nil, "clickcast_ctrl", "") + pfUI:UpdateConfig("unitframes", "player", "portrait", "bar") pfUI:UpdateConfig("unitframes", "player", "width", "200") pfUI:UpdateConfig("unitframes", "player", "height", "50") @@ -91,6 +102,9 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", "player", "buffsize", "20") -- TODO migrate uf.buffsize pfUI:UpdateConfig("unitframes", "player", "debuffs", "top") pfUI:UpdateConfig("unitframes", "player", "debuffsize", "20") -- TODO migrate uf.debuffsize + pfUI:UpdateConfig("unitframes", "player", "invert_healthbar", "0") + pfUI:UpdateConfig("unitframes", "player", "buff_indicator", "0") + pfUI:UpdateConfig("unitframes", "player", "debuff_indicator", "0") pfUI:UpdateConfig("unitframes", "player", "txtleft", "unit") pfUI:UpdateConfig("unitframes", "player", "txtcenter", "none") pfUI:UpdateConfig("unitframes", "player", "txtright", "healthdyn") @@ -108,6 +122,9 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", "target", "buffsize", "20") -- TODO migrate uf.buffsize pfUI:UpdateConfig("unitframes", "target", "debuffs", "top") pfUI:UpdateConfig("unitframes", "target", "debuffsize", "20") -- TODO migrate uf.debuffsize + pfUI:UpdateConfig("unitframes", "target", "invert_healthbar", "0") + pfUI:UpdateConfig("unitframes", "target", "buff_indicator", "0") + pfUI:UpdateConfig("unitframes", "target", "debuff_indicator", "0") pfUI:UpdateConfig("unitframes", "target", "txtleft", "unit") pfUI:UpdateConfig("unitframes", "target", "txtcenter", "none") pfUI:UpdateConfig("unitframes", "target", "txtright", "healthdyn") @@ -119,29 +136,49 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", "group", "pheight", "4") pfUI:UpdateConfig("unitframes", "group", "pspace", "-3") pfUI:UpdateConfig("unitframes", "group", "buffs", "bottom") - pfUI:UpdateConfig("unitframes", "group", "buffsize", "16") + pfUI:UpdateConfig("unitframes", "group", "buffsize", "8") pfUI:UpdateConfig("unitframes", "group", "debuffs", "bottom") - pfUI:UpdateConfig("unitframes", "group", "debuffsize", "16") + pfUI:UpdateConfig("unitframes", "group", "debuffsize", "8") + pfUI:UpdateConfig("unitframes", "group", "invert_healthbar", "0") + pfUI:UpdateConfig("unitframes", "group", "buff_indicator", "1") + pfUI:UpdateConfig("unitframes", "group", "debuff_indicator", "1") pfUI:UpdateConfig("unitframes", "group", "txtleft", "unit") pfUI:UpdateConfig("unitframes", "group", "txtcenter", "none") pfUI:UpdateConfig("unitframes", "group", "txtright", "healthmiss") pfUI:UpdateConfig("unitframes", "group", "hide_in_raid", "0") pfUI:UpdateConfig("unitframes", "group", "clickcast", "0") - pfUI:UpdateConfig("unitframes", "group", "raid_buffs", "0") - pfUI:UpdateConfig("unitframes", "group", "raid_debuffs", "0") pfUI:UpdateConfig("unitframes", "grouptarget", "portrait", "off") - pfUI:UpdateConfig("unitframes", "grouptarget", "width", "100") - pfUI:UpdateConfig("unitframes", "grouptarget", "height", "18") - pfUI:UpdateConfig("unitframes", "grouptarget", "pheight", "4") + pfUI:UpdateConfig("unitframes", "grouptarget", "width", "120") + pfUI:UpdateConfig("unitframes", "grouptarget", "height", "16") + pfUI:UpdateConfig("unitframes", "grouptarget", "pheight", "0") pfUI:UpdateConfig("unitframes", "grouptarget", "pspace", "-3") pfUI:UpdateConfig("unitframes", "grouptarget", "buffs", "off") pfUI:UpdateConfig("unitframes", "grouptarget", "buffsize", "16") pfUI:UpdateConfig("unitframes", "grouptarget", "debuffs", "off") pfUI:UpdateConfig("unitframes", "grouptarget", "debuffsize", "16") + pfUI:UpdateConfig("unitframes", "grouptarget", "invert_healthbar", "0") + pfUI:UpdateConfig("unitframes", "grouptarget", "buff_indicator", "0") + pfUI:UpdateConfig("unitframes", "grouptarget", "debuff_indicator", "0") pfUI:UpdateConfig("unitframes", "grouptarget", "txtleft", "unit") pfUI:UpdateConfig("unitframes", "grouptarget", "txtcenter", "none") - pfUI:UpdateConfig("unitframes", "grouptarget", "txtright", "none") + pfUI:UpdateConfig("unitframes", "grouptarget", "txtright", "healthperc") + + pfUI:UpdateConfig("unitframes", "grouppet", "portrait", "off") + pfUI:UpdateConfig("unitframes", "grouppet", "width", "100") + pfUI:UpdateConfig("unitframes", "grouppet", "height", "14") + pfUI:UpdateConfig("unitframes", "grouppet", "pheight", "0") + pfUI:UpdateConfig("unitframes", "grouppet", "pspace", "-3") + pfUI:UpdateConfig("unitframes", "grouppet", "buffs", "off") + pfUI:UpdateConfig("unitframes", "grouppet", "buffsize", "16") + pfUI:UpdateConfig("unitframes", "grouppet", "debuffs", "off") + pfUI:UpdateConfig("unitframes", "grouppet", "debuffsize", "16") + pfUI:UpdateConfig("unitframes", "grouppet", "invert_healthbar", "0") + pfUI:UpdateConfig("unitframes", "grouppet", "buff_indicator", "0") + pfUI:UpdateConfig("unitframes", "grouppet", "debuff_indicator", "0") + pfUI:UpdateConfig("unitframes", "grouppet", "txtleft", "unit") + pfUI:UpdateConfig("unitframes", "grouppet", "txtcenter", "none") + pfUI:UpdateConfig("unitframes", "grouppet", "txtright", "healthperc") pfUI:UpdateConfig("unitframes", "raid", "portrait", "off") pfUI:UpdateConfig("unitframes", "raid", "width", "50") @@ -152,23 +189,13 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", "raid", "buffsize", "16") pfUI:UpdateConfig("unitframes", "raid", "debuffs", "off") pfUI:UpdateConfig("unitframes", "raid", "debuffsize", "16") + pfUI:UpdateConfig("unitframes", "raid", "invert_healthbar", "0") + pfUI:UpdateConfig("unitframes", "raid", "buff_indicator", "1") + pfUI:UpdateConfig("unitframes", "raid", "debuff_indicator", "1") pfUI:UpdateConfig("unitframes", "raid", "txtleft", "name") pfUI:UpdateConfig("unitframes", "raid", "txtcenter", "none") pfUI:UpdateConfig("unitframes", "raid", "txtright", "healthmiss") - pfUI:UpdateConfig("unitframes", "raid", "invert_healthbar", "0") - pfUI:UpdateConfig("unitframes", "raid", "show_missing", "0") - pfUI:UpdateConfig("unitframes", "raid", "clickcast", "") - pfUI:UpdateConfig("unitframes", "raid", "clickcast_shift", "") - pfUI:UpdateConfig("unitframes", "raid", "clickcast_alt", "") - pfUI:UpdateConfig("unitframes", "raid", "clickcast_ctrl", "") - pfUI:UpdateConfig("unitframes", "raid", "buffs_buffs", "0") - pfUI:UpdateConfig("unitframes", "raid", "buffs_hots", "0") - pfUI:UpdateConfig("unitframes", "raid", "buffs_procs", "0") - pfUI:UpdateConfig("unitframes", "raid", "buffs_classonly", "0") - pfUI:UpdateConfig("unitframes", "raid", "debuffs_enable", "0") - pfUI:UpdateConfig("unitframes", "raid", "debuffs_class", "0") - pfUI:UpdateConfig("unitframes", "ttarget", "portrait", "bar") pfUI:UpdateConfig("unitframes", "ttarget", "width", "100") pfUI:UpdateConfig("unitframes", "ttarget", "height", "20") @@ -178,6 +205,9 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", "ttarget", "buffsize", "16") pfUI:UpdateConfig("unitframes", "ttarget", "debuffs", "off") pfUI:UpdateConfig("unitframes", "ttarget", "debuffsize", "16") + pfUI:UpdateConfig("unitframes", "ttarget", "invert_healthbar", "0") + pfUI:UpdateConfig("unitframes", "ttarget", "buff_indicator", "0") + pfUI:UpdateConfig("unitframes", "ttarget", "debuff_indicator", "0") pfUI:UpdateConfig("unitframes", "ttarget", "txtleft", "none") pfUI:UpdateConfig("unitframes", "ttarget", "txtcenter", "name") pfUI:UpdateConfig("unitframes", "ttarget", "txtright", "none") @@ -191,6 +221,9 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", "pet", "buffsize", "12") pfUI:UpdateConfig("unitframes", "pet", "debuffs", "off") pfUI:UpdateConfig("unitframes", "pet", "debuffsize", "12") + pfUI:UpdateConfig("unitframes", "pet", "invert_healthbar", "0") + pfUI:UpdateConfig("unitframes", "pet", "buff_indicator", "0") + pfUI:UpdateConfig("unitframes", "pet", "debuff_indicator", "0") pfUI:UpdateConfig("unitframes", "pet", "txtleft", "none") pfUI:UpdateConfig("unitframes", "pet", "txtcenter", "name") pfUI:UpdateConfig("unitframes", "pet", "txtright", "none") diff --git a/api/unitframes.lua b/api/unitframes.lua index 13a6903b..d8750b31 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -75,8 +75,8 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick) f.leftText:SetFontObject(GameFontWhite) f.leftText:SetParent(f.hp.bar) f.leftText:ClearAllPoints() - f.leftText:SetPoint("TOPLEFT",f.hp.bar, "TOPLEFT", 2*default_border, -2*default_border) - f.leftText:SetPoint("BOTTOMRIGHT",f.hp.bar, "BOTTOMRIGHT", -2*default_border, 2*default_border) + f.leftText:SetPoint("TOPLEFT",f.hp.bar, "TOPLEFT", 2*default_border, 1) + f.leftText:SetPoint("BOTTOMRIGHT",f.hp.bar, "BOTTOMRIGHT", -2*default_border, 0) f.rightText = f:CreateFontString("Status", "OVERLAY", "GameFontNormal") f.rightText:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE") @@ -84,8 +84,8 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick) f.rightText:SetFontObject(GameFontWhite) f.rightText:SetParent(f.hp.bar) f.rightText:ClearAllPoints() - f.rightText:SetPoint("TOPLEFT",f.hp.bar, "TOPLEFT", 2*default_border, -2*default_border) - f.rightText:SetPoint("BOTTOMRIGHT",f.hp.bar, "BOTTOMRIGHT", -2*default_border, 2*default_border) + f.rightText:SetPoint("TOPLEFT",f.hp.bar, "TOPLEFT", 2*default_border, 1) + f.rightText:SetPoint("BOTTOMRIGHT",f.hp.bar, "BOTTOMRIGHT", -2*default_border, 0) f.centerText = f:CreateFontString("Status", "OVERLAY", "GameFontNormal") f.centerText:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE") @@ -93,8 +93,8 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick) f.centerText:SetFontObject(GameFontWhite) f.centerText:SetParent(f.hp.bar) f.centerText:ClearAllPoints() - f.centerText:SetPoint("TOPLEFT",f.hp.bar, "TOPLEFT", 2*default_border, -2*default_border) - f.centerText:SetPoint("BOTTOMRIGHT",f.hp.bar, "BOTTOMRIGHT", -2*default_border, 2*default_border) + f.centerText:SetPoint("TOPLEFT",f.hp.bar, "TOPLEFT", 2*default_border, 1) + f.centerText:SetPoint("BOTTOMRIGHT",f.hp.bar, "BOTTOMRIGHT", -2*default_border, 0) f:RegisterForClicks('LeftButtonUp', 'RightButtonUp', 'MiddleButtonUp', 'Button4Up', 'Button5Up') @@ -192,7 +192,7 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick) local hpReal = this.cache.hp local hpDiff = abs(hpReal - hpDisplay) - if pfUI_config.unitframes.raid.invert_healthbar == "1" then + if this.config.invert_healthbar == "1" then hpDisplay = this.hp.bar:GetValue() hpReal = this.cache.hpmax - this.cache.hp hpDiff = abs(hpReal - hpDisplay) @@ -302,11 +302,11 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick) end f.buffs[i]:SetPoint(af, f, as, - (i-1-8*row)*((2*default_border) + C.unitframes.buff_size + 1), - invert * (row)*((2*default_border) + C.unitframes.buff_size + 1) + invert*(2*default_border + 1)) + (i-1-8*row)*((2*default_border) + f.config.buffsize + 1), + invert * (row)*((2*default_border) + f.config.buffsize + 1) + invert*(2*default_border + 1)) - f.buffs[i]:SetWidth(C.unitframes.buff_size) - f.buffs[i]:SetHeight(C.unitframes.buff_size) + f.buffs[i]:SetWidth(f.config.buffsize) + f.buffs[i]:SetHeight(f.config.buffsize) f.buffs[i]:SetScript("OnEnter", function() GameTooltip:SetOwner(this, "ANCHOR_BOTTOMRIGHT") @@ -375,8 +375,8 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick) f.debuffs[i]:RegisterForClicks("RightButtonUp") f.debuffs[i]:ClearAllPoints() - f.debuffs[i]:SetWidth(C.unitframes.debuff_size) - f.debuffs[i]:SetHeight(C.unitframes.debuff_size) + f.debuffs[i]:SetWidth(f.config.debuffsize) + f.debuffs[i]:SetHeight(f.config.debuffsize) f.debuffs[i]:SetNormalTexture(nil) f.debuffs[i]:SetScript("OnEnter", function() GameTooltip:SetOwner(this, "ANCHOR_BOTTOMRIGHT") @@ -570,9 +570,9 @@ function pfUI.uf:RefreshUnit(unit, component) end unit.debuffs[i]:SetPoint(af, unit, as, - (i-1-8*row)*((2*default_border) + C.unitframes.debuff_size + 1), - invert * (top)*((2*default_border) + C.unitframes.buff_size + 1) + - invert * (row)*((2*default_border) + C.unitframes.debuff_size + 1) + invert*(2*default_border + 1)) + (i-1-8*row)*((2*default_border) + unit.config.debuffsize + 1), + invert * (top)*((2*default_border) + unit.config.buffsize + 1) + + invert * (row)*((2*default_border) + unit.config.debuffsize + 1) + invert*(2*default_border + 1)) local texture, stacks, dtype if unit.label == "player" then @@ -718,10 +718,7 @@ function pfUI.uf:RefreshUnit(unit, component) end pfUI.uf:SetupDebuffFilter() - if table.getn(pfUI.uf.debuffs) > 0 and - ((pfUI_config.unitframes.group.raid_debuffs == "1" and unit.label == "party") or - unit.label == "raid") - then + if table.getn(pfUI.uf.debuffs) > 0 and unit.config.debuff_indicator == "1" then local infected = false for i=1,32 do local _,_,dtype = UnitDebuff(unit.label .. unit.id, i) @@ -789,10 +786,7 @@ function pfUI.uf:RefreshUnit(unit, component) end pfUI.uf:SetupBuffFilter() - if table.getn(pfUI.uf.buffs) > 0 and - ((pfUI_config.unitframes.group.raid_buffs == "1" and unit.label == "party") or - unit.label == "raid") - then + if table.getn(pfUI.uf.buffs) > 0 and unit.config.buff_indicator == "1" then local active = {} for i=1,32 do @@ -984,22 +978,20 @@ function pfUI.uf:SetupDebuffFilter() local _, myclass = UnitClass("player") pfUI.uf.debuffs = {} - if pfUI_config.unitframes.raid.debuffs_enable == "1" then - if myclass == "PALADIN" or myclass == "PRIEST" or myclass == "WARLOCK" or pfUI_config.unitframes.raid.debuffs_class ~= "1" then - table.insert(pfUI.uf.debuffs, "magic") - end + if myclass == "PALADIN" or myclass == "PRIEST" or myclass == "WARLOCK" or pfUI_config.unitframes.debuffs_class == "0" then + table.insert(pfUI.uf.debuffs, "magic") + end - if myclass == "DRUID" or myclass == "PALADIN" or myclass == "SHAMAN" or pfUI_config.unitframes.raid.debuffs_class ~= "1" then - table.insert(pfUI.uf.debuffs, "poison") - end + if myclass == "DRUID" or myclass == "PALADIN" or myclass == "SHAMAN" or pfUI_config.unitframes.debuffs_class == "0" then + table.insert(pfUI.uf.debuffs, "poison") + end - if myclass == "PRIEST" or myclass == "PALADIN" or myclass == "SHAMAN" or pfUI_config.unitframes.raid.debuffs_class ~= "1" then - table.insert(pfUI.uf.debuffs, "disease") - end + if myclass == "PRIEST" or myclass == "PALADIN" or myclass == "SHAMAN" or pfUI_config.unitframes.debuffs_class == "0" then + table.insert(pfUI.uf.debuffs, "disease") + end - if myclass == "DRUID" or myclass == "MAGE" or pfUI_config.unitframes.raid.debuffs_class ~= "1" then - table.insert(pfUI.uf.debuffs, "curse") - end + if myclass == "DRUID" or myclass == "MAGE" or pfUI_config.unitframes.debuffs_class == "0" then + table.insert(pfUI.uf.debuffs, "curse") end end @@ -1011,7 +1003,7 @@ function pfUI.uf:SetupBuffFilter() pfUI.uf.buffs = {} -- [[ DRUID ]] - if myclass == "DRUID" and pfUI_config.unitframes.raid.buffs_buffs == "1" then + if myclass == "DRUID" then -- Gift of the Wild table.insert(pfUI.uf.buffs, "interface\\icons\\spell_nature_regeneration") @@ -1019,17 +1011,8 @@ function pfUI.uf:SetupBuffFilter() table.insert(pfUI.uf.buffs, "interface\\icons\\spell_nature_thorns") end - if (pfUI_config.unitframes.raid.buffs_classonly ~= "1" or myclass == "DRUID") and pfUI_config.unitframes.raid.buffs_hots == "1" then - -- Regrowth - table.insert(pfUI.uf.buffs, "interface\\icons\\spell_nature_resistnature") - - -- Rejuvenation - table.insert(pfUI.uf.buffs, "interface\\icons\\spell_nature_rejuvenation") - end - - -- [[ PRIEST ]] - if myclass == "PRIEST" and pfUI_config.unitframes.raid.buffs_buffs == "1" then + if myclass == "PRIEST" then -- Prayer Of Fortitude" table.insert(pfUI.uf.buffs, "interface\\icons\\spell_holy_wordfortitude") table.insert(pfUI.uf.buffs, "interface\\icons\\spell_holy_prayeroffortitude") @@ -1046,19 +1029,8 @@ function pfUI.uf:SetupBuffFilter() table.insert(pfUI.uf.buffs, "interface\\icons\\spell_holy_excorcism") end - if (pfUI_config.unitframes.raid.buffs_classonly ~= "1" or myclass == "PRIEST") and pfUI_config.unitframes.raid.buffs_hots == "1" then - -- Renew - table.insert(pfUI.uf.buffs, "interface\\icons\\spell_holy_renew") - end - - if (pfUI_config.unitframes.raid.buffs_classonly ~= "1" or myclass == "PRIEST") and pfUI_config.unitframes.raid.buffs_procs == "1" then - -- Inspiration - table.insert(pfUI.uf.buffs, "interface\\icons\\inv_shield_06") - end - - -- [[ PALADIN ]] - if myclass == "PALADIN" and pfUI_config.unitframes.raid.buffs_buffs == "1" then + if myclass == "PALADIN" then -- Blessing of Salvation table.insert(pfUI.uf.buffs, "interface\\icons\\spell_holy_greaterblessingofsalvation") table.insert(pfUI.uf.buffs, "interface\\icons\\spell_holy_sealofsalvation") @@ -1081,25 +1053,15 @@ function pfUI.uf:SetupBuffFilter() end - -- [[ SHAMAN ]] - if (pfUI_config.unitframes.raid.buffs_classonly ~= "1" or myclass == "SHAMAN") and pfUI_config.unitframes.raid.buffs_procs == "1" then - -- Ancestral Fortitude - table.insert(pfUI.uf.buffs, "interface\\icons\\spell_nature_undyingstrength") - - -- Healing Way - table.insert(pfUI.uf.buffs, "interface\\icons\\spell_nature_healingway") - end - - -- [[ WARRIOR ]] - if myclass == "WARRIOR" and pfUI_config.unitframes.raid.buffs_buffs == "1" then + if myclass == "WARRIOR" then -- Battle Shout table.insert(pfUI.uf.buffs, "interface\\icons\\ability_warrior_battleshout") end -- [[ MAGE ]] - if myclass == "MAGE" and pfUI_config.unitframes.raid.buffs_buffs == "1" then + if myclass == "MAGE" then -- Arcane Intellect table.insert(pfUI.uf.buffs, "interface\\icons\\spell_holy_magicalsentry") table.insert(pfUI.uf.buffs, "interface\\icons\\spell_holy_arcaneintellect") @@ -1110,6 +1072,35 @@ function pfUI.uf:SetupBuffFilter() -- Amplify Magic table.insert(pfUI.uf.buffs, "interface\\icons\\spell_holy_flashheal") end + + -- PROCS + -- [[ SHAMAN ]] + if (pfUI_config.unitframes.all_procs == "1" or myclass == "SHAMAN") and pfUI_config.unitframes.show_procs == "1" then + -- Ancestral Fortitude + table.insert(pfUI.uf.buffs, "interface\\icons\\spell_nature_undyingstrength") + + -- Healing Way + table.insert(pfUI.uf.buffs, "interface\\icons\\spell_nature_healingway") + end + + if (pfUI_config.unitframes.all_procs == "1" or myclass == "PRIEST") and pfUI_config.unitframes.show_procs == "1" then + -- Inspiration + table.insert(pfUI.uf.buffs, "interface\\icons\\inv_shield_06") + end + + -- HOTS + if (pfUI_config.unitframes.all_hots == "1" or myclass == "PRIEST") and pfUI_config.unitframes.show_hots == "1" then + -- Renew + table.insert(pfUI.uf.buffs, "interface\\icons\\spell_holy_renew") + end + + if (pfUI_config.unitframes.all_hots == "1" or myclass == "DRUID") and pfUI_config.unitframes.show_hots == "1" then + -- Regrowth + table.insert(pfUI.uf.buffs, "interface\\icons\\spell_nature_resistnature") + + -- Rejuvenation + table.insert(pfUI.uf.buffs, "interface\\icons\\spell_nature_rejuvenation") + end end function pfUI.uf:GetStatusValue(unit, pos) @@ -1206,7 +1197,9 @@ function pfUI.uf.GetColor(self, preset) local _, class = UnitClass(unitstr) r, g, b = RAID_CLASS_COLORS[class].r, RAID_CLASS_COLORS[class].g, RAID_CLASS_COLORS[class].b else - r, g, b = UnitReactionColor[UnitReaction(unitstr, "player")].r, UnitReactionColor[UnitReaction(unitstr, "player")].g, UnitReactionColor[UnitReaction(unitstr, "player")].b + if UnitReactionColor[UnitReaction(unitstr, "player")] then + r, g, b = UnitReactionColor[UnitReaction(unitstr, "player")].r, UnitReactionColor[UnitReaction(unitstr, "player")].g, UnitReactionColor[UnitReaction(unitstr, "player")].b + end end elseif preset == "class" then diff --git a/modules/group.lua b/modules/group.lua index 9067b7eb..db4a552b 100644 --- a/modules/group.lua +++ b/modules/group.lua @@ -58,9 +58,15 @@ pfUI:RegisterModule("group", function () UpdateMovable(pfUI.uf.group[i]) pfUI.uf.group[i].target = pfUI.uf:CreateUnitFrame("Party" .. i .. "Target", nil, C.unitframes.grouptarget, 0.2) + pfUI.uf.group[i].target:UpdateFrameSize() - pfUI.uf.group[i].target:SetPoint("TOPLEFT", 180, -5 - ((i-1)*75)) + pfUI.uf.group[i].target:SetPoint("TOPLEFT", pfUI.uf.group[i], "TOPRIGHT", 3*default_border, 0) UpdateMovable(pfUI.uf.group[i].target) + + pfUI.uf.group[i].pet = pfUI.uf:CreateUnitFrame("PartyPet", i, C.unitframes.grouppet, 0.2) + pfUI.uf.group[i].pet:UpdateFrameSize() + pfUI.uf.group[i].pet:SetPoint("BOTTOMLEFT", pfUI.uf.group[i], "BOTTOMRIGHT", 3*default_border, -default_border) + UpdateMovable(pfUI.uf.group[i].pet) end pfUI.uf.partytargetScanner = CreateFrame("Button",nil,UIParent) @@ -71,6 +77,12 @@ pfUI:RegisterModule("group", function () else pfUI.uf.group[i].target:Hide() end + + if UnitExists("partypet" .. i) or (pfUI.gitter and pfUI.gitter:IsShown()) then + pfUI.uf.group[i].pet:Show() + else + pfUI.uf.group[i].pet:Hide() + end end end) diff --git a/modules/gui.lua b/modules/gui.lua index 1d82f958..0c874fa7 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -860,7 +860,7 @@ pfUI:RegisterModule("gui", function () pfUI.gui:CreateConfig(pfUI.gui.uf, "Custom Health Bar Color", C.unitframes, "customcolor", "color") pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Custom Color Health Bar Background", C.unitframes, "custombg", "checkbox") pfUI.gui:CreateConfig(pfUI.gui.uf, "Custom Health Bar Background Color", C.unitframes, "custombgcolor", "color") - pfUI.gui:CreateConfig(pfUI.gui.uf, "Animation Speed", C.unitframes, "animation_speed") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Healthbar Animation Speed", C.unitframes, "animation_speed") pfUI.gui:CreateConfig(pfUI.gui.uf, "Portrait Alpha", C.unitframes, "portraitalpha") pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable 2D Portraits As Fallback", C.unitframes, "portraittexture", "checkbox") @@ -879,6 +879,9 @@ pfUI:RegisterModule("gui", function () pfUI.gui:CreateConfig(pfUI.gui.uf, "Buff Size", C.unitframes.player, "buffsize") pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Position", C.unitframes.player, "debuffs", "dropdown", { "top", "bottom", "hide"}) pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Size", C.unitframes.player, "debuffsize") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Invert Health Bar", C.unitframes.player, "invert_healthbar", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Buff Indicators", C.unitframes.player, "buff_indicator", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Debuff Indicators", C.unitframes.player, "debuff_indicator", "checkbox") pfUI.gui:CreateConfig(pfUI.gui.uf, "Left Text", C.unitframes.player, "txtleft", "dropdown", txtValues) pfUI.gui:CreateConfig(pfUI.gui.uf, "Center Text", C.unitframes.player, "txtcenter", "dropdown", txtValues) pfUI.gui:CreateConfig(pfUI.gui.uf, "Right Text", C.unitframes.player, "txtright", "dropdown", txtValues) @@ -898,6 +901,9 @@ pfUI:RegisterModule("gui", function () pfUI.gui:CreateConfig(pfUI.gui.uf, "Buff Size", C.unitframes.target, "buffsize") pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Position", C.unitframes.target, "debuffs", "dropdown", { "top", "bottom", "hide"}) pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Size", C.unitframes.target, "debuffsize") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Invert Health Bar", C.unitframes.target, "invert_healthbar", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Buff Indicators", C.unitframes.target, "buff_indicator", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Debuff Indicators", C.unitframes.target, "debuff_indicator", "checkbox") pfUI.gui:CreateConfig(pfUI.gui.uf, "Left Text", C.unitframes.target, "txtleft", "dropdown", txtValues) pfUI.gui:CreateConfig(pfUI.gui.uf, "Center Text", C.unitframes.target, "txtcenter", "dropdown", txtValues) pfUI.gui:CreateConfig(pfUI.gui.uf, "Right Text", C.unitframes.target, "txtright", "dropdown", txtValues) @@ -912,10 +918,16 @@ pfUI:RegisterModule("gui", function () pfUI.gui:CreateConfig(pfUI.gui.uf, "Buff Size", C.unitframes.group, "buffsize") pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Position", C.unitframes.group, "debuffs", "dropdown", { "top", "bottom", "hide"}) pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Size", C.unitframes.group, "debuffsize") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Invert Health Bar", C.unitframes.group, "invert_healthbar", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Buff Indicators", C.unitframes.group, "buff_indicator", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Debuff Indicators", C.unitframes.group, "debuff_indicator", "checkbox") pfUI.gui:CreateConfig(pfUI.gui.uf, "Left Text", C.unitframes.group, "txtleft", "dropdown", txtValues) pfUI.gui:CreateConfig(pfUI.gui.uf, "Center Text", C.unitframes.group, "txtcenter", "dropdown", txtValues) pfUI.gui:CreateConfig(pfUI.gui.uf, "Right Text", C.unitframes.group, "txtright", "dropdown", txtValues) + pfUI.gui:CreateConfig(pfUI.gui.uf, "Hide Group Frames When In A Raid", C.unitframes.group, "hide_in_raid", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Clickcast", C.unitframes.group, "clickcast", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Group Target", nil, nil, "header") pfUI.gui:CreateConfig(pfUI.gui.uf, "Portrait Position", C.unitframes.grouptarget, "portrait", "dropdown", { "bar", "left", "right", "off" }) pfUI.gui:CreateConfig(pfUI.gui.uf, "Health Bar Width", C.unitframes.grouptarget, "width") @@ -926,14 +938,29 @@ pfUI:RegisterModule("gui", function () pfUI.gui:CreateConfig(pfUI.gui.uf, "Buff Size", C.unitframes.grouptarget, "buffsize") pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Position", C.unitframes.grouptarget, "debuffs", "dropdown", { "top", "bottom", "hide"}) pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Size", C.unitframes.grouptarget, "debuffsize") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Invert Health Bar", C.unitframes.grouptarget, "invert_healthbar", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Buff Indicators", C.unitframes.grouptarget, "buff_indicator", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Debuff Indicators", C.unitframes.grouptarget, "debuff_indicator", "checkbox") pfUI.gui:CreateConfig(pfUI.gui.uf, "Left Text", C.unitframes.grouptarget, "txtleft", "dropdown", txtValues) pfUI.gui:CreateConfig(pfUI.gui.uf, "Center Text", C.unitframes.grouptarget, "txtcenter", "dropdown", txtValues) pfUI.gui:CreateConfig(pfUI.gui.uf, "Right Text", C.unitframes.grouptarget, "txtright", "dropdown", txtValues) - pfUI.gui:CreateConfig(pfUI.gui.uf, "Hide Group Frames When In A Raid", C.unitframes.group, "hide_in_raid", "checkbox") - pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Clickcast", C.unitframes.group, "clickcast", "checkbox") - pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Raid Frames Buff Behaviour For Group Frames", C.unitframes.group, "raid_buffs", "checkbox") - pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Raid Frames Debuff Behaviour For Group Frames", C.unitframes.group, "raid_debuffs", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Group Pet", nil, nil, "header") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Portrait Position", C.unitframes.grouppet, "portrait", "dropdown", { "bar", "left", "right", "off" }) + pfUI.gui:CreateConfig(pfUI.gui.uf, "Health Bar Width", C.unitframes.grouppet, "width") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Health Bar Height", C.unitframes.grouppet, "height") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Power Bar Height", C.unitframes.grouppet, "pheight") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Spacing", C.unitframes.grouppet, "pspace") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Buff Position", C.unitframes.grouppet, "buffs", "dropdown", { "top", "bottom", "hide"}) + pfUI.gui:CreateConfig(pfUI.gui.uf, "Buff Size", C.unitframes.grouppet, "buffsize") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Position", C.unitframes.grouppet, "debuffs", "dropdown", { "top", "bottom", "hide"}) + pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Size", C.unitframes.grouppet, "debuffsize") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Invert Health Bar", C.unitframes.grouppet, "invert_healthbar", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Buff Indicators", C.unitframes.grouppet, "buff_indicator", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Debuff Indicators", C.unitframes.grouppet, "debuff_indicator", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Left Text", C.unitframes.grouppet, "txtleft", "dropdown", txtValues) + pfUI.gui:CreateConfig(pfUI.gui.uf, "Center Text", C.unitframes.grouppet, "txtcenter", "dropdown", txtValues) + pfUI.gui:CreateConfig(pfUI.gui.uf, "Right Text", C.unitframes.grouppet, "txtright", "dropdown", txtValues) pfUI.gui:CreateConfig(pfUI.gui.uf, "Raid", nil, nil, "header") pfUI.gui:CreateConfig(pfUI.gui.uf, "Portrait Position", C.unitframes.raid, "portrait", "dropdown", { "bar", "left", "right", "off" }) @@ -945,23 +972,13 @@ pfUI:RegisterModule("gui", function () pfUI.gui:CreateConfig(pfUI.gui.uf, "Buff Size", C.unitframes.raid, "buffsize") pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Position", C.unitframes.raid, "debuffs", "dropdown", { "top", "bottom", "hide"}) pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Size", C.unitframes.raid, "debuffsize") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Invert Health Bar", C.unitframes.raid, "invert_healthbar", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Buff Indicators", C.unitframes.raid, "buff_indicator", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Debuff Indicators", C.unitframes.raid, "debuff_indicator", "checkbox") pfUI.gui:CreateConfig(pfUI.gui.uf, "Left Text", C.unitframes.raid, "txtleft", "dropdown", txtValues) pfUI.gui:CreateConfig(pfUI.gui.uf, "Center Text", C.unitframes.raid, "txtcenter", "dropdown", txtValues) pfUI.gui:CreateConfig(pfUI.gui.uf, "Right Text", C.unitframes.raid, "txtright", "dropdown", txtValues) - pfUI.gui:CreateConfig(pfUI.gui.uf, "Invert Health Bar", C.unitframes.raid, "invert_healthbar", "checkbox") - pfUI.gui:CreateConfig(pfUI.gui.uf, "Show Missing Health", C.unitframes.raid, "show_missing", "checkbox") - pfUI.gui:CreateConfig(pfUI.gui.uf, "Clickcast", C.unitframes.raid, "clickcast") - pfUI.gui:CreateConfig(pfUI.gui.uf, "Clickcast (Shift)", C.unitframes.raid, "clickcast_shift") - pfUI.gui:CreateConfig(pfUI.gui.uf, "Clickcast (Alt)", C.unitframes.raid, "clickcast_alt") - pfUI.gui:CreateConfig(pfUI.gui.uf, "Clickcast (Ctrl)", C.unitframes.raid, "clickcast_ctrl") - pfUI.gui:CreateConfig(pfUI.gui.uf, "Show My Buffs", C.unitframes.raid, "buffs_buffs", "checkbox") - pfUI.gui:CreateConfig(pfUI.gui.uf, "Show HOTs", C.unitframes.raid, "buffs_hots", "checkbox") - pfUI.gui:CreateConfig(pfUI.gui.uf, "Show My Procs", C.unitframes.raid, "buffs_procs", "checkbox") - pfUI.gui:CreateConfig(pfUI.gui.uf, "Only Display HOTs Of My Class", C.unitframes.raid, "buffs_classonly", "checkbox") - pfUI.gui:CreateConfig(pfUI.gui.uf, "Show Debuff Indicators", C.unitframes.raid, "debuffs_enable", "checkbox") - pfUI.gui:CreateConfig(pfUI.gui.uf, "Only Display Debuffs Of My Class", C.unitframes.raid, "debuffs_class", "checkbox") - pfUI.gui:CreateConfig(pfUI.gui.uf, "Target of Target", nil, nil, "header") pfUI.gui:CreateConfig(pfUI.gui.uf, "Portrait Position", C.unitframes.ttarget, "portrait", "dropdown", { "bar", "left", "right", "off" }) pfUI.gui:CreateConfig(pfUI.gui.uf, "Health Bar Width", C.unitframes.ttarget, "width") @@ -972,6 +989,9 @@ pfUI:RegisterModule("gui", function () pfUI.gui:CreateConfig(pfUI.gui.uf, "Buff Size", C.unitframes.ttarget, "buffsize") pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Position", C.unitframes.ttarget, "debuffs", "dropdown", { "top", "bottom", "hide"}) pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Size", C.unitframes.ttarget, "debuffsize") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Invert Health Bar", C.unitframes.ttarget, "invert_healthbar", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Buff Indicators", C.unitframes.target, "buff_indicator", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Debuff Indicators", C.unitframes.target, "debuff_indicator", "checkbox") pfUI.gui:CreateConfig(pfUI.gui.uf, "Left Text", C.unitframes.ttarget, "txtleft", "dropdown", txtValues) pfUI.gui:CreateConfig(pfUI.gui.uf, "Center Text", C.unitframes.ttarget, "txtcenter", "dropdown", txtValues) pfUI.gui:CreateConfig(pfUI.gui.uf, "Right Text", C.unitframes.ttarget, "txtright", "dropdown", txtValues) @@ -986,10 +1006,26 @@ pfUI:RegisterModule("gui", function () pfUI.gui:CreateConfig(pfUI.gui.uf, "Buff Size", C.unitframes.pet, "buffsize") pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Position", C.unitframes.pet, "debuffs", "dropdown", { "top", "bottom", "hide"}) pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Size", C.unitframes.pet, "debuffsize") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Invert Health Bar", C.unitframes.pet, "invert_healthbar", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Buff Indicators", C.unitframes.pet, "buff_indicator", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Debuff Indicators", C.unitframes.pet, "debuff_indicator", "checkbox") pfUI.gui:CreateConfig(pfUI.gui.uf, "Left Text", C.unitframes.pet, "txtleft", "dropdown", txtValues) pfUI.gui:CreateConfig(pfUI.gui.uf, "Center Text", C.unitframes.pet, "txtcenter", "dropdown", txtValues) pfUI.gui:CreateConfig(pfUI.gui.uf, "Right Text", C.unitframes.pet, "txtright", "dropdown", txtValues) + pfUI.gui:CreateConfig(pfUI.gui.uf, "Buff- And Debuff Indicators", nil, nil, "header") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Show Hots on Buff Indicators", C.unitframes, "show_hots", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Show Hots of all Classes", C.unitframes, "all_hots", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Show Procs on Buff Indicators", C.unitframes, "show_procs", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Show Procs of all Classes", C.unitframes, "all_procs", "checkbox") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Only Show Indicators for Dispellable Debuffs", C.unitframes, "debuffs_class", "checkbox") + + pfUI.gui:CreateConfig(pfUI.gui.uf, "Clickcast", nil, nil, "header") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Clickcast", C.unitframes, "clickcast") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Clickcast (Shift)", C.unitframes, "clickcast_shift") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Clickcast (Alt)", C.unitframes, "clickcast_alt") + pfUI.gui:CreateConfig(pfUI.gui.uf, "Clickcast (Ctrl)", C.unitframes, "clickcast_ctrl") + -- action bar pfUI.gui.bar = pfUI.gui:CreateConfigTab("Action Bar") pfUI.gui:CreateConfig(pfUI.gui.bar, "Icon Size", C.bars, "icon_size")