diff --git a/AutoTurnin.lua b/AutoTurnin.lua index 3395d8d..b6a272a 100644 --- a/AutoTurnin.lua +++ b/AutoTurnin.lua @@ -39,7 +39,7 @@ local p2 = { function AutoTurnIn:ConsoleComand(arg) if (#arg == 0) then - InterfaceOptionsFrame_OpenToCategory(AutoTurnInOptionsPanel) + InterfaceOptionsFrame_OpenToCategory(_G[addonName.."OptionsPanel"]) elseif arg == "on" then if (not AutoTurnInCharacterDB.enabled) then AutoTurnInCharacterDB.enabled = true @@ -78,17 +78,19 @@ function AutoTurnIn:GOSSIP_SHOW() if (gaq[i+3]) then local quest = L.quests[gaq[i]] if AutoTurnInCharacterDB.all or quest then - if quest and quest.amount then - local has = 0 - if quest.currency then - _, has = GetCurrencyInfo(quest.item) - else - has = GetItemCount(quest.item, nil, true) - end - if has > quest.amount then - SelectGossipActiveQuest(math.floor(i/4)+1) - return - end + if quest then + if quest.amount then + local has = 0 + if quest.currency then + _, has = GetCurrencyInfo(quest.item) + else + has = GetItemCount(quest.item, nil, true) + end + if has > quest.amount then + SelectGossipActiveQuest(math.floor(i/4)+1) + return + end + end else SelectGossipActiveQuest(math.floor(i/4)+1) return @@ -101,7 +103,8 @@ function AutoTurnIn:GOSSIP_SHOW() if (GetGossipAvailableQuests()) then gaq={GetGossipAvailableQuests()} for i=1, #gaq, 5 do - if AutoTurnInCharacterDB.all or L.quests[gaq[i]] then + local quest = L.quests[gaq[i]] + if AutoTurnInCharacterDB.all or (quest and (not quest.donotaccept)) then SelectGossipAvailableQuest(math.floor(i/5)+1) return end diff --git a/AutoTurnin.toc b/AutoTurnin.toc index f8cb0dc..88365f9 100644 --- a/AutoTurnin.toc +++ b/AutoTurnin.toc @@ -1,5 +1,5 @@ ## Interface: 40300 -## Title: AutoTurnin +## Title: AutoTurnIn ## Version: 1.0 ## Author: Lur ## Notes: Auto accepting and autocomplete daily quests diff --git a/localization_EN.lua b/localization_EN.lua index 64e3487..f2cac63 100644 --- a/localization_EN.lua +++ b/localization_EN.lua @@ -229,7 +229,7 @@ privateTable.L.quests = { ["Hounds of Shannox"]="", ["How Hot"]="", ["Into the Depths"]="", ---["Into the Fire"]="", +["Into the Fire"]={donotaccept=true}, ["Little Lasher"]="", ["Living Obsidium"]="", ["Mother's Malice"]="", @@ -254,7 +254,7 @@ privateTable.L.quests = { ["The Call of the Pack"]="", ["The Dogs of War"]="", ["The Flame Spider Queen"]="", ---["The Forlorn Spire"]="", +["The Forlorn Spire"]={donotaccept=true}, ["The Harder They Fall"]="", ["The Power of Malorne"]="", ["The Protectors of Hyjal"]="", diff --git a/localization_RU.lua b/localization_RU.lua index 9b4fdbd..c224d4a 100644 --- a/localization_RU.lua +++ b/localization_RU.lua @@ -234,7 +234,7 @@ privateTable.L.quests = { ["Брешь в обороне"]="", ["Буйная растительность"]="", ["В глубины"]="", ---["В огонь"]="", +["В огонь"]={donotaccept=true}, ["Волшебный огонек"]="", ["Враждебные стихии"]="", ["Вылечить раны"]="", @@ -267,7 +267,7 @@ privateTable.L.quests = { ["Огненные цветы"]="", ["Огненный плеточник"]="", ["Огонь в небе"]="", --- ["Одинокая башня"]="", +["Одинокая башня"]={donotaccept=true}, ["Опаленные крылья"]="", ["Орнитологический интерес"]="", ["Очень… Нужна… Вода…"]="",