Skip to content

Commit

Permalink
Update for World Quest tracking.
Browse files Browse the repository at this point in the history
  • Loading branch information
IrcDirk committed Mar 12, 2019
1 parent 8418582 commit 2648252
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions NxQuest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8125,8 +8125,16 @@ function Nx.Quest:UpdateIcons (map)
map:ClipFrameZ (f, x, y, 24, 24, 0)

local selected = info.questId == GetSuperTrackedQuestID();

--local isCriteria = WorldMapFrame.UIElementsFrame.BountyBoard:IsWorldQuestCriteriaForSelectedBounty(info.questId);

local function WQTGetOverlay (memberName)
for i = 1, #WorldMapFrame.overlayFrames do
local overlay = WorldMapFrame.overlayFrames [i]
if (overlay [memberName]) then
return overlay
end
end
end
local isCriteria = WQTGetOverlay("IsWorldQuestCriteriaForSelectedBounty"):IsWorldQuestCriteriaForSelectedBounty(info.questId);
--local isSpellTarget = SpellCanTargetQuest() and IsQuestIDValidSpellTarget(info.questId);

f.worldQuest = true;
Expand All @@ -8137,7 +8145,8 @@ function Nx.Quest:UpdateIcons (map)
map:SetTargetAtStr (format("%s, %s", x, y))
if not InCombatLockdown() and self.worldQuest then
if ( not ChatEdit_TryInsertQuestLinkForQuestID(self.questID) ) then
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
if ZygorGuidesViewer and ZygorGuidesViewer.WorldQuests then ZygorGuidesViewer.WorldQuests:SuggestWorldQuestGuideFromMap(nil,self.questID,"force",self.mapID) end
if IsShiftKeyDown() then
if IsWorldQuestHardWatched(self.questID) or (IsWorldQuestWatched(self.questID) and GetSuperTrackedQuestID() == self.questID) then
BonusObjectiveTracker_UntrackWorldQuest(self.questID);
Expand All @@ -8155,7 +8164,7 @@ function Nx.Quest:UpdateIcons (map)
end
end)

QuestUtil.SetupWorldQuestButton(f, questtype, rarity, elite, tradeskill, info.inProgress, selected)
QuestUtil.SetupWorldQuestButton(f, questtype, rarity, elite, tradeskill, info.inProgress, selected, isCriteria)

f.texture:Hide()

Expand Down

0 comments on commit 2648252

Please sign in to comment.