Merge branch 'release/v1.19' into main

This commit is contained in:
Sumsebrum 2021-07-27 16:35:55 +02:00
commit 582ca88b59
5 changed files with 74 additions and 31 deletions

View File

@ -110,7 +110,7 @@ function Gladdy:CreateFrame()
self.anchor:Hide() self.anchor:Hide()
end end
self.frame:SetAlpha(0) self.frame:Hide()
end end
function Gladdy:UpdateFrame() function Gladdy:UpdateFrame()
@ -279,7 +279,13 @@ end
function Gladdy:HideFrame() function Gladdy:HideFrame()
if (self.frame) then if (self.frame) then
self.frame:SetAlpha(0) if InCombatLockdown() then
self.startTest = nil
self.hideFrame = true
else
self.frame:Hide()
end
self.frame.testing = nil self.frame.testing = nil
end end
end end
@ -304,8 +310,14 @@ function Gladdy:ToggleFrame(i)
self:Reset() self:Reset()
self.curBracket = i self.curBracket = i
self:UpdateFrame() self:UpdateFrame()
if InCombatLockdown() then
Gladdy:Print("Gladdy frames show as soon as you leave combat")
self.showFrame = true
self.startTest = true
else
self:Test() self:Test()
self.frame:SetAlpha(1) self.frame:Show()
end
end end
end end

View File

@ -25,7 +25,7 @@ local MAJOR, MINOR = "Gladdy", 4
local Gladdy = LibStub:NewLibrary(MAJOR, MINOR) local Gladdy = LibStub:NewLibrary(MAJOR, MINOR)
local L local L
Gladdy.version_major_num = 1 Gladdy.version_major_num = 1
Gladdy.version_minor_num = 0.18 Gladdy.version_minor_num = 0.19
Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num
Gladdy.version_releaseType = RELEASE_TYPES.beta Gladdy.version_releaseType = RELEASE_TYPES.beta
Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType
@ -250,16 +250,13 @@ end
function Gladdy:OnEnable() function Gladdy:OnEnable()
self:RegisterEvent("UPDATE_BATTLEFIELD_STATUS") self:RegisterEvent("UPDATE_BATTLEFIELD_STATUS")
self:RegisterEvent("PLAYER_ENTERING_WORLD") self:RegisterEvent("PLAYER_ENTERING_WORLD")
self:RegisterEvent("PLAYER_REGEN_ENABLED")
self:CreateFrame() if (IsAddOnLoaded("Clique")) then
for i = 1, 5 do for i = 1, 5 do
self:CreateButton(i) self:CreateButton(i)
end end
self.curBracket = 5
self:UpdateFrame()
self:Reset()
if (IsAddOnLoaded("Clique")) then
ClickCastFrames = ClickCastFrames or {} ClickCastFrames = ClickCastFrames or {}
ClickCastFrames[self.buttons.arena1.secure] = true ClickCastFrames[self.buttons.arena1.secure] = true
ClickCastFrames[self.buttons.arena2.secure] = true ClickCastFrames[self.buttons.arena2.secure] = true
@ -301,6 +298,7 @@ end
function Gladdy:Test() function Gladdy:Test()
self.frame.testing = true self.frame.testing = true
if self.curBracket then
for i = 1, self.curBracket do for i = 1, self.curBracket do
local unit = "arena" .. i local unit = "arena" .. i
if (not self.buttons[unit]) then if (not self.buttons[unit]) then
@ -318,6 +316,7 @@ function Gladdy:Test()
button:SetAlpha(1) button:SetAlpha(1)
end end
end
end end
--------------------------- ---------------------------
@ -351,6 +350,23 @@ function Gladdy:UPDATE_BATTLEFIELD_STATUS(_, index)
end end
end end
function Gladdy:PLAYER_REGEN_ENABLED()
if self.showFrame then
self:UpdateFrame()
if self.startTest then
self:Test()
self.startTest = nil
end
self.frame:Show()
self.showFrame = nil
end
if self.hideFrame then
self:Reset()
self.frame:Hide()
self.hideFrame = nil
end
end
--------------------------- ---------------------------
-- RESET FUNCTIONS (ARENA LEAVE) -- RESET FUNCTIONS (ARENA LEAVE)
@ -428,8 +444,20 @@ function Gladdy:JoinedArena()
self.curBracket = 2 self.curBracket = 2
end end
Gladdy:SendMessage("JOINED_ARENA") for i = 1, self.curBracket do
self.frame:SetAlpha(1) if (not self.buttons["arena" .. i]) then
self:CreateButton(i)
end
end
self:SendMessage("JOINED_ARENA")
if InCombatLockdown() then
Gladdy:Print("Gladdy frames show as soon as you leave combat")
self.showFrame = true
else
self:UpdateFrame()
self.frame:Show()
end
for i=1, self.curBracket do for i=1, self.curBracket do
self.buttons["arena" .. i]:SetAlpha(1) self.buttons["arena" .. i]:SetAlpha(1)
end end

View File

@ -1,6 +1,6 @@
## Interface: 20501 ## Interface: 20501
## Title: Gladdy - TBC ## Title: Gladdy - TBC
## Version: 1.18-Beta ## Version: 1.19-Beta
## Notes: The most powerful arena AddOn for WoW 2.5.1 ## Notes: The most powerful arena AddOn for WoW 2.5.1
## Author: XiconQoo, DnB_Junkee, Knall ## Author: XiconQoo, DnB_Junkee, Knall
## X-Email: contact me on discord Knall#1751 ## X-Email: contact me on discord Knall#1751

View File

@ -25,7 +25,7 @@ local classSpells = {
["SHAMAN"] = 10414, ["SHAMAN"] = 10414,
["PALADIN"] = 10308, ["PALADIN"] = 10308,
["WARLOCK"] = 5782, ["WARLOCK"] = 5782,
["WARRIOR"] = 20252, ["WARRIOR"] = 25275,
["HUNTER"] = 27018, ["HUNTER"] = 27018,
["ROGUE"] = 36554, ["ROGUE"] = 36554,
} }

View File

@ -1,7 +1,7 @@
# Gladdy - TBC # Gladdy - TBC
### The most powerful arena addon for WoW TBC 2.5.1 ### The most powerful arena addon for WoW TBC 2.5.1
## [v1.18-Beta Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v1.18-Beta/Gladdy_TBC-Classic_v1.18-Beta.zip) ## [v1.19-Beta Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v1.19-Beta/Gladdy_TBC-Classic_v1.19-Beta.zip)
###### <a target="_blank" rel="noopener noreferrer" href="https://www.paypal.me/xiconqoo/10"><img src="https://raw.githubusercontent.com/XiconQoo/Gladdy/readme-media/Paypal-Donate.png" height="30" style="margin-top:-30px;position:relative;top:20px;"></a> Please consider donating if you like my work ###### <a target="_blank" rel="noopener noreferrer" href="https://www.paypal.me/xiconqoo/10"><img src="https://raw.githubusercontent.com/XiconQoo/Gladdy/readme-media/Paypal-Donate.png" height="30" style="margin-top:-30px;position:relative;top:20px;"></a> Please consider donating if you like my work
@ -62,6 +62,9 @@ The goal is to make Gladdy highly configurable in it's appearance. Everything ca
### Changes ### Changes
### v1.19-Beta
- fix gladdy frames not showing v2
### v1.18-Beta ### v1.18-Beta
- castbar font now working properly - castbar font now working properly