Skip to content

Commit

Permalink
Adding filter for Treatise that are completed this week. #24
Browse files Browse the repository at this point in the history
  • Loading branch information
cont1nuity committed Aug 31, 2024
1 parent f1b393a commit 8977589
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
15 changes: 15 additions & 0 deletions nop-data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions nop-item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8977589

Please sign in to comment.