I don't see why you're always getting your talent info back, but there is one thing I did notice. I found that when trying to get the current talent info from another player I had to request a specific talent group from the player otherwise it always recalled the first spec.
Use GetActiveTalentGroup() to find out which spec they're using, then GetTalentTabInfo(tab,inspect,isPet,talentGroup).
I don't know how many people you tested with, but if their first spec is the same as yours, it may appear that you keep getting your spec back but you're not.
Also, my personal opinion is that if this lib is just a queuing system for talent inspections, I'd rather do it myself.
I don't know how many people you tested with, but if their first spec is the same as yours, it may appear that you keep getting your spec back but you're not.
I've been testing with a full 25 man raid. In many cases, the inspect target is a completely different class, and reporting an identical spec to mine (both tree names and points spent).
The only thing I can think of is that for whatever reason your inspect flag isn't getting set properly. Have you tried using a different (possible less elegant) method for setting that?
if (UnitIsUnit("player",name)) then
InspectFlag = false;
else
InspectFlag = true;
end
I'm also assuming that you're setting "playerName" someplace outside the function. Is it possible you're having a problem with variable scoping that's resulting in "playerName" always being nil inside the function?
The only thing I can think of is that for whatever reason your inspect flag isn't getting set properly. Have you tried using a different (possible less elegant) method for setting that?
if (UnitIsUnit("player",name)) then
InspectFlag = false;
else
InspectFlag = true;
end
I'm also assuming that you're setting "playerName" someplace outside the function. Is it possible you're having a problem with variable scoping that's resulting in "playerName" always being nil inside the function?
I've tried both ways, actually, and get the same result. I have verified that playerName is setup correctly.
Latest incarnation (r69) should be pretty stable now. I've not had a single invalid talent read since the last update. No crossed classes, no missing info.
It's designed to remove the need for mods to deal with the whole ask/answer queueing, timeing rescans, watching respecs and so on. It deals with all of it, and provides simple update events when something changes. With Blizzard API functions mapped into library which accept a unit ID argument. Plus some helpful functions to directly query talents by name.
I certainly like the idea... I will have to take a look at how the role is determined, if I like what I see I foresee a drastic simplification of GridDynamicLayout...
I've been using this library in my tooltip addon since BC, and it's always done this. Sometimes, and most of the time while in a raid, it doesn't pull up the talents no matter how long I wait. I'm likely "doing it wrong" or something.
I've been using this library in my tooltip addon since BC, and it's always done this. Sometimes, and most of the time while in a raid, it doesn't pull up the talents no matter how long I wait. I'm likely "doing it wrong" or something.
When I've seen this issue, it's been due to other AddOns also inspecting using their own system, and rescanning too often. If two or more scans are "in flight" at once, LTQ must assume the resulting talent read is bad, and thus it will discard it and re-queue the scan.
Check to see if you have other AddOns that call NotifyInspect(). If so, you could try disabling them to see if the problem persists. I've found that RaidBuffStatus (an otherwise very useful AddOn) can cause talent scan stalls if its option to scan weapon buffs is turned on, so I've turned that option off.
Alternately, see if another AddOn using LTQ has issues. You could try Utopia or Grid+GridStatusRole. Note that these use LibGroupTalents-1.0, a very useful companion library that uses LTQ for its queueing.
Sorry if this is in the wrong thread, but I couldn't find a thread about LibGroupTalents and I noticed a similar set of developers listed on the addons.
I'm new to using the WoW API, and I was wondering if someone could give me a brief rundown on how I might use LibGroupTalents+LibTalentQuery to find out whether a specific unit has a specific talent.
UnitHasTalent(unit, talentName[, group])
This seems to be exactly what I want, I'm just not sure how it works. Would something like:
In API documentation, square brackets are generally used to indicate that an argument, or a set of arguments, are optional. You don't actually use the brackets when calling the function.
Message: ...don\libs\LibGroupTalents-1.0\LibGroupTalents-1.0.lua:1585: attempt to call method 'GUIDHasTalent' (a nil value)
It's odd in that it seems like I'm able to actually access the UnitHasTalent function, but that function cannot then access the GUIDHasTalent function. I'm probably just setting the library up incorrectly. Any more tips pointing me in the right directly would be greatly appreciated!
I don't see why you're always getting your talent info back, but there is one thing I did notice. I found that when trying to get the current talent info from another player I had to request a specific talent group from the player otherwise it always recalled the first spec.
Use GetActiveTalentGroup() to find out which spec they're using, then GetTalentTabInfo(tab,inspect,isPet,talentGroup).
I don't know how many people you tested with, but if their first spec is the same as yours, it may appear that you keep getting your spec back but you're not.
Also, my personal opinion is that if this lib is just a queuing system for talent inspections, I'd rather do it myself.
The idea is so that other addons also looking at other peoples talents don't step on each other while doing so.
I've been testing with a full 25 man raid. In many cases, the inspect target is a completely different class, and reporting an identical spec to mine (both tree names and points spent).
The only thing I can think of is that for whatever reason your inspect flag isn't getting set properly. Have you tried using a different (possible less elegant) method for setting that?
I'm also assuming that you're setting "playerName" someplace outside the function. Is it possible you're having a problem with variable scoping that's resulting in "playerName" always being nil inside the function?
I've tried both ways, actually, and get the same result. I have verified that playerName is setup correctly.
I have indeed.
It's designed to remove the need for mods to deal with the whole ask/answer queueing, timeing rescans, watching respecs and so on. It deals with all of it, and provides simple update events when something changes. With Blizzard API functions mapped into library which accept a unit ID argument. Plus some helpful functions to directly query talents by name.
I use it in two separate addons, and have not had any trouble. Could you be more specific with the issues you're seeing?
When I've seen this issue, it's been due to other AddOns also inspecting using their own system, and rescanning too often. If two or more scans are "in flight" at once, LTQ must assume the resulting talent read is bad, and thus it will discard it and re-queue the scan.
Check to see if you have other AddOns that call NotifyInspect(). If so, you could try disabling them to see if the problem persists. I've found that RaidBuffStatus (an otherwise very useful AddOn) can cause talent scan stalls if its option to scan weapon buffs is turned on, so I've turned that option off.
Alternately, see if another AddOn using LTQ has issues. You could try Utopia or Grid+GridStatusRole. Note that these use LibGroupTalents-1.0, a very useful companion library that uses LTQ for its queueing.
I'm new to using the WoW API, and I was wondering if someone could give me a brief rundown on how I might use LibGroupTalents+LibTalentQuery to find out whether a specific unit has a specific talent.
UnitHasTalent(unit, talentName[, group])
This seems to be exactly what I want, I'm just not sure how it works. Would something like:
UnitHasTalent("party1", talentName["Black Arrow", "Survival"])
be accurate? Thanks in advance!
Documentation that reads:
UnitHasTalent(unit, talentName[, group])
Means that either of these will work:
UnitHasTalent(unit, talentName)
UnitHasTalent(unit, talentName, group)
I'm having trouble getting the libraries to work actually. I have them both in my .xml as:
Then in my main LUA I try:
and I get the following error:
It's odd in that it seems like I'm able to actually access the UnitHasTalent function, but that function cannot then access the GUIDHasTalent function. I'm probably just setting the library up incorrectly. Any more tips pointing me in the right directly would be greatly appreciated!
EDIT:
Solved
GroupTalents:UnitHasTalent(unitid, "Black Arrow", 2)