Skip to content

Commit

Permalink
Classic: Remove LibClassicDurations
Browse files Browse the repository at this point in the history
UnitAura returns duration info now.
  • Loading branch information
InfusOnWoW committed Dec 17, 2023
1 parent 3359811 commit 5bc5411
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 34 deletions.
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
6 changes: 0 additions & 6 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 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")
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

0 comments on commit 5bc5411

Please sign in to comment.