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
if _G.InspectFrame and _G.InspectFrame:IsShown() then
return -- can't inspect at same time as UI
if not CanInspect(unit.unitid) then
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.