Skip to content

Commit

Permalink
[Quests] AutoAccept for Wrath Classic
Browse files Browse the repository at this point in the history
  • Loading branch information
EsreverWoW committed Jan 18, 2023
1 parent 8ea1040 commit 73f59a2
Show file tree
Hide file tree
Showing 2 changed files with 304 additions and 49 deletions.
54 changes: 5 additions & 49 deletions ShestakUI/Modules/Quests/AutoAccept_Vanilla.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@ QuickQuest:SetScript("OnEvent", function(self, event, ...) self[event](...) end)
local QuickQuestDB = {
toggle = true,
items = true,
faireport = true,
gossip = true,
gossipraid = 1,
modifier = "SHIFT",
reverse = false,
share = false,
withered = true,
nomi = true,
}

local QuickQuestBlacklistDB = {
Expand Down Expand Up @@ -80,33 +77,19 @@ QuickQuest:Register("QUEST_GREETING", function()

local active = GetNumActiveQuests()
if(active > 0) then
local logQuests = GetQuestLogQuests(true)
for index = 1, active do
local name, complete = GetActiveTitle(index)
local _, complete = GetActiveTitle(index)
if(complete) then
local questID = logQuests[name]
if(not questID) then
SelectActiveQuest(index)
else
local _, _, worldQuest = GetQuestTagInfo(questID)
if(not worldQuest) then
SelectActiveQuest(index)
end
end
SelectActiveQuest(index)
end
end
end

local available = GetNumAvailableQuests()
if(available > 0) then
for index = 1, available do
local isTrivial, isIgnored
if T.Classic then
isTrivial = IsActiveQuestTrivial(index)
else
isTrivial, _, _, _, isIgnored = GetAvailableQuestInfo(index)
end
if(not isTrivial and not isIgnored) then
local isTrivial = IsActiveQuestTrivial(index)
if(not isTrivial) then
SelectAvailableQuest(index)
end
end
Expand Down Expand Up @@ -156,28 +139,13 @@ QuickQuest:Register("GOSSIP_SHOW", function()
local _, _, trivial, ignored = GetAvailableGossipQuestInfo(index)
if(not trivial and not ignored) then
SelectGossipAvailableQuest(index)
elseif(trivial and npcID == 64337 and QuickQuestDB.nomi) then
SelectGossipAvailableQuest(index)
end
end
end

if(available == 0 and active == 0 and GetNumGossipOptions() == 1) then
if(string.match((GetGossipOptions()), TRACKER_HEADER_PROVINGGROUNDS)) then
-- ignore proving grounds queue
return
end

if(QuickQuestDB.faireport) then
if(npcID == 57850) then
return SelectGossipOption(1)
end
end

if(QuickQuestDB.gossip) then
local _, instance, _, _, _, _, _, mapID = GetInstanceInfo()
if(QuickQuestDB.withered and instance == "scenario" and mapID == 1626) then return end

local _, instance = GetInstanceInfo()
if(instance == "raid" and QuickQuestDB.gossipraid > 0) then
if(GetNumGroupMembers() > 1 and QuickQuestDB.gossipraid < 2) then
return
Expand All @@ -191,18 +159,6 @@ QuickQuest:Register("GOSSIP_SHOW", function()
end
end)

local darkmoonNPC = {}

QuickQuest:Register("GOSSIP_CONFIRM", function(index)
if(not QuickQuestDB.faireport) then return end

local npcID = GetNPCID()
if(npcID and darkmoonNPC[npcID]) then
SelectGossipOption(index, "", true)
StaticPopup_Hide("GOSSIP_CONFIRM")
end
end)

QuestFrame:UnregisterEvent("QUEST_DETAIL")
QuickQuest:Register("QUEST_DETAIL", function(...)
if(not QuickQuestBlacklistDB[GetQuestID()]) then
Expand Down
Loading

0 comments on commit 73f59a2

Please sign in to comment.