Help

LibTalentQuery-1.0

Libraries Login to Add Favorites
  • 1 Like
  • World of Warcraft
  • 44,316 Downloads
  • Supports: 4.0.1
  • 6 Average Daily Downloads
  • Comments
  • Created 3/30/2008 11:21:10 AM
  • Updated 10/18/2010 2:09:56 AM
  • 30 Favorites
  • Project Site
  • License: GNU Lesser General Public License version 2.1 (LGPLv2.1)
  • Release Type: Release
  • Newest File: 4.0 Release 1
or
Support development! **
Donate

About 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

------------------------------------------------------------------------
r88 | greltok | 2010-10-18 07:08:53 +0000 (Mon, 18 Oct 2010) | 1 line
Changed paths:
   A /tags/4.0 Release 1 (from /trunk:87)

Tagging as 4.0 Release 1
------------------------------------------------------------------------
r87 | greltok | 2010-10-17 04:35:37 +0000 (Sun, 17 Oct 2010) | 1 line
Changed paths:
   M /trunk/LibTalentQuery-1.0.toc

Removed unneeded no-lib-strip directive, as the .pkgmeta specifies enable-nolib-creation: no.
------------------------------------------------------------------------
r86 | greltok | 2010-10-16 09:02:29 +0000 (Sat, 16 Oct 2010) | 1 line
Changed paths:
   M /trunk/.pkgmeta
   D /trunk/CallbackHandler-1.0
   D /trunk/LibStub
   M /trunk/LibTalentQuery-1.0.lua
   M /trunk/LibTalentQuery-1.0.toc

Updated for 4.0.
------------------------------------------------------------------------

Addon Packs Containing This...

Comments

  • #7
    Update please, bugs other addons, heh
  • #5
    Hope this is the right place to post for this but I noticed that its not finding mouseover targets correctly. It looks like the function GuidToUnitID(guid) at line 112:
    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"
  • #6
    It's better to report issues on the development site (WoWAce, linked above). This bug report went unnoticed until now. At any rate, fixed in r84 - thanks for the report.
  • #4
    Ahh. ok. fixing.
  • #3
    Latest build is giving me this rather repeatedly:

    LibTalentQuery-1.0-90075 (LibTalentQuery-1.0):283: Usage: UnitClass("unit")
    LibTalentQuery-1.0-90075 (LibTalentQuery-1.0):283: in function
    (tail call): ?:

    Just thought you would like to know. I don't know that it's messing anything up for me.
  • #2
    Yeh, I corrected that some time ago now. Whole thing should be pretty robust now. Was somewhat flakey previously.
  • #1
    Found a bug in NameToUnitID lines 108 and 110.
    Should be:
    return unit.."target"
    and
    return unit.."pettarget"
    instead of:
    return unit
  • To post a comment, please login or register a new account.
Learn how to disable ads
Learn how to disable ads
Login to Curse

Don't have an account? Create One.

Get an epic experience with Curse Premium
  • Faster Addon Downloads
  • Premium-Only Beta Giveaways
  • Ad-Free Curse.com Experience
  • Premium Curse Client
  • and many More Features
  • Learn More »

Minecraft 3D Print Giveaway

Enter Now!