Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Returns the available gossip options at a quest giver.
info = C_GossipInfo.GetOptions()
Returns[]
- info
- GossipOptionUIInfo[]
Field | Type | Description |
---|---|---|
gossipOptionID | number? | This can be nil to avoid automation
|
name | string | Text of the gossip item |
icon | number : fileID | Icon of the gossip type |
rewards | GossipOptionRewardInfo[] | |
status | Enum.GossipOptionStatus | |
spellID | number? | |
flags | number | |
overrideIconID | number? : fileID | |
selectOptionWhenOnlyOption | boolean | |
orderIndex | number |
Field | Type | Description |
---|---|---|
id | number | |
quantity | number | |
rewardType | Enum.GossipOptionRewardType |
Value | Field | Description |
---|---|---|
0 | Item | |
1 | Currency |
Value | Field | Description |
---|---|---|
0 | Available | |
1 | Unavailable | |
2 | Locked | |
3 | AlreadyComplete |
Details[]
Related Events | GOSSIP_SHOW |
Related API | C_GossipInfo.SelectOption C_GossipInfo.SelectOptionByIndex C_GossipInfo.SelectActiveQuest C_GossipInfo.SelectAvailableQuest |
Example[]
Prints gossip options and automatically selects the vendor gossip when e.g. at an innkeeper.
local function OnEvent(self, event)
local info = C_GossipInfo.GetOptions()
for i, v in pairs(info) do
print(i, v.icon, v.name, v.gossipOptionID)
if v.icon == 132060 then -- interface/gossipframe/vendorgossipicon.blp
print("Selecting vendor gossip option.")
C_GossipInfo.SelectOption(v.gossipOptionID)
end
end
end
local f = CreateFrame("Frame")
f:RegisterEvent("GOSSIP_SHOW")
f:SetScript("OnEvent", OnEvent)
Patch changes[]
Patch 10.0.7 (2023-03-21): Changed the gossipOptionID
field to be nilable.
Patch 10.0.0 (2022-10-25): Removed the type
field (banker, battlemaster, binder, gossip, healer, petition, tabard, taxi, trainer, unlearn, vendor, workorder, chatbubble). Added gossipOptionID, icon, flags, overrideIconID, selectOptionWhenOnlyOption, orderIndex
fields.
Patch 9.0.2 (2020-11-17): Added spellID
field.
Patch 9.0.1 (2020-10-13): Namespaced to C_GossipInfo.GetOptions()
and returns structured data.
Patch 1.0.0 (2004-10-08): Added as GetGossipOptions()