feat: Release v1.3.2 — Taint Resolution & Stability patches
This commit is contained in:
@@ -14,12 +14,9 @@ local GetQuestIDFromLogIndex = QuestieCompat.GetQuestIDFromLogIndex
|
||||
|
||||
function Hooks:HookQuestLogTitle()
|
||||
Questie:Debug(Questie.DEBUG_DEVELOP, "[Hooks] Hooking Quest Log Title")
|
||||
local baseQLTB_OnClick = QuestLogTitleButton_OnClick
|
||||
|
||||
-- We can not use hooksecurefunc because this needs to be a pre-hook to work properly unfortunately
|
||||
QuestLogTitleButton_OnClick = function(self, button)
|
||||
hooksecurefunc("QuestLogTitleButton_OnClick", function(self, button)
|
||||
if (not self) or self.isHeader then
|
||||
baseQLTB_OnClick(self, button)
|
||||
return
|
||||
end
|
||||
|
||||
@@ -39,18 +36,19 @@ function Hooks:HookQuestLogTitle()
|
||||
ChatEdit_InsertLink(questLink)
|
||||
end
|
||||
QuestLog_SetSelection(questLogLineIndex)
|
||||
return
|
||||
-- We can't return here to stop the execution of the original function in hooksecurefunc,
|
||||
-- but for chat links the original function usually just selects the quest anyway.
|
||||
end
|
||||
|
||||
-- For all other clicks (including tracking/untracking), use the original function
|
||||
-- only call Questie's tracker if we actually want to fix this quest (normal quests already call AQW_insert)
|
||||
if Questie.db.profile.trackerEnabled and GetNumQuestLeaderBoards(questLogLineIndex) == 0 and (not IsQuestWatched(questLogLineIndex)) then
|
||||
QuestieTracker:AQW_Insert(questLogLineIndex, QUEST_WATCH_NO_EXPIRE)
|
||||
WatchFrame_Update()
|
||||
if WatchFrame_Update then
|
||||
WatchFrame_Update()
|
||||
end
|
||||
QuestLog_SetSelection(questLogLineIndex)
|
||||
QuestLog_Update()
|
||||
else
|
||||
baseQLTB_OnClick(self, button)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user