From d2d95c6f090ff51ef09a9a267db7ceba98db48f1 Mon Sep 17 00:00:00 2001 From: Steven Jackson Date: Sun, 4 Jan 2015 01:04:19 -0600 Subject: [PATCH] 5.4.152 --- .../SVUI/packages/quest/components/button.lua | 4 +-- .../SVUI/packages/quest/components/quests.lua | 1 + .../SVUI_TrackOMatic/components/triangulate.lua | 37 +++++++++++--------- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/Interface/AddOns/SVUI/packages/quest/components/button.lua b/Interface/AddOns/SVUI/packages/quest/components/button.lua index 1119b26..95f90a9 100644 --- a/Interface/AddOns/SVUI/packages/quest/components/button.lua +++ b/Interface/AddOns/SVUI/packages/quest/components/button.lua @@ -78,7 +78,7 @@ local UpdateButton = function(self) for i = 1, GetNumQuestWatches() do local questID, _, questLogIndex, numObjectives, requiredMoney, isComplete, startEvent, isAutoComplete, failureTime, timeElapsed, questType, isTask, isStory, isOnMap, hasLocalPOI = GetQuestWatchInfo(i); - if(questID) then + if(questID and not isComplete) then local title, level, suggestedGroup = GetQuestLogTitle(questLogIndex) if(QuestHasPOIInfo(questID)) then local link, texture, _, showCompleted = GetQuestLogSpecialItemInfo(questLogIndex) @@ -111,7 +111,7 @@ local UpdateButton = function(self) end end - if(closestLink and (MOD.CurrentQuest == 0)) then + if(closestLink) then self.CurrentQuest = closestIndex; self:SetAbility(closestLink, closestTexture, closestQuest, closestLevel, closestTexture, closestID, closestIndex, closestCount, closestDuration, closestExpiration, closestComplete); self.Artwork:SetTexture([[Interface\ExtraButton\Smash]]); diff --git a/Interface/AddOns/SVUI/packages/quest/components/quests.lua b/Interface/AddOns/SVUI/packages/quest/components/quests.lua index 6334a1e..a938b9b 100644 --- a/Interface/AddOns/SVUI/packages/quest/components/quests.lua +++ b/Interface/AddOns/SVUI/packages/quest/components/quests.lua @@ -128,6 +128,7 @@ local function UpdateCachedQuests(needsSorting) CACHED_QUESTS[questID] = {i, title, level, texture, questID, questLogIndex, numObjectives, duration, elapsed, completed, questType, link}; else + CACHED_QUESTS[questID][1] = i; -- args: quest objective count CACHED_QUESTS[questID][7] = numObjectives; -- args: quest objective count CACHED_QUESTS[questID][8] = duration; -- args: quest timer duration CACHED_QUESTS[questID][9] = elapsed; -- args: quest timer elapsed diff --git a/Interface/AddOns/SVUI_TrackOMatic/components/triangulate.lua b/Interface/AddOns/SVUI_TrackOMatic/components/triangulate.lua index 3f36c6a..2d2ee75 100644 --- a/Interface/AddOns/SVUI_TrackOMatic/components/triangulate.lua +++ b/Interface/AddOns/SVUI_TrackOMatic/components/triangulate.lua @@ -330,26 +330,31 @@ local function GetDistance(map1, floor1, x1, y1, map2, floor2, x2, y2) local dist, xDelta, yDelta, angle; if(map1 == map2 and floor1 == floor2) then local chunk = GEOGRAPHICAL_DATA[map1]; - local tmp = chunk - if(floor1 ~= 0) then - tmp = rawget(chunk, floor1) - end - local w,h = 1,1 - if(not tmp) then - if(DUNGEON_DATA[chunk.origin] and DUNGEON_DATA[chunk.origin][floor1]) then - chunk = DUNGEON_DATA[chunk.origin][floor1] + if(not chunk) then + xDelta = 0; + yDelta = 0; + else + local tmp = chunk + if(floor1 ~= 0) then + tmp = rawget(chunk, floor1) + end + local w,h = 1,1 + if(not tmp) then + if(DUNGEON_DATA[chunk.origin] and DUNGEON_DATA[chunk.origin][floor1]) then + chunk = DUNGEON_DATA[chunk.origin][floor1] + w = chunk.width + h = chunk.height + else + w = 1 + h = 1 + end + else w = chunk.width h = chunk.height - else - w = 1 - h = 1 end - else - w = chunk.width - h = chunk.height + xDelta = (x2 - x1) * (w or 1); + yDelta = (y2 - y1) * (h or 1); end - xDelta = (x2 - x1) * (w or 1); - yDelta = (y2 - y1) * (h or 1); else local map1 = GEOGRAPHICAL_DATA[map1]; local map2 = GEOGRAPHICAL_DATA[map2]; -- 1.7.9.5