From dd20fad743a259f2884e368d4148d18e85e9bbac Mon Sep 17 00:00:00 2001 From: Alex Shubert Date: Fri, 9 Nov 2012 19:22:33 +0400 Subject: [PATCH] fixed Darkmoon bug that prevent games from start --- AutoTurnIn.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/AutoTurnIn.lua b/AutoTurnIn.lua index 39b7f1f..208cbc3 100644 --- a/AutoTurnIn.lua +++ b/AutoTurnIn.lua @@ -252,7 +252,7 @@ function AutoTurnIn:VarArgForAvailableQuests(...) end end -function AutoTurnIn:isDarkmoonAndAllowed() +function AutoTurnIn:isDarkmoonAndAllowed(questCount) return (self.DarkmoonAllowToProceed and questCount) and AutoTurnInCharacterDB.darkmoonautostart and (GetZoneText() == L["Darkmoon Island"]) @@ -273,13 +273,16 @@ function AutoTurnIn:GOSSIP_SHOW() SelectGossipOption(1) StaticPopup1Button1:Click() end + -- darkmoon fairy gossip sometime turns in quest too fast so I can't relay only on quest number count. It often lie. - self.DarkmoonAllowToProceed = true + -- this flag is set in VarArgForActiveQuests if any quest may be turned in + self.DarkmoonAllowToProceed = true local questCount = GetNumGossipActiveQuests() > 0 + self:VarArgForActiveQuests(GetGossipActiveQuests()) self:VarArgForAvailableQuests(GetGossipAvailableQuests()) - if self:isDarkmoonAndAllowed() then + if self:isDarkmoonAndAllowed(questCount) then local options = {GetGossipOptions()} for k, v in pairs(options) do if ((v ~= "gossip") and strfind(v, "|cFF0008E8%(")) then -- 1.7.9.5