Quantcast
Download
(10 Kb)
Download
Updated: 08/16/17 05:41 PM
Compatibility:
Horns of the Reach (3.1)
Updated:08/16/17 05:41 PM
Created:05/04/14 10:13 PM
Monthly downloads:50
Total downloads:3,748
Favorites:13
MD5:
3.1
LibFilters
Version: 2.0 r3.2
by: Randactyl, ingeniousclown
Description coming soon. See README.md on GitHub.
v2.0 r3.2 - Randactyl, sirinsidiator
- fixed filtering for refining, deconstructing, and improvement
- updated helper function for filtering research

v2.0 r3.1 - Randactyl
- fixed filtering for alchemy, enchanting, refining, deconstructing, and improvement
- updated minimum API version to 100020 (ESO 3.1.x, Horns of the Reach)

v2.0 r3.0 - Randactyl, Baertram
- disabled test file
- fixed handling of Enchantment additional filter
- support API version 100018 (ESO 2.7)
- add versioning to helper functions (r3.0 is incompatible with previous revisions due to this change)
- known issue: see https://github.com/Randactyl/LibFilters-2.0/issues/3

v2.0r2.3 - merlight, votan, sirinsidiator
- SafeUpdateList optimization

v2.0r2.2 - Randactyl
- extended safe list update to all variations of object:UpdateList(...)

v2.0r2.1 - Randactyl, Sirinsidiator, Baertram
- fixed insecure "UseItem" error which occurred in specific situations. See http://www.esoui.com/forums/showpost.php?p=28829&postcount=9

v2.0r2 - Randactyl
- see description or README.md

v1.0r16.1 - Baertram
- corrected alchemy updater

v1.0r16 - Randactyl
- added LAF_ALCHEMY
- removed safety check before hooking BACKPACK_GUILD_BANK_LAYOUT_FRAGMENT

v1.0r15.2 - Randactyl
- fixed broken guild bank filters by hooking a new inventory fragment added in 2.1: BACKPACK_GUILD_BANK_LAYOUT_FRAGMENT

v1.0r15.1 - Randactyl
- reverted previous forceUpdate change
- addons are now responsible for calling RequestInventoryUpdate(filterType). See readme for details

v1.0r15 - Circonian
- added new forceUpdate parameter to RegisterFilter and UnregisterFilter. See readme for details

