Skip to content

Commit

Permalink
8.3.03.2.1
Browse files Browse the repository at this point in the history
Fixed FlightMapFrame error.
Supporting variable pin positions for threats.
Changed dump function to a separate frame.
  • Loading branch information
LanceDH committed Mar 8, 2020
1 parent 8fd22be commit f79be0a
Show file tree
Hide file tree
Showing 9 changed files with 128 additions and 52 deletions.
7 changes: 7 additions & 0 deletions Data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,13 @@ end
-- This is just easier to maintain than changing the entire string every time
_V["PATCH_NOTES"] = {
{["version"] = "8.3.03"
,["minor"] = "2"
,["fixes"] = {
"Fixed an error that could occur when using the WorldFlightMap add-on."
,"Fixed pin positions for N'zoth quests that move around when the objectives are updated (i.e. Assault: The Black Empire)."
}
}
,{["version"] = "8.3.03"
,["new"] = {
"New General setting: Include dailies (default on). Treat certain dailies as world quests. Only affects dailies which Blizzard themselves treats as world quests."
,"New Quest List setting: Time Colors (default on). Add color coding to times based on the remaining duration. Critital times (15 min) will be colored red regardless."
Expand Down
7 changes: 4 additions & 3 deletions Dataprovider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,10 @@ function WQT_DataProvider:AddQuest(qInfo)
questInfo.isDaily = qInfo.isDaily;
questInfo.isAllyQuest = qInfo.isCombatAllyQuest;
questInfo.questId = qInfo.questId;
questInfo.mapInfo.mapX = qInfo.x;
questInfo.mapInfo.mapY = qInfo.y;

local posX, posY = WQT_Utils:GetQuestMapLocation(qInfo.questId, qInfo.mapID);
questInfo.mapInfo.mapX = posX;
questInfo.mapInfo.mapY = posY;

self:SetQuestData(questInfo);

if (true) then
Expand Down
21 changes: 2 additions & 19 deletions Debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ function WQT:AddDebugToTooltip(tooltip, questInfo, level)
AddIndentedDoubleLine(tooltip, "rarity", rarity, 1, color);
AddIndentedDoubleLine(tooltip, "isElite", isElite, 1, color);
AddIndentedDoubleLine(tooltip, "tradeskillLineIndex", tradeskillLineIndex, 1, color);
AddIndentedDoubleLine(tooltip, "isThreatQuest", C_QuestLog.IsThreatQuest(questInfo.questId), 1, color);
-- Time
local seconds, timeString, timeColor, timeStringShort = WQT_Utils:GetQuestTimeString(questInfo, true, true);
AddIndentedDoubleLine(tooltip, "time", "", 1, color);
Expand Down Expand Up @@ -261,23 +262,5 @@ function WQT_DebugFrameMixin:DumpDebug(input)

self.DumpFrame.EditBox:SetText(text);

-- Display WQT frame depending on current situation;
if (FlightMapFrame and FlightMapFrame:IsShown()) then
WQT_FlightMapContainerButton:SetSelected(true);
elseif (TaxiFrame:IsShown()) then
WQT_OldTaxiMapContainerButton:SetSelected(true);
else
if (WorldMapFrame:IsShown()) then
if (WorldMapFrame:IsMaximized()) then
WQT_WorldMapContainerButton:SetSelected(true);
elseif(not WorldMapFrame.QuestLog:IsShown()) then
WorldMapFrame.SidePanelToggle:OnClick();
end
else
OpenQuestLog();
end
end

WQT_WorldQuestFrame:SelectTab(WQT_TabWorld);
WQT_WorldQuestFrame:ShowOverlayFrame(self);
self:Show();
end
90 changes: 70 additions & 20 deletions Debug.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@
<Size y="20"/>
<Layers>
<Layer level="ARTWORK">
<Texture parentKey="Checkmark" file="Interface\Scenarios\ScenarioIcon-Check" alpha="0">
<Size x="16" y="16" />
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT" x="3"/>
</Anchors>
</Texture>

<FontString parentKey="Label" inherits="GameFontWhiteSmall" justifyH="LEFT" text="Unlabeled">
<Size y="15" />
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT"/>
</Anchors>
</FontString>
<Texture parentKey="Checkmark" file="Interface\Scenarios\ScenarioIcon-Check" alpha="0">
<Size x="16" y="16" />
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT" relativeKey="$parent.Label" x="3"/>
</Anchors>
</Texture>
</Layer>
</Layers>
<Animations>
<AnimationGroup parentKey="CheckAnim" setToFinalAlpha="true" looping="NONE">
<Alpha parentKey="Checkmark" childKey="Checkmark" fromAlpha="1" toAlpha="0" Duration="0.6" order="0" />
<Alpha parentKey="Checkmark" childKey="Checkmark" fromAlpha="1" toAlpha="0" Duration="0.6" order="0" smoothing="IN" />
<Scale parentKey="Checkmark" childKey="Checkmark" fromScaleX="0.7" toScaleX="1.5" smoothing="NONE" fromScaleY="0.7" toScaleY="1.5" Duration="0.6" order="0"/>
</AnimationGroup>
</Animations>
Expand Down Expand Up @@ -72,19 +72,19 @@
</Backdrop>
<Layers>
<Layer level="ARTWORK">
<Texture parentKey="Checkmark" file="Interface\Scenarios\ScenarioIcon-Check" alpha="0">
<Size x="16" y="16" />
<Anchors>
<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="3" y="-2"/>
</Anchors>
</Texture>

<FontString parentKey="Label" inherits="GameFontWhiteSmall" justifyH="LEFT" text="Unlabeled">
<Size y="15" />
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" x="5"/>
<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT"/>
</Anchors>
</FontString>
<Texture parentKey="Checkmark" file="Interface\Scenarios\ScenarioIcon-Check" alpha="0">
<Size x="16" y="16" />
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT" relativeKey="$parent.Label" x="3"/>
</Anchors>
</Texture>
</Layer>
</Layers>
<Animations>
Expand Down Expand Up @@ -138,27 +138,71 @@
</Scripts>
</Frame>

<Frame name="WQT_DebugFrame" mixin="WQT_DebugFrameMixin" parent="UIParent" hidden="true">
<Frame name="WQT_DebugFrame" mixin="WQT_DebugFrameMixin" parent="UIParent" frameStrata="high" enableMouse="true" hidden="true">
<Size x="257" y="462"/>
<Anchors>
<Anchor point="CENTER" x="0" y="0"/>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture parentKey="BG" setAllPoints="true">
<Color r="0" g="0" b="0" a="0.5"/>
<Texture parentKey="UpdatesBG" file="Interface/Artifacts/ArtifactForge" setAllPoints="true" alpha="0.75">
<TexCoords left="0" right="0.8984375" top="0" bottom="0.5986328125"/>
</Texture>
</Layer>

<Layer level="ARTWORK">
<FontString parentKey="Title" inherits="Fancy24Font" justifyH="LEFT" text="WQT Debug Dump">
<Anchors>
<Anchor point="TOP" y="-10"/>
</Anchors>
<Color r="1" g="0.82" b="0"/>
</FontString>
</Layer>
</Layers>

<Frames>
<Button parentKey="CloseButton" hidden="false">
<Size x="20" y="20"/>
<Anchors>
<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-4" y="-4"/>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<Texture file="Interface\FriendsFrame\ClearBroadcastIcon" alpha="0.5" parentKey="texture">
<TexCoords right="0.9" bottom="0.9" />
</Texture>
</Layer>
</Layers>
<Scripts>
<OnLoad>
self:SetFrameLevel(self:GetParent():GetFrameLevel() + 20);
</OnLoad>
<OnClick>
WQT_DebugFrame:Hide();
</OnClick>
<OnEnter>
self.texture:SetAlpha(1.0);
</OnEnter>
<OnLeave>
self.texture:SetAlpha(0.5);
</OnLeave>
<OnMouseDown>
if self:IsEnabled() then
self.texture:SetPoint("TOPLEFT", self, "TOPLEFT", 1, -1);
end
</OnMouseDown>
<OnMouseUp>
self.texture:SetPoint("TOPLEFT", self, "TOPLEFT", 0, 0);
</OnMouseUp>
</Scripts>
</Button>
<EditBox parentKey="CurseURL" inherits="WQT_CopyBoxTemplate">
<KeyValues>
<KeyValue key="label" value="Curseforge URL" type="string"/>
</KeyValues>
<Anchors>
<Anchor point="TOPLEFT" x="15" y="-30"/>
<Anchor point="RIGHT" x="-30"/>
<Anchor point="TOPLEFT" x="15" y="-60"/>
<Anchor point="RIGHT" x="-15"/>
</Anchors>
</EditBox>
<EditBox parentKey="WoWIURL" inherits="WQT_CopyBoxTemplate">
Expand All @@ -185,6 +229,12 @@

<Scripts>
<OnLoad method="OnLoad"/>
<OnShow>
PlaySound(SOUNDKIT.IG_QUEST_LOG_OPEN);
</OnShow>
<OnHide>
PlaySound(SOUNDKIT.IG_QUEST_LOG_CLOSE);
</OnHide>
</Scripts>
</Frame>
</Ui>
13 changes: 10 additions & 3 deletions Locals.lua
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,12 @@ L["FORMAT_GROUP_CREATE"] = "輸入|cFFFFFFFF%d|r 為此任務建立一個隊伍
L["FORMAT_GROUP_SEARCH"] = "輸入|cFFFFFFFF%d|r 搜索此任務的隊伍。 或輸入其名稱:|cFFFFFFFF%s|r。"
L["FORMAT_GROUP_TYPO"] = "它似乎是打錯字。輸入任一個|cFFFFFFFF%d|r,或|cFFFFFFFF%s|r。"
L["GROUP_SEARCH_INFO"] = "暴雪阻止插件為大多數世界任務自動尋找隊伍。 因此,玩家必須手動填寫搜索框。"
L["INCLUDE_DAILIES"] = "包含每日"
L["INCLUDE_DAILIES_TT"] = "將某些每日任務視為世界任務。僅影響暴雪自己視為世界任務的每日任務。"
L["LFG_BUTTONS"] = "啟用LFG按鈕"
L["LFG_BUTTONS_TT"] = "在目標追蹤中的世界任務添加尋求組隊按鈕。啟用此設置會導至記憶體與CPU使用率增加。|cFFFF5555A需要重載以讓設置生效。|r"
L["LIST_COLOR_TIME"] = "時間顏色"
L["LIST_COLOR_TIME_TT"] = "根據剩餘持續時間在時間添加顏色編碼。臨界時間(<15分鐘)將變為紅色。"
L["LIST_FULL_TIME"] = "擴展時間"
L["LIST_FULL_TIME_TT"] = "包含時間的第二刻度,在天之後加入小時,在小時之後加入分鐘。"
L["LIST_SETTINGS"] = "列表設置"
Expand All @@ -377,6 +381,8 @@ L["PIN_CENTER"] = "主要圖示類型"
L["PIN_CENTER_TT"] = "選擇地圖任務點中心的外觀"
L["PIN_DISABLE"] = "停用任務點更改"
L["PIN_DISABLE_TT"] = "防止世界任務追蹤更改地圖任務點。"
L["PIN_ELITE_RING"] = "精英環"
L["PIN_ELITE_RING_TT"] = "用尖刺環替代暴雪的精英龍。"
L["PIN_FADE_ON_PING"] = "突顯後淡出"
L["PIN_FADE_ON_PING_TT"] = "當一個地圖任務點被突顯時,淡出其他所有任務點以提高可視性。"
L["PIN_RARITY_ICON"] = "任務稀有度圖示"
Expand All @@ -386,11 +392,12 @@ L["PIN_REWARD_TYPE"] = "獎勵類型圖示"
L["PIN_REWARD_TYPE_TT"] = "在地圖圖示下顯示獎勵類型圖示"
L["PIN_REWARDS"] = "顯示任務獎勵圖示"
L["PIN_REWARDS_TT"] = "將地圖上圖示改為顯示任務獎勵類型"
L["PIN_RING_DEFAULT_TT"] = "環邊不做任何改變"
L["PIN_RIMG_TIME_TT"] = "依剩餘時間著色"
L["PIN_RING_COLOR"] = "獎勵著色"
L["PIN_RING_COLOR_TT"] = "依獎勵類型著色"
L["PIN_RING_DEFAULT"] = "預設"
L["PIN_RING_DEFAULT_TT"] = "環邊不做任何改變"
L["PIN_RING_HIDE_TT"] = "在任務點外圍不顯示任何環"
L["PIN_RING_QUALITY_TT"] = "環形顏色基於任務稀有度。"
L["PIN_RING_TIME"] = "剩餘時間"
L["PIN_RING_TITLE"] = "圖示環邊類型"
Expand All @@ -406,6 +413,8 @@ L["PIN_TIME_ICON_TT"] = "添加基於時間顏色的的剩餘時間圖示。"
L["PIN_TIME_TT"] = "在圖示上加入任務剩餘時間"
L["PIN_TYPE"] = "任務類型圖示"
L["PIN_TYPE_TT"] = "在地圖圖示下顯示特殊任務類型圖示"
L["PRECISE_FILTER"] = "精確過濾"
L["PRECISE_FILTER_TT"] = "過濾器只顯示與所有類別匹配的任務,而不僅僅是任何類別。"
L["QUEST_COUNTER"] = "任務日誌計數"
L["QUEST_COUNTER_INFO"] = "以下的|cFFFFd100%d|r隱藏任務計入您的任務上限而且無法忽略。這最終是暴雪的問題。"
L["QUEST_COUNTER_TITLE"] = "隱藏任務"
Expand Down Expand Up @@ -434,8 +443,6 @@ L["USE_TOMTOM_TT"] = "在此插件添加TomTom功能。"
L["WHATS_NEW"] = "最新消息"
L["WHATS_NEW_TT"] = "查看World Quest Tab更新說明。"
L["WQT_FULLSCREEN_BUTTON_TT"] = "左鍵點擊以切換世界任務列表。右鍵點擊並拖動以變更位置。"
L["PRECISE_FILTER"] = "精確過濾"
L["PRECISE_FILTER_TT"] = "過濾器只顯示與所有類別匹配的任務,而不僅僅是任何類別。"

L["IS_AZIAN_CLIENT"] = true
end
Expand Down
2 changes: 1 addition & 1 deletion MapPinProvider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function WQT_PinDataProvider:RefreshAllData()
if (settingsFilterPoI and questInfo.passedFilter or (not settingsFilterPoI and questInfo.isValid)) then
local pinType = GetPinType(parentMapFrame, mapInfo.mapType, questInfo, settingsContinentPins);
if (pinType) then
local posX, posY = C_TaskQuest.GetQuestLocation(questInfo.questId, mapID);
local posX, posY = WQT_Utils:GetQuestMapLocation(questInfo.questId, mapID);
if (posX) then
local pin = self.pinPool:Acquire();
pin:SetParent(canvas);
Expand Down
33 changes: 30 additions & 3 deletions Templates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,15 @@ end
function WQT_Utils:RefreshOfficialDataProviders()
-- Have to force remove the WQ data from the map because RefreshAllData doesn't do it
local mapWQProvider = WQT_Utils:GetMapWQProvider();
mapWQProvider:RemoveAllData();

WorldMapFrame:RefreshAllDataProviders();
if (mapWQProvider) then
mapWQProvider:RemoveAllData();
end

-- If there are no dataproviders, we haven't opened the map yet, so don't force a refresh on it
if (#WorldMapFrame.dataProviders > 0) then
WorldMapFrame:RefreshAllDataProviders();
end

-- Flight map world quests
local flightWQProvider = WQT_Utils:GetFlightWQProvider();
if (flightWQProvider) then
Expand Down Expand Up @@ -577,6 +582,28 @@ function WQT_Utils:GetQuestLogInfo(hiddenList)
return questCount, maxQuests, color;
end

function WQT_Utils:GetQuestMapLocation(questId, mapId)
local isSameMap = true;
if (mapId) then
local mapInfo = WQT_Utils:GetMapInfoForQuest(questId);
isSameMap = mapInfo.mapID == mapId;
end
-- Threat quest specific
if (isSameMap and C_QuestLog.IsThreatQuest(questId)) then
local completed, x, y = QuestPOIGetIconInfo(questId);
if (x and y) then
return x, y;
end
end
-- General tasks
local x, y = C_TaskQuest.GetQuestLocation(questId, mapId);
if (x and y) then
return x, y;
end
-- Could not get a position
return 0, 0;
end

function WQT_Utils:DeepWipeTable(t)
for k, v in pairs(t) do
if (type(v) == "table") then
Expand Down
5 changes: 3 additions & 2 deletions WorldQuestTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2277,8 +2277,9 @@ function WQT_CoreMixin:ADDON_LOADED(loaded)
-- I'd rather not do it this way but the Flight map pins update so much I might as well
local flightWQProvider = WQT_Utils:GetFlightWQProvider();
hooksecurefunc(flightWQProvider, "AddWorldQuest", function(frame, info)
--if true then return end
for pin in pairs(FlightMapFrame.pinPools["FlightMap_WorldQuestPinTemplate"].activeObjects) do
local pool = FlightMapFrame.pinPools[FlightMap_WorldQuestDataProviderMixin:GetPinTemplate()];
if (not pool) then return; end
for pin in pairs(pool.activeObjects) do
if (not pin.WQTHooked) then
pin.WQTHooked = true;
pin:HookScript("OnShow", function()
Expand Down
2 changes: 1 addition & 1 deletion WorldQuestTab.toc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Title: World Quest Tab
## Notes: Creates a new quest tab to keep track of world quests.
## Author: LanceDH
## Version: 8.3.03
## Version: 8.3.03.2
## SavedVariables: BWQDB

WorldQuestTab.xml
Expand Down

0 comments on commit f79be0a

Please sign in to comment.