I am trying to use Gratuity for detecting temporary weapon buffs. The idea is simple - inspect other players weapon slots for phrases like "sharpened".
I tested the idea. I made a party of 2 then moved 95 yards apart. Worked perfectly. Then when trying in a raid in BT it would detect almost no one. I tried in heroic MT and it would only spot mine even when the entire group were within 10 yards. I tried in a raid in shatt and it seemed to have about 20 yards range but was unreliable as in it would not detect the other player until I inspected them.
I just don't understand what conditions it will work or not or how to detect if those conditions are met. Is there an inspect per second limit or a delay or a callback after calling G:SetInventoryItem(unit.unitid, v) before I can do G:Find(buff)?
I have seen there is an API for self inspection of temp wep buffs (GetWeaponEnchantInfo()) but I want to inspect others. To use that I would need a helper addon. Which seems a bit of an overkill. Any ideas?
I think the main problem is the new inspect system itself where you have to set the unit being inspected and such in order to have the client pull the needed information. I'm having some problems with that myself when trying to inspect all slots of a unit on mouseover :/
Try NotifyInspect(unit) before setting and accessing the tooltip, where unit would be a unit ID like PARTY3
I use the same strategy in my mod (MoBuffs) for detecting temp weapon buffs, and it worked quite well up until recently. I think they've changed the range somehow.
if _G.InspectFrame and _G.InspectFrame:IsShown() then
return -- can't inspect at same time as UI
end
if not CanInspect(unit.unitid) then
return
end
NotifyInspect(unit.unitid)
But why I don't know. And spamming the server with NotifyInspect() seems bad. But it works. I don't like code that I don't understand why it works. I am not registering the event so when it gets fired I ignore it.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I tested the idea. I made a party of 2 then moved 95 yards apart. Worked perfectly. Then when trying in a raid in BT it would detect almost no one. I tried in heroic MT and it would only spot mine even when the entire group were within 10 yards. I tried in a raid in shatt and it seemed to have about 20 yards range but was unreliable as in it would not detect the other player until I inspected them.
I just don't understand what conditions it will work or not or how to detect if those conditions are met. Is there an inspect per second limit or a delay or a callback after calling G:SetInventoryItem(unit.unitid, v) before I can do G:Find(buff)?
I have seen there is an API for self inspection of temp wep buffs (GetWeaponEnchantInfo()) but I want to inspect others. To use that I would need a helper addon. Which seems a bit of an overkill. Any ideas?
Try NotifyInspect(unit) before setting and accessing the tooltip, where unit would be a unit ID like PARTY3
I'll let you know if I find anything else out.
-Pach
Pach: Thanks. BTW I notice you are missing a couple:
L["^(Sharpened %(%+%d+ [^%)]+%+%d+ [^%)]+%))"], -- Sharpened (+xx Crit Rating and +xx Damage) [Adamantite Sharpening Stone] +14 and +12
L["^(Weighted %(%+%d+ [^%)]+%+%d+ [^%)]+%))"], -- Weighted (+xx Crit Rating and +xx Damage) [Adamantite Weightstone] +14 and +12
if _G.InspectFrame and _G.InspectFrame:IsShown() then
return -- can't inspect at same time as UI
end
if not CanInspect(unit.unitid) then
return
end
NotifyInspect(unit.unitid)
But why I don't know. And spamming the server with NotifyInspect() seems bad. But it works. I don't like code that I don't understand why it works. I am not registering the event so when it gets fired I ignore it.