LibTalentQuery-1.0
Library to help with querying unit talents. There's many factors using the NotifyInspect() / INSPECT_TALENT_READY combo which will invalidate the results (spammy inspect addons, zoning, roster updates). This library helps by removing that layer of uncertainty and complexity from your addon to give a simple Query/Result to deal with.
Example Usage:
local TalentQuery = LibStub:GetLibrary("LibTalentQuery-1.0") TalentQuery.RegisterCallback(self, "TalentQuery_Ready") local raidTalents = {} ... TalentQuery:Query(unit) ... function MyAddon:TalentQuery_Ready(e, name, realm, unitid) local isnotplayer = not UnitIsUnit(unitid, "player") local group = GetActiveTalentGroup(isnotplayer) local spec = {} for tab = 1, GetNumTalentTabs(isnotplayer) do local _, treename, _, _, pointsspent = GetTalentTabInfo(tab, isnotplayer, nil, group) tinsert(spec, pointsspent) end raidTalents[UnitGUID(unitid)] = spec end
if (UnitGUID("target") == guid) then
return "target"
elseif (UnitGUID("focus") == guid) then
return "focus"
Should be:
if (UnitGUID("target") == guid) then
return "target"
elseif (UnitGUID("focus") == guid) then
return "focus"
elseif (UnitGUID("mouseover") == guid) then
return "mouseover"
LibTalentQuery-1.0-90075 (LibTalentQuery-1.0):283: Usage: UnitClass("unit")
LibTalentQuery-1.0-90075 (LibTalentQuery-1.0):283: in function <...ace\AddOns\LibTalentQuery-1.0\LibTalentQuery-1.0.lua:272>
(tail call): ?:
Just thought you would like to know. I don't know that it's messing anything up for me.
Should be:
return unit.."target"
and
return unit.."pettarget"
instead of:
return unit