View Single Post
01-12-14, 04:35 PM   #13
Simca
An Aku'mai Servant
 
Simca's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2012
Posts: 33
I haven't yet, but I'm considering it because I believe I found the 'real problem'. Sometimes in 5.4.2, LOOT_OPENED fires twice in a row. I don't know the cause of the double loot events.

Example series of events and why I thought the problem was different at first:
>0 ms: Beginning
>300 ms: I right-click corpse, some related events fire
>500 ms: LOOT_OPENED fires, loot window appears to me (but it is empty!), addon code runs here (since it is empty, the GUID is nil)
>700 ms: LOOT_OPENED fires again, loot appears in the window, addon code runs again here (but my code fails my own verification checks since LOOT_OPENED already fired and variables were reset)
>1500 ms: I decide to close the loot window
>1501 ms: LOOT_CLOSED fires
>1502 ms: LOOT_CLOSED fires (yes, a second time)

To the user, nothing really will seem amiss except for a split second (could be extremely small window at low latency) where the window will be blank.

This behavior may not be limited to items either. Because of my reliance on the GUID, the addon can account for 'weird' scenarios for objects and NPCs by extracting the objectID or NPCID from the GUID (so it will fail on the first LOOT_OPENED, but LOOT_OPENED #2 will process successfully because it can reconstruct the preset variables, even though they were reset by the first event). Since item container GUIDs do not contain the itemID of the container, my code there is different and is only able to fire on the first LOOT_OPENED event, which is why I had a problem because I never expected a bug which caused 'blank' duplicate events.
__________________
Assistant admin for MMO-Champion
WoW database file expert - ask me anything

Last edited by Simca : 01-12-14 at 04:39 PM.
  Reply With Quote