Skip to content

Commit

Permalink
add role filters
Browse files Browse the repository at this point in the history
napnapnapnap committed Jun 11, 2021
1 parent 969ff55 commit a0dbb76
Showing 11 changed files with 1,889 additions and 43 deletions.
3 changes: 2 additions & 1 deletion BLT/BLT.toc
Original file line number Diff line number Diff line change
@@ -2,11 +2,12 @@
## Title: BLT
## Notes: Tracks specific cooldowns of players in a raid/party
## Version: 1.3.2
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, LibDualSpec-1.0
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, LibTalentQuery-1.0, LibGroupTalents-1.0, LibDualSpec-1.0
## SavedVariables: BLT_DB

#@no-lib-strip@
embeds.xml
libs\LibTalentQuery-1.0\lib.xml
#@end-no-lib-strip@

locale\enUS.lua
6 changes: 6 additions & 0 deletions BLT/Backend.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
local BLT = LibStub("AceAddon-3.0"):NewAddon("BLT", "AceConsole-3.0", "AceTimer-3.0", "AceEvent-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("BLT")
local TalentQuery = LibStub:GetLibrary("LibTalentQuery-1.0")
local LibGroupTalents = LibStub("LibGroupTalents-1.0")

local select, pairs, ipairs, next = _G.select, _G.pairs, _G.ipairs, _G.next
local tinsert, tremove, tconcat, twipe = table.insert, table.remove, table.concat, table.wipe
@@ -32,6 +33,7 @@ BLT.playerLevel = {}
BLT.playerEquipment = {}
BLT.playerTalentPoints = {}
BLT.playerTalentsSpecced = {}
BLT.playerRole = {}
BLT.playerGlyphs = {}
BLT.specificTalents = {
["DEATHKNIGHT"] = {
@@ -241,6 +243,8 @@ function BLT:TalentQuery_Ready(e, name, r, unitId)
self.playerLevel[name] = unitTargetLevel
self.playerTalentPoints[name] = x .. "/" .. y .. "/" .. z
self.playerTalentsSpecced[name] = {}
self.playerRole[name] = LibGroupTalents:GetUnitRole(name)

if next(playerTalents) ~= nil then
self.playerTalentsSpecced[name] = playerTalents
end
@@ -326,6 +330,7 @@ function BLT:ClearLists()
clearList(self.playerTalentPoints)
clearList(self.playerTalentsSpecced)
clearList(self.playerEquipment)
clearList(self.playerRole)
clearList(inspectedUnits)
self:Print(L["All data cleared!"])
end
@@ -338,5 +343,6 @@ function BLT:RemoveUnitFromTables(unit)
self.playerTalentPoints[unitName] = nil
self.playerTalentsSpecced[unitName] = nil
self.playerEquipment[unitName] = nil
self.playerRole[unitName] = nil
removeFirst(inspectedUnits,unitName)
end
20 changes: 19 additions & 1 deletion BLT/Config.lua
Original file line number Diff line number Diff line change
@@ -168,7 +168,25 @@ BLT.options = {
end
end,
order = 9
}
},
healerOnlyCD = {
type = "toggle",
name = L["Show only healer cooldowns"],
desc = L["Display healing cooldowns only for healers"],
get = get,
set = set,
width = "full",
order = 10
},
tankOnlyCD = {
type = "toggle",
name = L["Show only tank cooldowns"],
desc = L["Display defensive cooldowns only for tanks"],
get = get,
set = set,
width = "full",
order = 11
},
}
},
show = {
Loading

0 comments on commit a0dbb76

Please sign in to comment.