I got some issues with some UI update
1 Attachment(s)
Hi.
I am fairly new to making addons for WoW and started recently on a little project. Right now I try to get all the emissaries currently available to the character and I want to change the UI then a World Quest gets completed. My problem right now is, that I can't seem to get them to update... It tells me that it tries to get length of table but it's nil, even though I specifically declares it above the function that sets up the event listener. The event I am currently using is QUEST_POI_UPDATE, though I am not sure it's the right event for it either... The source code is attached. Any help is appreciated. |
The only event you watch for is QUEST_POI_UPDATE which doesn't fire when a WQ or EQ is completed.
QUEST_LOG_UPDATE will fire several times and returns no data. QUEST_TURNED_IN and QUEST_REMOVED will fire for the World Quest you just completed. QUEST_WATCH_UPDATE will fire a couple times but only returns a QuestIndex not a QuestID. I had the same kind of headache when writing my own quest tracker and the Quest Intern module for Executive Assistant. Saying that Blizzard doesn't make it easy is an understatement. You may want to keep an eye on QUEST_REMOVED and refresh the Emissaries then, at least the few brain cells awake at 2:30am tell me. |
Quote:
EDIT: I might have figured out, what I had done wrong... My UI was made of tables and the Emissary table was a parent table for the ui table, so when I reloaded the emissaries then the ui table would be removed in the process. EDIT 2: Nevermind... problem still persists :-/ |
What's 'getting nil'? (& post your updated code if you still need help :p )
|
1 Attachment(s)
Quote:
I haven't figured it out completely how to update the elements correctly after a World Quest get completed. I have attached my updated code below, where I tried to untangle the code a little bit, so the WQCompanion.Emissaries.ui has become WQCompanion.Emissaries and the emissaries are saved in their own local table. |
I'd run around with it and see what I can see but I'd need the rest of the package.
|
1 Attachment(s)
I have attached the folder as a zip file.
|
VincentSDSH is probably curious about the presence of DLU.
|
Quote:
|
1 Attachment(s)
Quote:
|
Damn, it is DKLevelup. I ran across that in a search and dismissed it as a false positive.
Thanks. Edit: Ok...I'm confused. Where is DLU.EmissaryCheck() defined? I couldn't find it in the .lua or in the DKLU package. When you first log in, var bounty is nil so no error and an empty table. If you reload, GetQuestBountyInfoForMapID() will return data to process and then it dies on the DLU.EmissaryCheck() call. I worked around that by defining the two vars but I'm still not seeing a per-se nil. It could be that GetQuestBountyInfoForMapID() is not ready to return EQ data when the event is triggered for the WQ completion; you might try setting a delay before you update rather than triggering immediately off the event, or at least verifying the data returned by GetQuestBountyInfoForMapID() when the event is triggered if you're not up to digging around in their UI code to see what they're up to with their EQ tracker. |
Quote:
I will try to look through some of the Blizzard Interface code and see, if I can figure out how they are doing it. |
All times are GMT -6. The time now is 04:09 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI