So my old macro that was working before the big patch was working fine to select NPC text, which made questing a lot faster, among other tasks, but it seems to be broken now. Does anyone know if the syntax was changed, or is it just broke temporarily?
C_GossipInfo.SelectOption()
no longer takes an index as its input. You need to supply the gossip ID (new in 10.0). C_GossipInfo.GetOptions()
with the gossip window open and you’ll see what I’m talking about.
I appreciate that. Where did you find that info so I know where to look from now on? I couldn’t find anything when i was searching.
I found out last night when I found that the logic in my addon that processes gossip for me wasn’t working when supplying an index.
I knew about the gossip ID from Beta, so I figured the function now only accepts that ID. The Wowpedia page on this subject hasn’t been updated yet.
So do you mean that each specific instance requires a unique ID to select vs a universal macro now? I tried /script C_GossipInfo.GetOptions(1) and it didn’t do anything in game. I tested it on the Katy Stampwhistle mailbox toy
C_GossipInfo.GetOptions()
doesn’t take input. And, yes, each gossip will need to take a unique ID.
Do you know how to get the IDs? I went and looked up GossipShow but it doesn’t give examples on how it works
GOSSIP_SHOW doesn’t have a payload. If that event fires, then you can safely assume you can fetch a gossip table. With the window open, the one showing gossip options, run /script C_GossipInfo.GetOptions()
or /dump C_GossipInfo.GetOptions()
and you’ll see the field representing the unique ID for any given gossip option.
Ok, the /dump is what worked. This is going to not be pleasant making a macro for each of these things like I’m used to. Hopefully someone can come up with a macro that doesn’t require a specific GossipID as this defeats the point of having macros to skip a lot of useless clicks. Thank you so much for the info
If you want to make it easier, use the code below.
local eventFrame = _G.CreateFrame("Frame")
eventFrame:RegisterEvent("GOSSIP_SHOW")
eventFrame:SetScript("OnEvent", function(self, event, ...)
if event == "GOSSIP_SHOW" then
local options = C_GossipInfo.GetOptions()
for index, option in ipairs(options) do
print(index .. ": " .. option.gossipOptionID)
end
end
end)
You’ll need to fix indentation, I’m sure. Also, the “option.gossipOptionID” may not be correct. I forget the name of the field off the top of my head, and I don’t have access to the game to confirm.
There’s also a fan-made update for the DialogKey addon, available for download on their GitHub. I’ve been told it does what you’re looking for.
https:/(/)github(.)com/gdurfee0/wow-dialogkey
I had to insert some parentheses to break the link since I can’t post them.
There’s now a function in GossipFrameSharedMixin that can still call by index, GossipFrame:SelectGossipOption(1)
for example.
/run C_GossipInfo.SelectOption(C_GossipInfo.GetOptions()[1].gossipOptionID)
maybe not elegant, but clicks the first gossip option