Earlier Versions
Name | Size | Uploaded | Game Version | Downloads | |
0.3.7 +1 More release | 5.73 KB | Nov 19, 2020 | 9.0.2 | 0 | ![]() |
0.3.6 +1 More release | 5.74 KB | Oct 14, 2020 | 9.0.1 | 525 | ![]() |
0.3.5 +1 More release | 5.74 KB | Jul 11, 2020 | 8.3.0 | 468 | ![]() |
0.3.4 +1 More release | 5.74 KB | Jul 4, 2020 | 1.13.4 | 51 | ![]() |
0.3.3 +1 More release | 5.74 KB | Aug 6, 2018 | 8.0.1 | 1,306 | ![]() |
0.3.2 +1 More release | 5.77 KB | Sep 20, 2017 | 7.3.0 | 430 | ![]() |
0.3.2 +1 More release | 5.69 KB | Sep 8, 2017 | 7.3.0 | 305 | ![]() |
0.3.1 +1 More release | 5.75 KB | Aug 4, 2017 | 7.2.5 | 426 | ![]() |
0.3.0 +1 More release | 8.15 KB | Jul 25, 2016 | 7.0.3 | 1,745 | ![]() |
0.3.4-beta +1 More beta | 5.74 KB | Jul 4, 2020 | 1.13.4 | 14 | ![]() |
0.3.3-beta +1 More beta | 6.31 KB | Jul 29, 2018 | 8.0.1 | 76 | ![]() |
0.2.7-beta +1 More beta | 8.15 KB | Feb 27, 2015 | 6.1.0 | 143 | ![]() |
0.2.6-beta +1 More beta | 8.06 KB | Sep 17, 2013 | 5.4.0 | 140 | ![]() |
0.2.5-beta +1 More beta | 8.06 KB | May 26, 2013 | 5.3.0 | 72 | ![]() |
0.2.4-beta +1 More beta | 8.06 KB | Mar 13, 2013 | 5.2.0 | 210 | ![]() |
0.2.3-beta +1 More beta | 8.13 KB | Dec 19, 2012 | 5.1.0 | 81 | ![]() |
0.2.2-beta beta | 8.05 KB | Nov 28, 2012 | 5.1.0 | 96 | ![]() |
0.2.1-beta beta | 8.29 KB | Sep 5, 2012 | 5.0.4 | 82 | ![]() |
0.2-beta beta | 8.22 KB | Aug 30, 2012 | 5.0.4 | 75 | ![]() |
0.1.5-beta beta | 7.51 KB | Aug 29, 2012 | 5.0.4 | 47 | ![]() |
0.3.6-alpha +1 More alpha | 5.75 KB | Oct 13, 2020 | 9.0.1 | 7 | ![]() |
0.3.0-alpha +1 More alpha | 8.16 KB | Jul 23, 2016 | 7.0.3 | 65 | ![]() |
0.2.8-alpha +1 More alpha | 8.15 KB | Jun 28, 2015 | 6.2.0 | 61 | ![]() |
0.2.7-alpha +1 More alpha | 8.25 KB | Oct 16, 2014 | 6.0.2 | 70 | ![]() |
0.1.5-alpha alpha | 7.51 KB | Aug 29, 2012 | 5.0.4 | 33 | ![]() |
0.1.4-alpha alpha | 7.38 KB | Aug 28, 2012 | 5.0.4 | 28 | ![]() |
0.1.3-alpha alpha | 7.41 KB | Jan 14, 2012 | 4.3.0 | 88 | ![]() |
0.1.2-alpha +1 More alpha | 7.46 KB | Dec 4, 2011 | 4.3.0 | 68 | ![]() |
0.1.1-alpha +1 More alpha | 7.40 KB | Dec 4, 2011 | 4.3.0 | 40 | ![]() |
0.1-alpha +1 More alpha | 6.98 KB | Dec 2, 2011 | 4.3.0 | 66 | ![]() |
Description
The goal of this library is to provide a universal way to inspect players that doesn't compete with other addons. This library with achieve this by doing asynchronous requests.
In order to use the addon you will need to first load it as a library, then lib:AddHook('addonName', 'what', function(guid) YourFunction(guid, data); end); It will then only request the type of information for addons that have registered. For example what = items it will only run NotifyInspect() and get data.items , or what = {items,talents} then will return data.items and data.talents. 'what' will also include honor and arena information, and maybe more when I get in game and play around with it.
Then when you want to make a request lib:RequestData('what', target, force) or lib:RequestItems(target, force) where force will ignore cached data. It will return caninspect, cached, refreshing where CanInspect() is if fresh data is posable, cached is bool if there is cached information and refreshing is if a NotifyInspect() was sent out.
Speaking of cached data, the lib will store localy old inspect information. This will allow for faster retrevial. The max age that information will be stored is set by lib:MaxAge(seconds); where the lowest settng by any addon will win out.
The lib will try to not break the inspect window as well as try and fix a few issues in the default blizzard inspect.
Documentation
Supported Types
- all – use sparingly
- items – returns a table of items
- honor – not yet
- talents – not yet
- achivements – not yet
Methods
success = LibInspect:AddHook('MyAddon', type, function(guid, data, age) YourFunction(guid, data, age); end);
maxAge = LibInspect:SetMaxAge(seconds); default 1800
itemQuantity = LibInspect:SetRescan(items); default 10
caninspect, unitfound, refreshing = LibInspect:RequestData(type, target, force);
or LibInspect:Request_Type_(target, force) ex. LibInspect:RequestItems(…)
Callbacks/Hooks
When the data is ready you YourFunction(guid, data, age) will be called
guid = UnitGUID(); -- use this to tie it to the inspect request data = false; -- Nothing was found/error or date = { items = { 1 = itemLink, -- the result of GetInventoryItemLink("unit", 1); 2 = itemLink, ... 19 = itemLink, }, honor = ..., talents = ..., achivements = ..., }; age = ##; -- how old in seconds the data is
Add a comment