Thread Tools Display Modes
02-10-12, 09:50 PM   #1
Gregity
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 54
QUEST_DETAIL event missing information

I'm working on QuestGuru and there is a section where it modifies the title to show the quest level whenever the QUEST_DETAIL event (which is the panel showing) occurs.

The problem is that the function calls to get data don't always return data.

Sometimes, the GossipAvailable functions return data (just one because there is only one on a detail), sometimes I can get the data from the NumActiveQuests (which is 1) and data thence from GetAvailableTitle(1) and GetAvailableLevel(1) and sometimes neither set returns a result. For examples that don't return anything, check out "Discover Rolf's Fate" given by the pile of bones (name="a half-eaton body") in response to a "cast" when you click on them and GoldTooth given by Billy Maclure

Is there another quest information function that I can use to get Quest information from the client based upon the Quest Name or perhaps the Quest ID? Are there other quest information functions I can use at the event?

GetTitleText() always return correctly & GetQuestID() returns the correct number for the quest (the ID, not the QLog Index) but as the quest is not in my quest log there isn't much I can do with it.
  Reply With Quote
02-10-12, 10:02 PM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,711
GetGossipAvailableQuests
Code:
local function getGossipLevel(index)
	return not not select(index * 2, GetGossipAvailableQuests())
end
I use similar functions in my newly released add-on Monomyth.

Last edited by p3lim : 02-10-12 at 10:04 PM.
  Reply With Quote
02-10-12, 10:24 PM   #3
Gregity
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 54
Providing GetGossipAvailableQuests() returns any data at all.

But as I said, it is returning nothing at all sometimes. GetNumGossipAvailableQuests() is returning zero.

On those QUEST_DETAIL panels which do follow a GOSSIP_SHOW, the GetGossipAvailableQuests() is fine, but when it comes from other paths, it returns nothing.

That's when I turned to the GetNumAvailableQuests() and it's cousins GetAvailableTitle() & GetAvailableLevel(). I thought I had it licked, then I ran into two (so far) questgivers that show a detail page and neither set of data is appearing. Crikey this makes HTML coding look consistent...

-g
  Reply With Quote
02-10-12, 11:17 PM   #4
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,711
Quests are shown in two different ways.
Either directly as a quest, or through gossips.

You'd have to support both in order for this to work.

The function I showed above works only with the gossip frames, while the GetAvailableLevel only works with the other.

Try watching for QUEST_GREETING and GOSSIP_SHOW, store the data there, before proceeding into QUEST_DETAIL, where you will commence your code to change the title.
  Reply With Quote
02-10-12, 11:58 PM   #5
Gregity
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 54
I don't think I'm communicating well.

What I'm saying is that I have found cases where NEITHER of them work.

I have every event related to Quests registered and I know, via chat messages, when each is invoked. Using /etrace and /framestack (see DevTools) I can see what events pop and what panels are shown.

Currently, I'm looking at a panel opened when I clicked on Billy Maclure and it is a <1> QuestFrame -> <2> QuestFrameDetailPanel -> <3> QuestDetailScrollFrame -> <4> QuestDetailScrollChildFrame stack.

The events, immediately after reloading are:
ADDON_LOADED
QUEST_DETAIL
--set 1
{GetGossipAvailableQuests()} gives an empty table (that is nothing returned)
GetNumGossipAvailableQuests() gives 0
--set 2
GetNumAvailableQuests gives 0
GetAvailableQuestTitle(1) gives nil
GetAvailableQuestLevel(1) gives 0
--other
GetQuestID gives 87 (which is the correct QuestID for "Goldtooth"
GetQuestTitle() give "Goldtooth"

That's it. Most everything else gives results with set 1 or set 2. At least two so far have given no data for either set 1 or set 2.

Last edited by Gregity : 02-11-12 at 12:03 AM. Reason: typo Chat->Quests
  Reply With Quote
02-11-12, 12:56 AM   #6
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,711
Just did a simple test myself
Code:
GOSSIP_SHOW: GetNumGossipAvailableQuests() returns 1
QUEST_DETAIL: GetNumGossipAvailableQuests() returns 1
QUEST_FINISHED: GetNumGossipAvailableQuests() returns 1

QUEST_GREETING: GetQuestLevel(1) returns 85
QUEST_DETAIL: GetQuestLevel(1) returns 85
QUEST_FINISHED: GetQuestLevel(1) returns 85

QUEST_DETAIL: GetQuestLevel(1) returns 0, GetNumGossipAvailableQuests() returns 0
QUEST_FINISHED: GetQuestLevel(1) returns 0, GetNumGossipAvailableQuests() returns 0

I see your issue, neither functions work if there is no QUEST_GREETING or GOSSIP_SHOW event.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » QUEST_DETAIL event missing information


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