Questie

Questie

124M Downloads

Journey appends a quest abandonment only when the quest is not completed before

Laumesis opened this issue ยท 0 comments

commented

This might be low prioriy unintentional behavior.

"Quest Abandoned" are appended to journey only if the player has not yet completed the quest.
If a quest is repeatable, then a player can complete it once and take it again and abandon this time.

function QuestieJourney:AbandonQuest(questId)
-- Abandon Quest added to Journey
-- first check to see if the quest has been completed already or not
local skipAbandon = false
for i in ipairs(Questie.db.char.journey) do
local entry = Questie.db.char.journey[i]
if entry.Event == "Quest" then
if entry.Quest == questId then
if entry.SubType == "Complete" then
skipAbandon = true
end
end
end
end
if not skipAbandon then
---@type JourneyEntry
local entry = {
Event = "Quest",
SubType = "Abandon",
Quest = questId,
Level = QuestiePlayer:GetPlayerLevel(),
Timestamp = time()
}
tinsert(Questie.db.char.journey, entry)
end
end

v6.5.1