Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Wowpedia
Advertisement

Returns the number of conversation options available with this NPC.

numOptions = C_GossipInfo.GetNumOptions()

Returns[]

numOptions
number

Details[]

Note
Note: This API is removed in Dragonflight since you can simply iterate over C_GossipInfo.GetOptions

Prints options info.

local options = C_GossipInfo.GetOptions()
for _, info in pairs(options) do
	print(info.name, info.gossipOptionID)
end

To e.g. select the first option.

local options = C_GossipInfo.GetOptions()
C_GossipInfo.SelectOption(options[1].gossipOptionID)

To get the amount of options.

local numOptions = #C_GossipInfo.GetOptions()

Patch changes[]

Shadowlands Patch 9.0.1 (2020-10-13): Moved to C_GossipInfo.GetNumOptions()
Bc icon Patch 2.3.0 (2007-11-13): Added as GetNumGossipOptions()

Details[]

  • This information is available when GOSSIP_SHOW event fires.
Advertisement