From d699fc9e20f5aa876b8f7cc6869ddfa7a77e57af Mon Sep 17 00:00:00 2001 From: stokbaek Date: Sat, 18 Nov 2017 01:59:41 +0100 Subject: [PATCH] nameplates: add option to hide totems --- api/config.lua | 1 + modules/gui.lua | 1 + modules/nameplates.lua | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/api/config.lua b/api/config.lua index 477ab051..b73c7339 100644 --- a/api/config.lua +++ b/api/config.lua @@ -526,6 +526,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("nameplates", nil, "raidiconsize", "16") pfUI:UpdateConfig("nameplates", nil, "players", "0") pfUI:UpdateConfig("nameplates", nil, "critters", "0") + pfUI:UpdateConfig("nameplates", nil, "totems", "0") pfUI:UpdateConfig("nameplates", nil, "showhp", "0") pfUI:UpdateConfig("nameplates", nil, "vpos", "-10") pfUI:UpdateConfig("nameplates", nil, "width", "120") diff --git a/modules/gui.lua b/modules/gui.lua index 5b4cf48b..bba147cc 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -1354,6 +1354,7 @@ pfUI:RegisterModule("gui", function () CreateConfig(this, T["Raid Icon Size"], C.nameplates, "raidiconsize") CreateConfig(this, T["Show Players Only"], C.nameplates, "players", "checkbox") CreateConfig(this, T["Hide Critters"], C.nameplates, "critters", "checkbox") + CreateConfig(this, T["Hide Totems"], C.nameplates, "totems", "checkbox") CreateConfig(this, T["Show Health Points"], C.nameplates, "showhp", "checkbox") CreateConfig(this, T["Vertical Position"], C.nameplates, "vpos") CreateConfig(this, T["Nameplate Width"], C.nameplates, "width") diff --git a/modules/nameplates.lua b/modules/nameplates.lua index 5310e6c7..f2817323 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -367,6 +367,15 @@ pfUI:RegisterModule("nameplates", function () end end + -- hide totems + if C.nameplates.totems == "1" and not this.needNameUpdate then + for totem in pairs(L["totems"]) do + if string.find(unitname, totem) then + this:Hide() + end + end + end + -- level elite indicator if this.needEliteUpdate and pfUI.nameplates.mobs[unitname] then if level:GetText() ~= nil then