Description
A simple library to map runeboxes (and the new style pages) to their respective collectible. The list is hardcoded but has an easy way to keep it updated. And more importantly, addons can just depend on this and won't have to worry about all of these new things that might be added.
Note: this library is intended to only be used as a stand-alone. Including it in your addon defeats some of the purpose of having it in the first place.
API
The first two work for runeboxes, style pages (including bound/event versions) and runebox fragments.
Code:
LibRunebox:IsRuneboxCollected(runeboxItemId)
Returns true or false depending on the matching collectible state
Code:
LibRunebox:GetRuneboxCollectibleId(runeboxItemId)
Returns the collectible id belonging to the item
These two are for runeboxes and runebox fragments respectively
Code:
LibRunebox:GetRuneboxFragments(runeboxItemId)
Returns a table (not an array) with all seven fragments' item ids
Code:
LibRunebox:GetRuneboxForFragment(fragmentItemId)
Returns the runebox's item id for the fragment
Updating
If you, or your users, come across a runebox or similar item which is not supported by this library please post the exact item link (and as many relevant item links as possible) in the comments section so I can update it.