Merge branch 'release/v2.21-Release' into main

This commit is contained in:
Sumsebrum 2022-08-17 23:09:08 +02:00
commit ff703a0bc8
8 changed files with 45 additions and 11 deletions

View File

@ -134,7 +134,7 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED()
end end
end end
-- death detection -- death detection
if (Gladdy.buttons[destUnit] and eventType == "UNIT_DIED" or eventType == "PARTY_KILL" or eventType == "SPELL_INSTAKILL") then if (eventType == "UNIT_DIED" or eventType == "PARTY_KILL" or eventType == "SPELL_INSTAKILL") then
if not Gladdy:isFeignDeath(destUnit) then if not Gladdy:isFeignDeath(destUnit) then
Gladdy:SendMessage("UNIT_DEATH", destUnit) Gladdy:SendMessage("UNIT_DEATH", destUnit)
end end
@ -167,7 +167,7 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED()
if spellID == 16188 or spellID == 17116 then -- Nature's Swiftness (same name for druid and shaman) if spellID == 16188 or spellID == 17116 then -- Nature's Swiftness (same name for druid and shaman)
spellId = spellID spellId = spellID
end end
if Gladdy.db.cooldownCooldowns[tostring(spellId)] and (eventType == "SPELL_CAST_SUCCESS" or eventType == "SPELL_MISSED") then if Gladdy.db.cooldownCooldowns[tostring(spellId)] and (eventType == "SPELL_CAST_SUCCESS" or eventType == "SPELL_MISSED" or eventType == "SPELL_DODGED") then
if (Gladdy:GetCooldownList()[Gladdy.buttons[srcUnit].class][spellId]) then if (Gladdy:GetCooldownList()[Gladdy.buttons[srcUnit].class][spellId]) then
unitClass = Gladdy.buttons[srcUnit].class unitClass = Gladdy.buttons[srcUnit].class
else else
@ -393,6 +393,18 @@ function EventListener:UNIT_SPELLCAST_SUCCEEDED(...)
Gladdy:Debug("INFO", "UNIT_SPELLCAST_SUCCEEDED - RACIAL_USED", unit, spellID) Gladdy:Debug("INFO", "UNIT_SPELLCAST_SUCCEEDED - RACIAL_USED", unit, spellID)
Gladdy:SendMessage("RACIAL_USED", unit) Gladdy:SendMessage("RACIAL_USED", unit)
end end
--cooldown
local unitClass
if (Gladdy:GetCooldownList()[Gladdy.buttons[unit].class][unit]) then
unitClass = Gladdy.buttons[unit].class
else
unitClass = Gladdy.buttons[unit].race
end
if spellID ~= 16188 and spellID ~= 17116 and spellID ~= 16166 and spellID ~= 12043 and spellID ~= 5384 then -- Nature's Swiftness CD starts when buff fades
Gladdy:Debug("INFO", "UNIT_SPELLCAST_SUCCEEDED", "- CooldownUsed", unit, "spellID:", spellID)
Cooldowns:CooldownUsed(unit, unitClass, spellID)
end
end end
end end

View File

@ -27,11 +27,11 @@ local LibStub = LibStub
--------------------------- ---------------------------
local MAJOR, MINOR = "Gladdy", 9 local MAJOR, MINOR = "Gladdy", 10
local Gladdy = LibStub:NewLibrary(MAJOR, MINOR) local Gladdy = LibStub:NewLibrary(MAJOR, MINOR)
local L local L
Gladdy.version_major_num = 2 Gladdy.version_major_num = 2
Gladdy.version_minor_num = 0.20 Gladdy.version_minor_num = 0.21
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.release Gladdy.version_releaseType = RELEASE_TYPES.release
Gladdy.version = PREFIX .. string.format("%.2f", Gladdy.version_num) .. "-" .. Gladdy.version_releaseType Gladdy.version = PREFIX .. string.format("%.2f", Gladdy.version_num) .. "-" .. Gladdy.version_releaseType

View File

@ -1,5 +1,5 @@
## Title: Gladdy |cFFFF0000 game client not supported|r ## Title: Gladdy |cFFFF0000 game client not supported|r
## Version: 2.20-Release ## Version: 2.21-Release
## Notes: The most powerful arena AddOn for WoW Classic TBC/WotLK ## Notes: The most powerful arena AddOn for WoW Classic TBC/WotLK
## 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

@ -1,6 +1,6 @@
## Interface: 20504 ## Interface: 20504
## Title: Gladdy - TBC ## Title: Gladdy - TBC
## Version: 2.20-Release ## Version: 2.21-Release
## Notes: The most powerful arena AddOn for WoW 2.5.4 ## Notes: The most powerful arena AddOn for WoW 2.5.4
## 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

@ -1,6 +1,6 @@
## Interface: 30400 ## Interface: 30400
## Title: Gladdy - WotLK ## Title: Gladdy - WotLK
## Version: 2.20-Release ## Version: 2.21-Release
## Notes: The most powerful arena AddOn for WoW 3.4.0 ## Notes: The most powerful arena AddOn for WoW 3.4.0
## 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

@ -347,7 +347,7 @@ function Cooldowns:ClearIcon(button, index, spellId, icon)
end end
end end
icon:Show() icon:Show()
LCG:PixelGlow_Stop(icon.glow) LCG.PixelGlow_Stop(icon.glow)
if icon.timer then if icon.timer then
icon.timer:Cancel() icon.timer:Cancel()
end end
@ -366,6 +366,8 @@ end
-- Test -- Test
--------------------- ---------------------
-- /run LibStub("Gladdy").modules["Cooldowns"]:AURA_GAIN(_, AURA_TYPE_BUFF, 22812, "Barkskin", _, 20, _, _, _, _, "arena1", true)
-- /run LibStub("Gladdy").modules["Cooldowns"]:AURA_FADE("arena1", 22812)
function Cooldowns:Test(unit) function Cooldowns:Test(unit)
if Gladdy.frame.testing then if Gladdy.frame.testing then
self:UpdateTestCooldowns(unit) self:UpdateTestCooldowns(unit)

View File

@ -1,6 +1,6 @@
local string_gsub, floor, pairs = string.gsub, math.floor, pairs local string_gsub, floor, pairs = string.gsub, math.floor, pairs
local CreateFrame, SetPortraitTexture = CreateFrame, SetPortraitTexture local CreateFrame, SetPortraitTexture = CreateFrame, SetPortraitTexture
local UnitHealthMax, UnitHealth, UnitGUID = UnitHealthMax, UnitHealth, UnitGUID local UnitHealthMax, UnitHealth, UnitGUID, UnitExists = UnitHealthMax, UnitHealth, UnitGUID, UnitExists
local Gladdy = LibStub("Gladdy") local Gladdy = LibStub("Gladdy")
local L = Gladdy.L local L = Gladdy.L
@ -47,6 +47,7 @@ function Pets:UpdateFrameOnce()
self:RegisterMessage("PET_DESTROYED") self:RegisterMessage("PET_DESTROYED")
self:RegisterMessage("PET_STEALTH") self:RegisterMessage("PET_STEALTH")
self:RegisterMessage("ENEMY_SPOTTED") self:RegisterMessage("ENEMY_SPOTTED")
self:RegisterMessage("UNIT_DEATH")
else else
self:UnregisterAllMessages() self:UnregisterAllMessages()
end end
@ -56,6 +57,11 @@ function Pets:JOINED_ARENA()
for _,v in pairs(self.frames) do for _,v in pairs(self.frames) do
v.healthBar:SetAlpha(0) v.healthBar:SetAlpha(0)
end end
for i=1,Gladdy.curBracket do
if UnitExists("arenapet" .. i) then
Gladdy:SendMessage("PET_SPOTTED", "arenapet" .. i)
end
end
if Gladdy.db.petEnabled then if Gladdy.db.petEnabled then
self:RegisterEvent("UNIT_PET") self:RegisterEvent("UNIT_PET")
self:SetScript("OnEvent", function(_, event, unitId) self:SetScript("OnEvent", function(_, event, unitId)
@ -91,15 +97,20 @@ function Pets:PET_SPOTTED(unit)
Pets:SetHealthText(self, UnitHealth(unit), UnitHealthMax(unit)) Pets:SetHealthText(self, UnitHealth(unit), UnitHealthMax(unit))
end) end)
end end
Gladdy:Print(self.frames[unit].healthBar:GetAlpha())
end end
function Pets:PET_DESTROYED(unit) function Pets:PET_DESTROYED(unit)
if Gladdy.db.petEnabled then if Gladdy.db.petEnabled and self.frames[unit] then
self.frames[unit].healthBar:SetAlpha(0) self.frames[unit].healthBar:SetAlpha(0)
self.frames[unit].healthBar:SetScript("OnUpdate", nil) self.frames[unit].healthBar:SetScript("OnUpdate", nil)
end end
end end
function Pets:UNIT_DEATH(unit)
self:PET_DESTROYED(unit)
end
function Pets:PET_STEALTH(unit) function Pets:PET_STEALTH(unit)
if Gladdy.db.petEnabled then if Gladdy.db.petEnabled then
self.frames[unit].healthBar.hp:SetStatusBarColor(0.66, 0.66, 0.66, 1) self.frames[unit].healthBar.hp:SetStatusBarColor(0.66, 0.66, 0.66, 1)
@ -123,6 +134,7 @@ function Pets:CheckUnitPet(unitId)
petFrame.healthBar.hp:SetMinMaxValues(0, UnitHealthMax(unit)) petFrame.healthBar.hp:SetMinMaxValues(0, UnitHealthMax(unit))
petFrame.healthBar.hp:SetValue(UnitHealth(unit)) petFrame.healthBar.hp:SetValue(UnitHealth(unit))
Pets:SetHealthText(petFrame.healthBar, UnitHealth(unit), UnitHealthMax(unit)) Pets:SetHealthText(petFrame.healthBar, UnitHealth(unit), UnitHealthMax(unit))
SetPortraitTexture(petFrame.healthBar.portrait, unit)
petFrame.healthBar:SetScript("OnUpdate", function(self) petFrame.healthBar:SetScript("OnUpdate", function(self)
self.hp:SetValue(UnitHealth(self.unit)) self.hp:SetValue(UnitHealth(self.unit))
Pets:SetHealthText(self, UnitHealth(unit), UnitHealthMax(unit)) Pets:SetHealthText(self, UnitHealth(unit), UnitHealthMax(unit))

View File

@ -4,7 +4,7 @@
--- ---
## [v2.20-Release Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v2.20-Release/Gladdy_Classic_v2.20-Release.zip) ## [v2.21-Release Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v2.21-Release/Gladdy_Classic_v2.21-Release.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
@ -79,6 +79,14 @@ Thank you!
### Changes ### Changes
### v2.21-Release
- **Cooldowns**
- glows minor fix again...
- more tracking
- **Pets**
- death detection improved
- detection improved
### v2.20-Release ### v2.20-Release
- **Cooldowns** - **Cooldowns**
- glow changed to PixelGlow - glow changed to PixelGlow