Skip to content

Commit

Permalink
feat(Instance): Add Player:CheckDelveQuestProgress()
Browse files Browse the repository at this point in the history
- Just a potentially useful function for manual dumping. Not used otherwise. It's too big for a macro.
  • Loading branch information
Cilraaz committed Sep 29, 2024
1 parent ada0230 commit ef469db
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions HeroLib/Class/Unit/Player/Instance.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@ local Item = HL.Item
local GetInstanceInfo = GetInstanceInfo
-- Accepts: nil; Returns: name (string), instanceType (string), difficulty (number), difficultyName (string), maxPlayers (number),
-- playerDifficulty (number), isDynamicInstance (bool), instanceID (number), instanceGroupSize (number), lfgDungeonID (number)

-- C_PartyInfo locals
local IsDelveInProgress = C_PartyInfo.IsDelveInProgress
-- Accepts: nil; Returns: isDelveComplete (bool)

-- C_QuestLog locals
local GetTitleForQuestID = C_QuestLog.GetTitleForQuestID
-- Accepts: questID (number); Returns: title (string)
local IsQuestFlaggedCompleted = C_QuestLog.IsQuestFlaggedCompleted
-- Accepts: questID (number); Returns: isCompleted (bool)

-- lua locals

-- File Locals
Expand Down Expand Up @@ -65,3 +73,17 @@ end
function Player:IsInDelve()
return IsDelveInProgress()
end

-- Check Delve quest progress.
function Player:CheckDelveQuestProgress()
local QuestIDs = { 83758, 83759, 85648, 85649, 83766, 85664, 83769, 83767, 83768, 85667, 83771, 83770, 85666 }
for _, Quest in ipairs(QuestIDs) do
local QuestTitle = GetTitleForQuestID(Quest)
if not QuestTitle then
QuestTitle = GetTitleForQuestID(Quest)
end
local QuestComplete = IsQuestFlaggedCompleted(Quest)
local CompleteText = QuestComplete and "|cff00ff00Yes|r" or "|cffff0000No|r"
HL.Print(QuestTitle.." ("..Quest.."): "..CompleteText)
end
end

0 comments on commit ef469db

Please sign in to comment.