Skip to content

Commit

Permalink
Merge pull request #90 from GurliGebis/support-both-2-and-5
Browse files Browse the repository at this point in the history
Changes needed to be compatible with both 11.0.2 and 11.0.5
  • Loading branch information
GurliGebis authored Oct 22, 2024
2 parents 12027d0 + 4849057 commit c45e81b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 11.0.2-20241022-1
* Changes needed to be compatible with both 11.0.2 and 11.0.5 .

## 11.0.2-20241018-1
* Added The Severed Threads faction, patch provided by Roaming6424 on github.

Expand Down
16 changes: 9 additions & 7 deletions Modules/Data/DataModule.lua
Original file line number Diff line number Diff line change
Expand Up @@ -352,21 +352,23 @@ do
local hasFilters = ConfigModule:HasFilters()
local selectedFilters = ConfigModule:GetFilterTable()

local _, factionID = C_TaskQuest.GetQuestInfoByQuestID(info.questId)
local questTagInfo = C_QuestLog.GetQuestTagInfo(info.questId)
local tempQuestID = info.questID or info.questId

local _, factionID = C_TaskQuest.GetQuestInfoByQuestID(tempQuestID)
local questTagInfo = C_QuestLog.GetQuestTagInfo(tempQuestID)

if not questTagInfo then
return -- fix for nil tag
end

local tradeskillLineID = questTagInfo.tradeskillLineID
local timeLeftMinutes = C_TaskQuest.GetQuestTimeLeftMinutes(info.questId)
C_TaskQuest.RequestPreloadRewardData(info.questId)
local timeLeftMinutes = C_TaskQuest.GetQuestTimeLeftMinutes(tempQuestID)
C_TaskQuest.RequestPreloadRewardData(tempQuestID)

local isQuestFiltered = hasFilters

if hasFilters then
local lootFiltered = self:IsQuestRewardFiltered(selectedFilters, info.questId)
local lootFiltered = self:IsQuestRewardFiltered(selectedFilters, tempQuestID)
if lootFiltered ~= nil then
isQuestFiltered = lootFiltered
end
Expand Down Expand Up @@ -408,7 +410,7 @@ do
end

if selectedFilters.TRACKED then
if C_QuestLog.GetQuestWatchType(info.questId) == Enum.QuestWatchType.Manual or C_SuperTrack.GetSuperTrackedQuestID() == info.questId then
if C_QuestLog.GetQuestWatchType(tempQuestID) == Enum.QuestWatchType.Manual or C_SuperTrack.GetSuperTrackedQuestID() == tempQuestID then
isQuestFiltered = false
end
end
Expand Down Expand Up @@ -456,7 +458,7 @@ do
end

for _, bounty in ipairs(bounties) do
if bounty and not C_QuestLog.IsComplete(bounty.questID) and C_QuestLog.IsQuestCriteriaForBounty(info.questId, bounty.questID) and (bountyFilter == 0 or bountyFilter == bounty.questID) then
if bounty and not C_QuestLog.IsComplete(bounty.questID) and C_QuestLog.IsQuestCriteriaForBounty(tempQuestID, bounty.questID) and (bountyFilter == 0 or bountyFilter == bounty.questID) then
isQuestFiltered = false
end
end
Expand Down
17 changes: 9 additions & 8 deletions Modules/QuestFrame/QuestFrameModule.lua
Original file line number Diff line number Diff line change
Expand Up @@ -650,16 +650,17 @@ do

if taskInfo then
for _, info in ipairs(taskInfo) do
if HaveQuestData(info.questId) and QuestUtils_IsQuestWorldQuest(info.questId) then
local tempQuestID = info.questID or info.questId
if HaveQuestData(tempQuestID) and QuestUtils_IsQuestWorldQuest(tempQuestID) then
if WorldMap_DoesWorldQuestInfoPassFilters(info) then
local isFiltered = DataModule:IsQuestFiltered(info, mapID)
if not isFiltered then
if addedQuests[info.questId] == nil then
if addedQuests[tempQuestID] == nil then
local button = QuestFrameModule:QuestLog_AddQuestButton(info, searchBoxText)

if button ~= nil then
table.insert(usedButtons, button)
addedQuests[info.questId] = true
addedQuests[tempQuestID] = true
end
end
end
Expand Down Expand Up @@ -704,7 +705,7 @@ do
end

function QuestFrameModule:QuestLog_AddQuestButton(questInfo, searchBoxText)
local questID = questInfo.questId
local questID = questInfo.questID or questInfo.questId
local title, factionID, _ = C_TaskQuest.GetQuestInfoByQuestID(questID)
local questTagInfo = C_QuestLog.GetQuestTagInfo(questID)
local timeLeftMinutes = C_TaskQuest.GetQuestTimeLeftMinutes(questID)
Expand Down Expand Up @@ -956,17 +957,17 @@ do
end

local function ShouldShowQuest(self, info)
if self:IsQuestSuppressed(info.questId) then
if self:IsQuestSuppressed(info.questID) then
return false;
end

if self.focusedQuestID then
return C_QuestLog.IsQuestCalling(self.focusedQuestID) and self:ShouldSupertrackHighlightInfo(info.questId);
return C_QuestLog.IsQuestCalling(self.focusedQuestID) and self:ShouldSupertrackHighlightInfo(info.questID);
end

local mapID = self:GetMap():GetMapID()

if ConfigModule:Get("showHoveredPOI") and hoveredQuestID == info.questId then
if ConfigModule:Get("showHoveredPOI") and hoveredQuestID == info.questID then
return true
end

Expand All @@ -977,7 +978,7 @@ do
end

if ConfigModule:Get("hideUntrackedPOI") then
if not (WorldMap_IsWorldQuestEffectivelyTracked(info.questId)) then
if not (WorldMap_IsWorldQuestEffectivelyTracked(info.questID)) then
return false
end
end
Expand Down

0 comments on commit c45e81b

Please sign in to comment.