diff --git a/Achievements.lua b/Achievements.lua index 619cb93..f246d6d 100644 --- a/Achievements.lua +++ b/Achievements.lua @@ -132,13 +132,13 @@ function WQA.Achievements:Register_MISSION_TABLE(achievement, index, criteriaQue if achievement.criteria and achievement.criteria[index] then if type(achievement.criteria[index]) == "table" then - for _, questId in pairs(achievement.criteria[index]) do - WQA:AddRewardToMission(questId, "ACHIEVEMENT", id) + for _, questID in pairs(achievement.criteria[index]) do + WQA:AddRewardToMission(questID, "ACHIEVEMENT", id) end else - local questId = achievement.criteria[index] - if questId then - WQA:AddRewardToMission(questId, "ACHIEVEMENT", id) + local questID = achievement.criteria[index] + if questID then + WQA:AddRewardToMission(questID, "ACHIEVEMENT", id) end end else diff --git a/Options.lua b/Options.lua index c78562d..b43e17b 100644 --- a/Options.lua +++ b/Options.lua @@ -526,8 +526,8 @@ function WQA:UpdateOptions() end, disabled = function() local mapId = self.data.custom.mapID - local questId = self.data.custom.wqID - return (questId == nil or questId == "") or + local questID = self.data.custom.wqID + return (questID == nil or questID == "") or (self.data.custom.questType == "QUEST_PIN" and (mapId == nil or mapId == "")) end }, diff --git a/WQAchievements.lua b/WQAchievements.lua index 7285298..3f0095d 100644 --- a/WQAchievements.lua +++ b/WQAchievements.lua @@ -184,10 +184,10 @@ function WQA:OnEnable() for i = 1, #self.ZoneIDList do for _, mapID in pairs(self.ZoneIDList[i]) do if self.db.profile.options.zone[mapID] == true then - local quests = C_TaskQuest.GetQuestsForPlayerByMapID(mapID) + local quests = C_TaskQuest.GetQuestsOnMap(mapID) if quests then for j = 1, #quests do - local questID = quests[j].questId + local questID = quests[j].questID local numQuestRewards = GetNumQuestLogRewards(questID) if numQuestRewards > 0 then GetQuestLogRewardInfo(1, questID) @@ -929,10 +929,10 @@ function WQA:Reward() for i in pairs(self.ZoneIDList) do for _, mapID in pairs(self.ZoneIDList[i]) do if self.db.profile.options.zone[mapID] == true then - local quests = C_TaskQuest.GetQuestsForPlayerByMapID(mapID) + local quests = C_TaskQuest.GetQuestsOnMap(mapID) if quests then for i = 1, #quests do - local questID = quests[i].questId + local questID = quests[i].questID local questTagInfo = GetQuestTagInfo(questID) local worldQuestType = 0 if questTagInfo then @@ -1570,7 +1570,7 @@ function WQA:GetRewardLinkByMissionID(missionID, key, value, i) return self:GetRewardLinkByID(missionID, key, value, i) end -function WQA:GetRewardLinkByID(questId, key, value, i) +function WQA:GetRewardLinkByID(questID, key, value, i) local k, v = key, value local link = nil if k == "achievement" then