Thread Tools Display Modes
07-07-12, 03:07 PM   #1
Gregity
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 54
Gossip_Show event fails to fire on reshow

The Gossip_Show event, which fires when a gossip window opens seems to not fire when..

I open the gossip window - event fires
Select a quest - quest detail fires
Accept quest - window closes, gossip window re-appears, no gossip_show event. The panel wasn't simply hidden as my updates to it are gone.

Can the base call to the gossip window (and the rest) be hooked? I've had a similar problem with non-NPC questgivers like bulliten boards where the event doesn't fire despite the window opening.

Any other ideas?

These inconssistencies are killing me.
-g
  Reply With Quote
07-07-12, 03:09 PM   #2
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Are there other events firing when you do this? You can do /eventtrace to see in real time which events fire.

As for the gossip frame showing, you could simply try hooking the OnShow function of the GossipFrame.
  Reply With Quote
07-07-12, 04:49 PM   #3
Gregity
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 54
fired or not?

@Haleth,

Thanks. I ran the event trace and it shows a GOSSIP_SHOW event, but neither my event handler nor my hook of the OnShow were called. Both my OnShow and my event handler were called for the first window opening, but not for the second....

I'll need to investigate why that was so.

Open to ideas.

-g
  Reply With Quote
07-07-12, 05:04 PM   #4
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
You might be able to use QUEST_ACCEPTED and check if GossipFrame is shown or not.
  Reply With Quote
07-07-12, 07:27 PM   #5
Gregity
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 54
Race condition

It's a race condition causing the problem.

The second GOSSIP_SHOW is called, and my routine is called.
The sequence is this:
I click on the NPC
GOSSIP_SHOW - fine, both quests are available, none active
I click on a quest
QUEST_DETAIL - fine shows me the detail of the clicked quest
I accept a quest, the window closes and immediately
GOSSIP_SHOW - my routine runs (correctly at that even)
QUEST_LOG_UPDATE - immediatly after my GOSSIP_SHOW ends
"The Screen Paints" - without the updates
I look and the updates to the quest title are gone

I then close & reopen the window and my routine again runs.

The problem is that something after GOSSIP_SHOW exits from me which overwrites the contents before I can see it. It's related to the accepting the quest and probably one of the following that occur after GOSSIP_SHOW:
UNIT_QUEST_LOG_CHANGED
QUEST_ACCEPTED
QUEST_LOG_UPDATE
I'm going to try hooking the GossipFrameUpdate() function and see where that gets me.

Any other ideas?

At worst I can put up an update timer for 1/2 second later or so and update the frame after making sure it's still open. Will that work or will I have to contrive to close/reopen the panel to get it to re-draw?
  Reply With Quote
07-07-12, 07:51 PM   #6
Gregity
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 54
Secured!

That was it. I hooksecurefunc("GossipFrameUpdate", A.HookedGossipFrameUpdate) with a print statement in it. Immediately after my GOSSIP_SHOW routine, I saw the message in the log about Quest Accepted: <blah blah> and then my tattle-tale message.

So I disabled my GOSSIP_SHOW event and from the hook called it and the routine performed twice with the end result that the message was updated correctly.

I'm going to try that on my non-npc quest detail issues as well.

Thanks for the ideas everyone!

-g
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Gossip_Show event fails to fire on reshow

Thread Tools
Display Modes

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