Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smallpatches #4765

Merged
merged 7 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .pkgmeta
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ externals:
WeakAuras/Libs/LibCustomGlow-1.0: https://github.com/Stanzilla/LibCustomGlow
WeakAuras/Libs/LibDBIcon-1.0: https://repos.curseforge.com/wow/libdbicon-1-0/trunk/LibDBIcon-1.0
WeakAuras/Libs/LibGetFrame-1.0: https://github.com/mrbuds/LibGetFrame
WeakAuras/Libs/LibClassicDurations: https://github.com/rgd87/LibClassicDurations
WeakAuras/Libs/LibClassicCasterino: https://github.com/rgd87/LibClassicCasterino
WeakAuras/Libs/Archivist:
url: https://github.com/emptyrivers/Archivist
Expand Down
23 changes: 0 additions & 23 deletions WeakAuras/AuraEnvironment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ local AddonName, Private = ...
local WeakAuras = WeakAuras
local L = WeakAuras.L

local LCD
if WeakAuras.IsClassicEra() then
LCD = LibStub("LibClassicDurations")
LCD:RegisterFrame("WeakAuras")
end

local LibSerialize = LibStub("LibSerialize")
local LibDeflate = LibStub:GetLibrary("LibDeflate")

Expand All @@ -29,23 +23,6 @@ local WA_GetUnitAura = function(unit, spell, filter)
end
end

if WeakAuras.IsClassicEra() then
local WA_GetUnitAuraBase = WA_GetUnitAura
WA_GetUnitAura = function(unit, spell, filter)
local name, icon, count, debuffType, duration, expirationTime, source, isStealable, nameplateShowPersonal, spellId,
canApplyAura, isBossDebuff, castByPlayer, nameplateShowAll, timeMod = WA_GetUnitAuraBase(unit, spell, filter)
if spellId then
local durationNew, expirationTimeNew = LCD:GetAuraDurationByUnit(unit, spellId, source, name)
if duration == 0 and durationNew then
duration = durationNew
expirationTime = expirationTimeNew
end
end
return name, icon, count, debuffType, duration, expirationTime, source, isStealable, nameplateShowPersonal, spellId,
canApplyAura, isBossDebuff, castByPlayer, nameplateShowAll, timeMod
end
end

local WA_GetUnitBuff = function(unit, spell, filter)
filter = filter and filter.."|HELPFUL" or "HELPFUL"
return WA_GetUnitAura(unit, spell, filter)
Expand Down
21 changes: 4 additions & 17 deletions WeakAuras/BuffTrigger2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ local tinsert, wipe = table.insert, wipe
local pairs, next, type = pairs, next, type
local UnitAura = UnitAura

local LCD
if WeakAuras.IsClassicEra() then
LCD = LibStub("LibClassicDurations")
LCD:Register("WeakAuras")
UnitAura = LCD.UnitAuraWithBuffs
end

local newAPI = WeakAuras.IsRetail()

local WeakAuras = WeakAuras
Expand Down Expand Up @@ -2350,19 +2343,13 @@ Buff2Frame:RegisterEvent("UNIT_FLAGS")
Buff2Frame:RegisterEvent("PLAYER_FLAGS_CHANGED")
Buff2Frame:RegisterEvent("UNIT_PET")
Buff2Frame:RegisterEvent("RAID_TARGET_UPDATE")
if not WeakAuras.IsClassicEra() then
if WeakAuras.IsWrathOrRetail() then
Buff2Frame:RegisterEvent("PLAYER_FOCUS_CHANGED")
if WeakAuras.IsWrathOrRetail() then
Buff2Frame:RegisterEvent("PLAYER_SOFT_ENEMY_CHANGED")
Buff2Frame:RegisterEvent("PLAYER_SOFT_FRIEND_CHANGED")
Buff2Frame:RegisterEvent("ARENA_OPPONENT_UPDATE")
end
Buff2Frame:RegisterEvent("PLAYER_SOFT_ENEMY_CHANGED")
Buff2Frame:RegisterEvent("PLAYER_SOFT_FRIEND_CHANGED")
mrbuds marked this conversation as resolved.
Show resolved Hide resolved
Buff2Frame:RegisterEvent("ARENA_OPPONENT_UPDATE")
Buff2Frame:RegisterEvent("UNIT_ENTERED_VEHICLE")
Buff2Frame:RegisterEvent("UNIT_EXITED_VEHICLE")
else
LCD.RegisterCallback("WeakAuras", "UNIT_BUFF", function(event, unit)
EventHandler(Buff2Frame, "UNIT_AURA", unit)
end)
end
Buff2Frame:RegisterEvent("PLAYER_TARGET_CHANGED")
Buff2Frame:RegisterEvent("ENCOUNTER_START")
Expand Down
6 changes: 0 additions & 6 deletions WeakAuras/Init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,6 @@ local GetAddOnMetadata = C_AddOns and C_AddOns.GetAddOnMetadata or GetAddOnMetad
--- @field SerializeEx fun(self: LibSerialize,options: table, input: any)
--- @field Deserialize fun(self: LibSerialize, input: string): table

--- @class LibClassicDurations
--- @field RegisterFrame fun(self: LibClassicDurations, frame: string)
--- @field Register fun(self: LibClassicDurations, frame: string)
--- @field GetAuraDurationByUnit fun(self: LibClassicDurations, unit: string, spellId: number, source: string?, name: string?)

--- @class LibDeflate
--- @field CompressDeflate fun(self: LibDeflate, input: string, options: table): string
--- @field EncodeForPrint fun(self: LibDeflate, input: string): string)
Expand Down Expand Up @@ -444,7 +439,6 @@ do
}
if WeakAuras.IsClassicEra() then
tinsert(LibStubLibs, "LibClassicCasterino")
tinsert(LibStubLibs, "LibClassicDurations")
end
if WeakAuras.IsRetail() then
tinsert(LibStubLibs, "LibSpecialization")
Expand Down
2 changes: 1 addition & 1 deletion WeakAuras/WeakAuras.toc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
## DefaultState: Enabled
## LoadOnDemand: 0
## SavedVariables: WeakAurasSaved
## OptionalDeps: Ace3, LibCompress, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, Masque, GTFO, LibButtonGlow-1.0, LibSpellRange-1.0, LibRangeCheck-3.0, LibDBIcon-1.0, LibClassicDurations, LibClassicCasterino, LibGetFrame-1.0, LibSpecialization, !LibUIDropDownMenu, !!AddonLocale, BigWigs, DBM-Core
## OptionalDeps: Ace3, LibCompress, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, Masque, GTFO, LibButtonGlow-1.0, LibSpellRange-1.0, LibRangeCheck-3.0, LibDBIcon-1.0, LibClassicCasterino, LibGetFrame-1.0, LibSpecialization, !LibUIDropDownMenu, !!AddonLocale, BigWigs, DBM-Core

# External code + initialization
embeds.xml
Expand Down
3 changes: 1 addition & 2 deletions WeakAuras/WeakAuras_Vanilla.toc
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
## DefaultState: Enabled
## LoadOnDemand: 0
## SavedVariables: WeakAurasSaved
## OptionalDeps: Ace3, LibCompress, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, Masque, GTFO, LibButtonGlow-1.0, LibSpellRange-1.0, LibRangeCheck-3.0, LibDBIcon-1.0, LibClassicDurations, LibClassicCasterino, LibGetFrame-1.0, !LibUIDropDownMenu, !!AddonLocale, BigWigs, DBM-Core
## OptionalDeps: Ace3, LibCompress, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, Masque, GTFO, LibButtonGlow-1.0, LibSpellRange-1.0, LibRangeCheck-3.0, LibDBIcon-1.0, LibClassicCasterino, LibGetFrame-1.0, !LibUIDropDownMenu, !!AddonLocale, BigWigs, DBM-Core

# External code + initialization
embeds.xml

# Client flavor specific libs
Libs\LibClassicDurations\LibClassicDurations.xml
Libs\LibClassicCasterino\LibClassicCasterino.lua

Init.lua
Expand Down
2 changes: 1 addition & 1 deletion WeakAuras/WeakAuras_Wrath.toc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
## DefaultState: Enabled
## LoadOnDemand: 0
## SavedVariables: WeakAurasSaved
## OptionalDeps: Ace3, LibCompress, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, Masque, GTFO, LibButtonGlow-1.0, LibSpellRange-1.0, LibRangeCheck-3.0, LibDBIcon-1.0, LibClassicDurations, LibClassicCasterino, LibGetFrame-1.0, !LibUIDropDownMenu, !!AddonLocale, BigWigs, DBM-Core
## OptionalDeps: Ace3, LibCompress, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, Masque, GTFO, LibButtonGlow-1.0, LibSpellRange-1.0, LibRangeCheck-3.0, LibDBIcon-1.0, LibClassicCasterino, LibGetFrame-1.0, !LibUIDropDownMenu, !!AddonLocale, BigWigs, DBM-Core

# External code + initialization
embeds.xml
Expand Down