<<
path:
root/public/nswa.git/html/nswa_gossip.lua
blob: 42a6f3121dec842a9697cbc01c8b22df447758a6
[raw]
[clear marker]
2local frame = CreateFrame("Frame")
3frame:RegisterEvent("GOSSIP_SHOW")
5-- Note: We need instanceIDs not mapIDs. Because an instance can have multiple mapIDs!
6-- And whatever those IDs below are, they're wrong ...
8-- Keeping it in case I have to change it back.
9-- local allowed_zones = {
10-- 14032, -- Algethar Academy
11-- 15808, -- Windrunner Spire
12-- 15829, -- Magisters Terrace
13-- 16395, -- Maisara Caverns
14-- 16573, -- Nexus Point Xenas
15-- 4813, -- Pit of Saron
17-- 8910, -- The Seat of the Triumvirate
20local function select_first_gossip_option(self, event)
21 if not IsInInstance() then return end
23 local options = C_GossipInfo.GetOptions()
25 if options and #options == 1 then
26 C_Timer.After(0.1, function()
27 if not IsShiftKeyDown() then
28 C_GossipInfo.SelectOption(options[1].gossipOptionID)
31 print("NSWA - Info: Chosen the first gossip option.")
36frame:SetScript("OnEvent", select_first_gossip_option)