HasArtifactEquipped() not trigger on PLAYER_ENTERING_WORLD
Hi all,
I have coded to show in a LDB the artifact power instead the max level to accomplish this: http://www.wowinterface.com/download....html#comments Lua Code:
The problem is that if I don't use the: Lua Code:
on the first login it doesn't trigger Lua Code:
and so show only the level 110 info. If I do /reload everything is fine ... If I register also PLAYER_EQUIPMENT_CHANGED it works but I like to not add unnecessary events. So the question is :) ... Is possible that on PLAYER_ENTERING_WORLD I don't have yet the information about the equipped items ? Is there a more specific event than PLAYER_EQUIPMENT_CHANGED that I can register to check this ? Thanks to you all for the always precious help. |
PLAYER_EQUIPMENT_CHANGED is not an unnecessary event and you should use it to detect weapon swaps (which also happen when the player changes specializations and the game swaps the equipped artifact automatically).
The event at which equipped artifact data becomes initially available is UNIT_INVENTORY_CHANGED. |
The artifact data from what I can tell doesn't fire at login which is why I ended up using a timer and forcing a function call.
ie: Code:
local events_a = CreateFrame("Frame") |
I'm just doing it like this.
Code:
-- get artifact power data take a look here |
There is another event ARTIFACT_UPDATE. This fires after P_E_W when the client first gets artifact info, as well as whenever your artifact changes (relics equipped, traits bought, etc), or if you receive a new artifact.
|
Thanks all for the kind replies.
As usual this forum is so helpfull. Thanks all. |
@Gethe
ARTIFACT_UPDATE after PEW is caused by addons. You can't rely on it. |
All times are GMT -6. The time now is 09:30 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI