Blizzard_GuildUI Loaded OnDemand
So I have an addon ( GuildRosterButtons ) that requires the loading on demand of the GuildUI in order to parent to the GuildFrame.
So calling the addon to load at the "PLAYER_LOGIN" event seems to be producing the issue of the guild level not being updated properly. I've played around with the 'GuildFrame_UpdateLevel()' implementation into my code, but I'm kind of curious as to why the guild level isn't updated properly. Is the player's guild info not available at the PLAYER_LOGIN event timing? That seems a bit odd. |
I've also had this problem before, with one of my addons
From my own experience:
On the first game session, GetGuildLevel already exists, however it only returns the correct value after the first iteration of OnUpdate Code:
LoadAddOn("Blizzard_GuildUI") -- no effect on GetGuildLevel Code:
local timeElapsed, iterations = 0, 0 |
If you're basing your addon off a LoD addon, I would suggest using the LoadWith tag in the ToC. This will make your addon LoD and can only reference another LoD addon. There are more details in ToC Format. This tag is supported as of patch 1.9.
|
.. sorry, my bad on the LoadWith tag :(
|
It's just a suggestion for the OP. I discovered the LoadWith tag while making a couple addons that added additional features to the existing TrainerUI. Mainly, I added a statusbar that displayed your profession's level if you were at a profession trainer, and I added a "Train All" button that trains everything available in one click.
|
Code:
local AfterButtons = CreateFrame("Frame", nil, UIParent) |
Thanks for the help and clarification!
I'll see what I can come up with. |
All times are GMT -6. The time now is 02:13 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI