
[Feature Request] AutoAccept Delve Gossips
nhtwolf opened this issue ยท 0 comments
Delves use a different API Call for their Gossip so the "TurnIn" function doesn't work for them. I believe I have corrected this with a few minor adjustments. There may be better ways but this seems to work for me.
New variables:
local C_GossipInfo_GetActiveDelveGossip = C_GossipInfo.GetActiveDelveGossip
local DELVE_STRING = "%(Delve%)"
Add Delve API to gossipOptions:
local gossipOptions = C_GossipInfo_GetOptions() or C_GossipInfo_GetActiveDelveGossip()
add new variable for invalidNameDelve and elseif for Delves
if instance ~= "raid" and not ignoreGossipNPC[npcID] and not ignoreInstances[mapID] then
local status = gossipOptions[1] and gossipOptions[1].status
local name = gossipOptions[1].name
local invalidName = name and strfind(name, "cFF0000FF") and not strfind(name, QUEST_STRING)
local invalidNameDelve = name and not strfind(name, DELVE_STRING)
if status and status == 0 and not invalidName then
return C_GossipInfo_SelectOption(firstGossipOptionID)
elseif status and status == 0 and not invalidNameDelve then
return C_GossipInfo_SelectOption(firstGossipOptionID)
end
end
Thanks for the Addon!