From db1e3da6fcd970c52c61962330660a1ae892c935 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 15 Jun 2021 09:10:27 +0200 Subject: [PATCH] totemplates fix & bump version --- Gladdy.lua | 2 +- Gladdy.toc | 2 +- Modules/TotemPlates.lua | 40 +++++++++++++++++++++++++++++----------- README.md | 5 ++++- 4 files changed, 35 insertions(+), 14 deletions(-) diff --git a/Gladdy.lua b/Gladdy.lua index 900684e..0ca94de 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -25,7 +25,7 @@ local MAJOR, MINOR = "Gladdy", 4 local Gladdy = LibStub:NewLibrary(MAJOR, MINOR) local L Gladdy.version_major_num = 1 -Gladdy.version_minor_num = 0.10 +Gladdy.version_minor_num = 0.11 Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num Gladdy.version_releaseType = RELEASE_TYPES.beta Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType diff --git a/Gladdy.toc b/Gladdy.toc index 21b3a2d..c70eb7f 100644 --- a/Gladdy.toc +++ b/Gladdy.toc @@ -1,6 +1,6 @@ ## Interface: 20501 ## Title: Gladdy - TBC -## Version: 1.10-Beta +## Version: 1.11-Beta ## Notes: The most powerful arena AddOn for WoW 2.5.1 ## Author: XiconQoo, DnB_Junkee, Knall ## X-Email: contact me on discord Knall#1751 diff --git a/Modules/TotemPlates.lua b/Modules/TotemPlates.lua index 4c00d4a..95c9358 100644 --- a/Modules/TotemPlates.lua +++ b/Modules/TotemPlates.lua @@ -97,7 +97,7 @@ local function GetTotemColorDefaultOptions() return a.name < b.name end) for i=1,#indexedList do - defaultDB["totem" .. indexedList[i].id] = {color = indexedList[i].color, enabled = indexedList[i].enabled, alpha = 0.6} + defaultDB["totem" .. indexedList[i].id] = {color = indexedList[i].color, enabled = indexedList[i].enabled, alpha = 0.6, customText = ""} options["totem" .. indexedList[i].id] = { order = i+1, name = select(1, GetSpellInfo(indexedList[i].id)), @@ -163,12 +163,12 @@ local function GetTotemColorDefaultOptions() end }, customText = { - type = "input", - name = L["Custom totem name"], - order = 5, - width = "full", - get = function(info) return Gladdy.dbi.profile.npTotemColors["totem" .. indexedList[i].id].customText end, - set = function(info, value) Gladdy.dbi.profile.npTotemColors["totem" .. indexedList[i].id].customText = value Gladdy:UpdateFrame() end + type = "input", + name = L["Custom totem name"], + order = 5, + width = "full", + get = function(info) return Gladdy.db.npTotemColors["totem" .. indexedList[i].id].customText end, + set = function(info, value) Gladdy.db.npTotemColors["totem" .. indexedList[i].id].customText = value Gladdy:UpdateFrame() end }, } } @@ -228,6 +228,20 @@ function TotemPlates:Initialize() self:RegisterEvent("NAME_PLATE_UNIT_REMOVED") self:RegisterEvent("PLAYER_TARGET_CHANGED") self:SetScript("OnEvent", TotemPlates.OnEvent) + if Gladdy.db.npTotems and Gladdy.db.npTotemsShowEnemy then + --GetCVar("nameplateShowEnemyTotems") + --SetCVar("nameplateShowEnemyTotems", true); + end + if Gladdy.db.npTotems and Gladdy.db.npTotemsShowFriendly then + --GetCVar("nameplateShowFriendlyTotems") + --SetCVar("nameplateShowFriendlyTotems", true); + end + + --NeatPlates + --ELVUI + --Plater + --KUI + --threatplates end function TotemPlates:PLAYER_ENTERING_WORLD() @@ -332,15 +346,14 @@ function TotemPlates:NAME_PLATE_UNIT_ADDED(...) TotemPlates:SetTotemAlpha(nameplate.gladdyTotemFrame, unitID) nameplate.UnitFrame:SetAlpha(0) - nameplate.UnitFrame.point = select(2, nameplate.UnitFrame.selectionHighlight:GetPoint()) nameplate.UnitFrame.selectionHighlight:ClearAllPoints() nameplate.UnitFrame.selectionHighlight:SetPoint("TOPLEFT", nameplate.gladdyTotemFrame, "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) nameplate.UnitFrame.selectionHighlight:SetPoint("BOTTOMRIGHT", nameplate.gladdyTotemFrame, "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) nameplate.UnitFrame:SetScript("OnHide", function(unitFrame) unitFrame:SetAlpha(1) unitFrame.selectionHighlight:ClearAllPoints() - unitFrame.selectionHighlight:SetPoint("TOPLEFT", unitFrame.point, "TOPLEFT") - unitFrame.selectionHighlight:SetPoint("BOTTOMRIGHT", unitFrame.point, "BOTTOMRIGHT") + unitFrame.selectionHighlight:SetPoint("TOPLEFT", unitFrame.healthBar.barTexture, "TOPLEFT") + unitFrame.selectionHighlight:SetPoint("BOTTOMRIGHT", unitFrame.healthBar.barTexture, "BOTTOMRIGHT") unitFrame:SetScript("OnHide", nil) end) self.activeTotemNameplates[unitID] = nameplate @@ -439,6 +452,7 @@ function TotemPlates:GetOptions() min = 20, max = 100, step = 1, + width = "full", }), npTotemPlatesWidthFactor = Gladdy:option({ type = "range", @@ -448,6 +462,7 @@ function TotemPlates:GetOptions() min = 0.5, max = 2, step = 0.05, + width = "full", }), }, }, @@ -477,6 +492,7 @@ function TotemPlates:GetOptions() min = 1, max = 50, step = 0.1, + width = "full", }), npTremorFontXOffset = Gladdy:option({ type = "range", @@ -486,6 +502,7 @@ function TotemPlates:GetOptions() min = -300, max = 300, step = 1, + width = "full", }), npTremorFontYOffset = Gladdy:option({ type = "range", @@ -495,6 +512,7 @@ function TotemPlates:GetOptions() min = -300, max = 300, step = 1, + width = "full", }), }, }, @@ -528,7 +546,7 @@ function TotemPlates:GetOptions() min = 0, max = 1, step = 0.1, - width = "double", + width = "full", order = 23, get = function(info) local alphas = GetTotemOptions() diff --git a/README.md b/README.md index 9c863a2..a160e5c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Gladdy - TBC ### The most powerful arena addon for WoW TBC 2.5.1 -## [v1.10-Beta Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v1.10-Beta/Gladdy_TBC-Classic_v1.10-Beta.zip) +## [v1.11-Beta Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v1.11-Beta/Gladdy_TBC-Classic_v1.11-Beta.zip) ###### Please consider donating if you like my work @@ -39,6 +39,9 @@ The goal is to make Gladdy highly configurable in it's appearance. Everything ca ### Changes +### v1.11-Beta +- TotemPlates fix after blizzard update + ### v1.10-Beta - fix german and russian client not working - ArenaCountdown loacalization now working for all languages (except itIT...beta has no option to select italian)