View Single Post
06-23-16, 08:23 AM   #27
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
Originally Posted by kokomala View Post
Correct my tired mind though, but it looks like your bank scan doesn't actually activate as there is no event associated with scanning outside PEW, PEC and Force Update? Unless I'm mistaken, bank information is only available whilst the bank tabs are open, and during the first BANK_CLOSE event (neither of which you've registered).
I wasn't aware of that, will investigate further.

Originally Posted by kokomala View Post
* Traits can be purchased on artifacts that are not equipped, however you must be at the forge with the UI open. ie: open forge with equipped artifact, then shift+right click on unequipped artifact to change. I don't think you can do the same with the trait respeccing, however I haven't specifically tried to break the UI in that way.
That seems weird, I'll test this one too.

Originally Posted by kokomala View Post
* Relics are part of the ARTIFACT_UPDATE event. Your ARTIFACT_XP_UPDATE code is redundant in calling ScanTraits(), although this may be entirely based on event order received by the client. You may want to consider shifting thr callback into the main ARTIFACT_UPDATE event as part of your relic scan. Food for thought.
ARTIFACT_XP_UPDATE is fine. Both events fire when purchasing traits. However I don't need to scan all artifact data on AXU, and I can check if I need a traits scan there. Also I can inform about artifact power changes without extra API calls. The simple way would be to scan traits and relics on AU when its argument is false.

Originally Posted by kokomala View Post
Regarding your PEW delayed call:
I know that efficiency is a goal and understand the need to break out of the search loop, however if someone has an artifact in their bank you'll end up iterating over all their bag slots anyway. Have you considered using an arbitrary figure for numObtained that is purely used at login so that all bag slots are scanned only for login? Additionally, you're not unregistering your PEW event which only needs to fire once for the initial scan.

eg: local numObtained = GetNumObtainedArtifacts() or 10

Or some if then else variant.
A player could acquire 5 artifacts at most (4 druid specs and the fishing one). It is not a solution though, since bank info is still not there before visiting the bank.

Originally Posted by kokomala View Post
I'm not terribly worried about scanning artifacts that have just been obtained (PEC), as they basically have no data to begin with and the player buys the first trait at the forge early on. Everything else will get picked up.
I also use PEC to inform addons that the player changed their equipped artifact. This is useful for addons that only want to display what's equipped.