diff --git a/nop-data.lua b/nop-data.lua index e7fae1b..abbb570 100644 --- a/nop-data.lua +++ b/nop-data.lua @@ -42,6 +42,21 @@ local VALDRAKKEN = P.VALDRAKKEN; assert(VALDRAKKEN ~= nil,'VALDRAKKEN') --local LOAMM = P.LOAMM; assert(LOAMM ~= nil,'LOAMM') local ISKAARA = P.ISKAARA; assert(ISKAARA ~= nil,'ISKAARA') -- +NOP.T_ITEM_REQUIRE_QUEST_NOT_COMPLETED = { -- [itemID] = questID, entries where questID needs to be not completed + [222548] = 83730, -- Algari Treatise on Inscription + [222554] = 83726, -- Algari Treatise on Blacksmithing + [222552] = 83729, -- Algari Treatise on Herbalism + [222546] = 83725, -- Algari Treatise on Alchemy + [222553] = 83733, -- Algari Treatise on Mining + [222547] = 83735, -- Algari Treatise on Tailoring + [222621] = 83728, -- Algari Treatise on Engineering + [222550] = 83727, -- Algari Treatise on Enchanting + [222649] = 83734, -- Algari Treatise on Skinning + [222551] = 83731, -- Algari Treatise on Jewelcrafting + [222549] = 83732, -- Algari Treatise on Leatherworking + + -- [itemID] = questID, -- +} NOP.T_INSTA_WQ = { -- [spellID] = itemID, list of OH advancements and spells for instant completion non-elite WQ [221602] = 140038, -- Might of Dalaran [221587] = 140155, -- Vanguard of the Silver Hand diff --git a/nop-item.lua b/nop-item.lua index 95f72b5..e8c5273 100644 --- a/nop-item.lua +++ b/nop-item.lua @@ -37,6 +37,7 @@ local T_CHECK = P.T_CHECK; assert(T_CHECK ~= nil,'T_CHECK') local T_OPEN = P.T_OPEN; assert(T_OPEN ~= nil,'T_OPEN') local T_RECIPES_FIND = P.T_RECIPES_FIND; assert(T_RECIPES_FIND ~= nil,'T_RECIPES_FIND') local T_SPELL_FIND = P.T_SPELL_FIND; assert(T_SPELL_FIND ~= nil,'T_SPELL_FIND') +local T_ITEM_REQUIRE_QUEST_NOT_COMPLETED = NOP.T_ITEM_REQUIRE_QUEST_NOT_COMPLETED; assert(T_ITEM_REQUIRE_QUEST_NOT_COMPLETED ~= nil,'T_ITEM_REQUIRE_QUEST_NOT_COMPLETED') local T_USE = P.T_USE; assert(T_USE ~= nil,'T_USE') local print = P.print; assert(print ~= nil,'print') local TIMER_IDLE = P.TIMER_IDLE; assert(TIMER_IDLE ~= nil,'TIMER_IDLE') @@ -171,6 +172,11 @@ end local offset = 0 function NOP:ItemToUse(itemID,count,prio,zone,map,aura,source) -- store item into table self:Verbose("ItemToUse:","itemID",itemID,"count",count,"prio",prio,"zone",zone,"map",map,"aura",aura,"source",source) + --check required quest + local quest = T_ITEM_REQUIRE_QUEST_NOT_COMPLETED[itemID] + if quest and C_QuestLog.IsQuestFlaggedCompleted(quest) then + return --don't show this item anymore + end local pt = T_USE[itemID] if not pt then -- new item if (self.BF and self.BF.showID == nil) and (itemID == self.AceDB.char.itemID) then -- first time looking for item then get last item from last session