Logo

index : nswa

WoW addon which removes annoyances and adds QoL (for me)

  • summary
  • about
  • tree
  • log
  • branches
<< path: root/public/nswa.git/html/nswa_gossip.lua blob: 42a6f3121dec842a9697cbc01c8b22df447758a6 [raw] [clear marker]

        
0
1
2local frame = CreateFrame("Frame")
3frame:RegisterEvent("GOSSIP_SHOW")
4
5-- Note: We need instanceIDs not mapIDs. Because an instance can have multiple mapIDs!
6-- And whatever those IDs below are, they're wrong ...
7
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
16-- 6988, -- Skyreach
17-- 8910, -- The Seat of the Triumvirate
18-- }
19
20local function select_first_gossip_option(self, event)
21 if not IsInInstance() then return end
22
23 local options = C_GossipInfo.GetOptions()
24
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)
29 end
30 end)
31 print("NSWA - Info: Chosen the first gossip option.")
32 end
33end
34
35
36frame:SetScript("OnEvent", select_first_gossip_option)
37
38
Copyright 2026  E766CB298A6D1E64 | Git-Thing heavily inspired by cgit