Problem with reading guild bank content
Hello there,
i'm having issue with reading the guild bank content. Sometimes it works... Sometimes not... And i don't understand why ! That's make me crazy... I actually launch my code on two events. EVENT_GUILD_BANK_SELECTED This simply set a global variable to get the bankID. Code:
function LGBE:selectGuildBank(eventCode, guildBankId) Here is the main point. In my trace i see the bankID is correct. But it seems the GetItemName, GetItemType only return something the first time i launch this function... Code:
function LGBE:update() Anyone have a clue about this ? What i am doing wrong ? :confused: Best Regards. |
Coucou / Hello,
First, when EVENT_GUILD_BANK_SELECTED triggers, you don't have item list, this one can never be available (especially on large banks), For guild banks, EVENT_GUILD_BANK_ITEMS_READY triggers generally 3-4 times (depends on bank). you should make a flag to do not run your code multiple times. (add a little flag & delay). Lua Code:
Is not correct If slots are well ordered in bags, for banks et especially guild banks, the slots can be very different (consider always). If you want to iterate bank, I recommend you : Lua Code:
You can look at my updated roomba code if needed, I always comment a lot. https://www.dropbox.com/s/bmy3c7rtx0...stice.zip?dl=0 |
SHARED_INVENTORY does not work for you? In my opinion it is better way then using ZO_GuildBankBackpack.data.
You have to select guild bank first: Lua Code:
And then you can get cached guild bank items: Lua Code:
Item name is already in there, so you don't need to call GetItemName again. Lua Code:
|
Thanks for the infos.
@Ayantir About EVENT_GUILD_BANK_SELECTED i'm aware of it, i just use it to get the GuildID. I will get a test with the code you propose. :) @Garkin Thanks, i will look about this ! |
It seems to work now, have some to debug but it works now on second and third guild bank !
|
All times are GMT -6. The time now is 04:14 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI