LibArtifactData-1.0

Libraries Login to Add Favorites
  • 1 Like
  • World of Warcraft
  • 2,238 Monthly Downloads
  • Supports: 7.2.0
  • 91,005 Total Downloads
  • Updated Mar 30, 2017
  • Created Jun 20, 2016
  • 43 Favorites
  • Project Site
  • Release Type: Release
  • License: GNU General Public License version 3 (GPLv3)
  • Newest File: 1.2

About LibArtifactData-1.0

Description

LibArtifactData-1.0 is a data store for addons that need the player's artifacts data. It has a simple API for data access and uses CallbackHandler-1.0 to propagate data changes.

Why to use

The stock UI provides much of the artifact data only when an artifact is viewed and only for that one artifact. If an addon requires that data prior to the player opening the Artifact UI, or for all artifacts at once, it has to unregister the events the UI uses (so that it doesn't tamper with other UI elements), simulate a shift-right click on the artifact, collect the data and then restore the default state. However this would make the ARTIFACTUPDATE event fire, upon which all addons listening to it will scan for data anew. This leads to duplicated efforts and possibly some pointless scans, since ARTIFACTUPDATE does not automatically mean that the data actually changed.

LibArtifactData-1.0 tries to leverage this behavior by keeping the data for all artifacts accessible all the time and informs interested addons about changes when they actually occur.

Limitations

Data about artifacts placed in the bank is not available until the player opens the bank. LibArtifactData-1.0 can detect such a case and inform addons that some of the data is missing.

Currently LibArtifactData-1.0 does not collect appearance data.

Feedback

If you have problems using the library, run into any issues or have a feature request, please use the issue tracker.

Further reading

  1. How to use
  2. API
  3. Events
  4. Data structure

tag ed7e65b9e244eb06570e76e19588057ba66f4ffe 1.2
Author:    Rainrider <[email protected]>
Date:    Fri Mar 31 01:24:30 2017 +0200

Version 1.2

Not compatible with 7.1!

commit 3e228e2c0c679c53553ad29f8292d85008f517a2
Author: Rainrider <[email protected]>
Date:   Fri Mar 31 01:21:26 2017 +0200

    Take ARTIFACT_CLOSE and ARTIFACT_MAX_RANKS_UPDATE into account

    Blizzard does not handle ARTIFACT_MAX_RANKS_UPDATE, but better safe than
    sorry

commit 45dc50f089d41179a87aa2f26e89617af0c9a2f6
Author: Rainrider <[email protected]>
Date:   Fri Mar 31 00:49:42 2017 +0200

    Exclude Underlight Angler when getting knowledge values

    It does not profit from nowledge level and multiplier and returns 0 and
    1 respectively

commit fb6c38dc0aab61bd9853754601b7936f59949ddf
Author: Rainrider <[email protected]>
Date:   Fri Mar 31 00:39:53 2017 +0200

    Don't try to scan locked relics

commit e07c5bfec3f74db71b0610c37521f47ed2075557
Author: Rainrider <[email protected]>
Date:   Fri Mar 31 00:34:27 2017 +0200

    Remove compatibility for patch 7.1

commit 751a27d48ac107c1edeee6824b7d3b2b2403ecf8
Author: Rainrider <[email protected]>
Date:   Fri Mar 31 00:07:13 2017 +0200

    Update for relics API changes