Thread Tools Display Modes
05/03/14, 09:36 AM   #1
Todo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 5
Waiting for an event

Hey guys,

I've been trying to improve my Addon by adding Guild Bank option. But I've been stuck with the lagging problem withing the guild bank. For the normal bank, I just use the cursor to move object rapidly. I assume by the event generated, that the game put everything I move in a buffer and then resolve everyhing.

But for the guild bank, you can't use cursor function (PickupInventoryItem/PlaceInInventory), you have to use TransferToGuildBank. This function perform directly the option and doesn't use a buffer in my opinion. So when I try to move my object, my code is so fast that it try to move another one before the first one has been moved. I've tryied to look at the events generated (thanks /zgoo events ), and I was right.
When the EVENT_GUILD_BANK_ITEMS_READY is pick up, I execute my algo. The first item got its order to go to the bank. Then the others get theirs orders too, which generate a bunch of EVENT_GUILD_BANK_TRANSFER_ERROR and finally the EVENT_GUILD_BANK_ITEM_ADDED.

My question is : Is it possible to freeze/wait our addon until a certain type of event is catch (in my case, I will want to wait the EVENT_GUILD_BANK_ITEM_ADDED to continue).
  Reply With Quote
05/03/14, 09:46 AM   #2
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 183
You can't wait for the event, you need to process the next item in the EVENT_GUILD_BANK_ITEM_ADDED event, not in a loop.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Waiting for an event


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off