v1.0r14.1 - Randactyl
- reduced inventory update defer time to 10ms from 40ms
- made inventory update request function local (you shouldn't be using it right now anyway)

v1.0r14 - Randactyl
- added LAF_FENCE and LAF_LAUNDER for filtering at the new Fence NPC scenes
- removed LAF_ENCHANTING as an alias of LAF_ENCHANTING_EXTRACTION

v1.0r13 - Randactyl
- removed "version" variable that was mistakenly left in after debugging
- exposed internal function as "libFilters:HookAdditionalFilter(filterType, inventory)" in order to improve compatibility between libFilters addons and addons that create custom inventory fragments. (Thanks for the request, Baertram)

v1.0r12 - Randactyl
- Changed version to 12 from 11.2 to get around LibStub limitation. No code changes.

v1.0r11.2 - merlight and Baertram
- revised GetCurrentLAF() to be more reliable
- added LAF_IMPROVEMENT for completeness

v1.0r11 - merlight and Randactyl
- more polish from merlight
-> registering and unregistering filters now works very similarly to registering and unregistering for events.
-> replaced LAF_ENCHANTING and LAF_ENCHANTING2 with LAF_ENCHANTING_EXTRACTION and LAF_ENCHANTING_CREATION, respectively. LAF_ENCHANTING is included for this revision as an alias of LAF_ENCHANTING_EXTRACTION in order to keep a bit of backwards compatibility without breaking everything.
- added function libFilters:GetCurrentLAF() so you can access exactly which LAF is currently being used and apply filters appropriately (used in Advanced Filters)

v1.0r10 - merlight and Baertram
- major revision from merlight
- addition of second enchanting filter by Baertram

Huge thanks to all of the work done by Baertram, circonian, and merlight for this version of the library. You guys rock

v1.0r9 - Randactyl
- include update provided by eShinobu

v1.0r8.1 - Randactyl
- Fixed enchanting support so it does not touch the creation panel.

v1.0r8 - Randactyl
- Added filtering for enchanting extraction. Another special case had to be added because extraction doesn't follow the exact same pattern as normal deconstruction.


v1.0r7
-More init logic fixes. Everything should finally be sorted out thanks to ckaotik.
-Error message when registering filters is now much less misleading.


v1.0r6
-Another fix to the initialization logic. As a result, you NO LONGER need to call "libFilters:InitializeLibFilters()" in your add-on loaded function; libFilters is now lazily initialized.


v1.0r5
-Fixed the initialization logic. As a result, you now need to call "libFilters:InitializeLibFilters()" in your add-on loaded function.
-Updated the API version, just in case.


v1.0r4
-Minor change to how the "already registered" error message shows up. Should no longer complain about duplicates from the init.


v1.0r3
-Changed the version format
-Better support for multiple different versions existing; this should have also fixed the errors that popped up sometimes on a reload when you have multiple addons using libFilters.
-Shop filters should be a little more reliable
-Fixed libFilters:BagIdToLAF


v1.0.0b
-Fix for nil value error.


v1.0.0
-Initial release
Archived Files (28)
File Name
Version
Size
Author
Date
2.0 r3.1
10kB
Randactyl
08/14/17 01:12 PM
2.0 r3.0
9kB
Randactyl
01/20/17 02:54 PM
2.0 r2.3
9kB
Randactyl
11/08/16 11:43 AM
2.0 r2.2
9kB
Randactyl
11/07/16 01:25 PM
2.0 r2.1
9kB
Randactyl
11/07/16 11:15 AM
2.0 r2
9kB
Randactyl
07/28/16 05:56 PM
1.0r16.1
5kB
Randactyl
01/18/16 08:12 PM
1.0r16
5kB
Randactyl
11/02/15 03:41 PM
1.0r15.2
5kB
Randactyl
08/30/15 12:48 PM
1.0r15.1
5kB
Randactyl
07/17/15 02:37 PM
1.0r15
5kB
Randactyl
07/16/15 06:25 PM
1.0r14.1
5kB
Randactyl
07/16/15 01:45 PM
1.0r14
4kB
Randactyl
03/06/15 04:24 PM
1.0r13
4kB
Randactyl
01/07/15 02:35 PM
1.0r12
4kB
Randactyl
12/03/14 05:28 PM
1.0r11.2
4kB
ingeniousclown
12/01/14 12:31 AM
1.0r11
4kB
ingeniousclown
11/30/14 12:20 AM
1.0r10
5kB
ingeniousclown
11/26/14 04:15 PM
1.0r9
4kB
ingeniousclown
11/03/14 10:22 AM
1.0r8.1
4kB
ingeniousclown
09/02/14 11:22 AM
1.0r8
4kB
ingeniousclown
08/15/14 12:31 PM
1.0r7
4kB
ingeniousclown
06/07/14 11:25 AM
1.0r6
47kB
ingeniousclown
06/06/14 08:24 PM
1.0r5
4kB
ingeniousclown
06/01/14 02:22 PM
1.0r4
4kB
ingeniousclown
05/18/14 02:38 PM
1.0r3
4kB
ingeniousclown
05/08/14 12:08 AM
1.0.0b
4kB
ingeniousclown
05/04/14 11:23 PM
1.0.0
4kB
ingeniousclown
05/04/14 10:13 PM


Post A Reply Comment Options
Unread 05/31/17, 08:50 PM  
SteveCampsOut
 
SteveCampsOut's Avatar

Forum posts: 11
File comments: 194
Uploads: 0
Originally Posted by Randactyl
Originally Posted by SteveCampsOut
Does this addon replace LibFilters-2.0 and should I remove that old one?
This is LibFilters-2.0. If you're not developing an addon, you probably shouldn't be messing with libraries
I think one of my addons required it at one time, don't really remember which one.
Report comment to moderator  
Reply With Quote
Unread 05/24/17, 11:12 PM  
Randactyl
 
Randactyl's Avatar
AddOn Author - Click to view AddOns

Forum posts: 253
File comments: 423
Uploads: 17
Originally Posted by SteveCampsOut
Does this addon replace LibFilters-2.0 and should I remove that old one?
This is LibFilters-2.0. If you're not developing an addon, you probably shouldn't be messing with libraries
__________________
Randactyl | NA Megaserver | Blood for the Pact! | Sun's Death, Chrysamere Pact

My Addons
Beta Addons
Check out my GitHub repos to follow my latest changes and see some addons before they are released.
Report comment to moderator  
Reply With Quote
Unread 05/24/17, 10:29 PM  
SteveCampsOut
 
SteveCampsOut's Avatar

Forum posts: 11
File comments: 194
Uploads: 0
Does this addon replace LibFilters-2.0 and should I remove that old one?
Report comment to moderator  
Reply With Quote
Unread 11/19/16, 01:19 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1261
File comments: 1197
Uploads: 43
Found a bug in libFilters 2.3

The enchantment creation panel is not filtering anymore and the enchantment extraction panel will not work properly sometimes. I guess it is because of the craftbag additions to the standard filters.

if you remove the special treatment for enchantment (removing the "already given additionalFilters" for enchantment) from function LibFilters:HookAdditionalFilter it works properly again!

New function:
Lua Code:
  1. function LibFilters:HookAdditionalFilter(filterType, inventory)
  2.     local layoutData = inventory.layoutData or inventory
  3.     local originalFilter = layoutData.additionalFilter
  4.  
  5.     layoutData.LibFilters2_filterType = filterType
  6.  
  7.     if type(originalFilter) == "function" then
  8.         layoutData.additionalFilter = function(...)
  9. --[[
  10.             --for enchanting
  11.             if (filterType == LF_ENCHANTING_CREATION or filterType == LF_ENCHANTING_EXTRACTION) then
  12.                 return originalFilter(...) and runFilters(filterType, ...)
  13.             end
  14. ]]
  15.             return originalFilter(...) and runFilters(filterType, ...)
  16.         end
  17.     else
  18.         layoutData.additionalFilter = function(...)
  19.             return runFilters(filterType, ...)
  20.         end
  21.     end
  22. end
Report comment to moderator  
Reply With Quote
Unread 11/13/16, 04:57 PM  
Randactyl
 
Randactyl's Avatar
AddOn Author - Click to view AddOns

Forum posts: 253
File comments: 423
Uploads: 17
No work has been done to specifically support gamepad mode yet. It is a priority when I get back into full dev mode again.
__________________
Randactyl | NA Megaserver | Blood for the Pact! | Sun's Death, Chrysamere Pact

My Addons
Beta Addons
Check out my GitHub repos to follow my latest changes and see some addons before they are released.
Report comment to moderator  
Reply With Quote
Unread 11/08/16, 09:49 PM  
Architecture
 
Architecture's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 46
Uploads: 7
Does this support Gamepad mode as well?
Report comment to moderator  
Reply With Quote
Unread 11/21/15, 02:00 PM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1261
File comments: 1197
Uploads: 43
You've chosen the wrong "refresh" function for the alchemy panel. The correct one should be :HandleDirtyEvent()


Code:
local inventoryUpdaters = {
	BACKPACK = function()
		PLAYER_INVENTORY:UpdateList(INVENTORY_BACKPACK)
	end,
	BANK = function()
		PLAYER_INVENTORY:UpdateList(INVENTORY_BANK)
	end,
	GUILD_BANK = function()
		PLAYER_INVENTORY:UpdateList(INVENTORY_GUILD_BANK)
	end,
	DECONSTRUCTION = function()
		SMITHING.deconstructionPanel.inventory:HandleDirtyEvent()
	end,
	IMPROVEMENT = function()
		SMITHING.improvementPanel.inventory:HandleDirtyEvent()
	end,
	ENCHANTING = function()
		ENCHANTING.inventory:HandleDirtyEvent()
	end,
	ALCHEMY = function()
		ALCHEMY.inventory:HandleDirtyEvent()
	end,
}
If you change it everything works as it should.

I'll update libFilters ONLY inside FCOItemSaver (and FCOCraftFilters) to version 16.1.
Please update the library afterwards officially to 16.1 with the one line changed to :HandleDirtyEvent()

Many thanks!

Baertram
Report comment to moderator  
Reply With Quote
Unread 08/31/15, 04:15 PM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1261
File comments: 1197
Uploads: 43
Ok, thanks for informing me.

Originally Posted by Randactyl
Originally Posted by Baertram
I'll wait with my updates until 2.1 is live in the eu servers then and the safety check is removed again :-)
I'm probably not going to remove it until there is another reason to edit the library - it's just a simple if statement.
Report comment to moderator  
Reply With Quote
Unread 08/30/15, 06:43 PM  
Randactyl
 
Randactyl's Avatar
AddOn Author - Click to view AddOns

Forum posts: 253
File comments: 423
Uploads: 17
Originally Posted by Baertram
I'll wait with my updates until 2.1 is live in the eu servers then and the safety check is removed again :-)
I'm probably not going to remove it until there is another reason to edit the library - it's just a simple if statement.
__________________
Randactyl | NA Megaserver | Blood for the Pact! | Sun's Death, Chrysamere Pact

My Addons
Beta Addons
Check out my GitHub repos to follow my latest changes and see some addons before they are released.
Report comment to moderator  
Reply With Quote
Unread 08/30/15, 03:00 PM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1261
File comments: 1197
Uploads: 43
I'll wait with my updates until 2.1 is live in the eu servers then and the safety check is removed again :-)
Report comment to moderator  
Reply With Quote
Unread 08/29/15, 10:25 PM  
Randactyl
 
Randactyl's Avatar
AddOn Author - Click to view AddOns

Forum posts: 253
File comments: 423
Uploads: 17
Originally Posted by merlight
Maybe wrap it in a safety check. There's going to be the usual US<>EU version mismatch till Tuesday...
ragh stupid different patch times! I'll reupload.

edit: reuploaded
__________________
Randactyl | NA Megaserver | Blood for the Pact! | Sun's Death, Chrysamere Pact

My Addons
Beta Addons
Check out my GitHub repos to follow my latest changes and see some addons before they are released.
Last edited by Randactyl : 08/30/15 at 12:50 PM.
Report comment to moderator  
Reply With Quote
Unread 08/29/15, 06:32 PM  
merlight
AddOn Author - Click to view AddOns

Forum posts: 645
File comments: 208
Uploads: 12
Maybe wrap it in a safety check. There's going to be the usual US<>EU version mismatch till Tuesday...
Report comment to moderator  
Reply With Quote
Unread 08/29/15, 02:38 PM  
Randactyl
 
Randactyl's Avatar
AddOn Author - Click to view AddOns

Forum posts: 253
File comments: 423
Uploads: 17
15.2 fixes guild bank filtering in ESO 2.1.x. There are no API changes.

15.2 DOES NOT work on 2.0.x, since the new fragment being hooked does not exist. Should wait until maintenance on Monday to push updates.
__________________
Randactyl | NA Megaserver | Blood for the Pact! | Sun's Death, Chrysamere Pact

My Addons
Beta Addons
Check out my GitHub repos to follow my latest changes and see some addons before they are released.
Report comment to moderator  
Reply With Quote
Unread 07/17/15, 02:20 PM  
merlight
AddOn Author - Click to view AddOns

Forum posts: 645
File comments: 208
Uploads: 12
If you think that cost isn't low enough, here's another possible optimization without changing the API.

Just tried the previous timing with 260k calls - was about 500-700ms. With this once-per-frame optimization, it's around 80-120ms! That's 0.5us per call... not much to be gained by the added parameter. Well unless I'm timing it wrong

Lua Code:
  1. local lastInvUpdReq = {}
  2.  
  3. function libFilters:RequestInventoryUpdate( filterType )
  4.     local currentTime = GetFrameTimeMilliseconds()
  5.     if lastInvUpdReq[filterType] == currentTime then
  6.         return
  7.     else
  8.         lastInvUpdReq[filterType] = currentTime
  9.     end
  10.  
  11.     local updaterName = filterTypeToUpdaterName[filterType]
  12.     local callbackName = "libFilters_updateInventory_" .. updaterName
  13.     -- cancel previously scheduled update if any
  14.     EVENT_MANAGER:UnregisterForUpdate(callbackName)
  15.     -- register a new one
  16.     EVENT_MANAGER:RegisterForUpdate(callbackName, 10, function()
  17.         EVENT_MANAGER:UnregisterForUpdate(callbackName)
  18.         inventoryUpdaters[updaterName]()
  19.     end)
  20. end
Last edited by merlight : 07/17/15 at 02:49 PM.
Report comment to moderator  
Reply With Quote
Unread 07/17/15, 10:32 AM  
merlight
AddOn Author - Click to view AddOns

Forum posts: 645
File comments: 208
Uploads: 12
So I was curious how costly RequestInventoryUpdate actually is. For me 13000 calls took between 27 to 63 milliseconds.

Warning: Spoiler
Last edited by merlight : 07/17/15 at 02:10 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: