Mercurial > wow > worldplan
changeset 30:8cb750e79952
WorldPlan:
- Reworking filters to utilize newly added CVars
author | Nenue |
---|---|
date | Fri, 28 Oct 2016 14:06:07 -0400 |
parents | c1612c2c1840 |
children | d0114b51cdea |
files | FilterBar.lua FilterBar.xml QuestPOI.lua WorldPlan.lua WorldPlan.toc WorldPlan.xml |
diffstat | 6 files changed, 523 insertions(+), 387 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FilterBar.lua Fri Oct 28 14:06:07 2016 -0400 @@ -0,0 +1,301 @@ +-- WorldPlan +-- FilterBar.lua +-- Created: 10/27/2016 8:55 PM +-- %file-revision% +-- + +local print = DEVIAN_WORKSPACE and function(...) _G.print('FilterBar', ...) end or nop + +local REWARD_CASH = WORLD_QUEST_REWARD_TYPE_FLAG_GOLD +local REWARD_ARTIFACT_POWER = WORLD_QUEST_REWARD_TYPE_FLAG_ARTIFACT_POWER +local REWARD_GEAR = WORLD_QUEST_REWARD_TYPE_FLAG_EQUIPMENT +local REWARD_CURRENCY = WORLD_QUEST_REWARD_TYPE_FLAG_ORDER_RESOURCES +local REWARD_REAGENT = WORLD_QUEST_REWARD_TYPE_FLAG_MATERIALS + + +local LE_QUEST_TAG_TYPE_PVP = LE_QUEST_TAG_TYPE_PVP +local LE_QUEST_TAG_TYPE_PET_BATTLE = LE_QUEST_TAG_TYPE_PET_BATTLE +local LE_QUEST_TAG_TYPE_DUNGEON = LE_QUEST_TAG_TYPE_DUNGEON +local LE_QUEST_TAG_TYPE_PROFESSION = LE_QUEST_TAG_TYPE_PROFESSION +local LE_QUEST_TAG_TYPE_NORMAL = LE_QUEST_TAG_TYPE_NORMAL +local DEFAULT_FILTER_LAYOUT = { + PinSize = 22, + Border = 3, + TrackingBorder = 2, + TagSize = 12, + TimeleftStage = 3, + showNumber = true, + numberFontObject = 'WorldPlanNumberFontThin' +} +local DEFAULT_FILTER_LIST = { + { label = 'Filters', texture = "Interface\\WorldMap\\WorldMap-Icon" }, + { filterKey= 'rewardType', cVar = 'worldQuestFilterArtifactPower', filterValue = REWARD_ARTIFACT_POWER, label = 'Artifact Power', texture = "Interface\\ICONS\\inv_7xp_inscription_talenttome01" }, + { filterKey= 'rewardType', cVar = 'worldQuestFilterOrderResources', filterValue = REWARD_CURRENCY,label = 'Order Resources', texture = "Interface\\ICONS\\inv_misc_elvencoins" }, + { filterKey= 'rewardType', cVar = 'worldQuestFilterEquipment', filterValue = REWARD_GEAR, label = 'Equipment', texture = "Interface\\ICONS\\garrison_bluearmorupgrade" }, + { filterKey= 'rewardType', cVar = 'worldQuestFilterProfessionMaterials', filterValue = REWARD_REAGENT, label = 'Materials', texture = 1417744 }, + { filterKey= 'rewardType', cVar = 'worldQuestFilterGold', filterValue = REWARD_CASH, label = 'Gold', texture = "Interface\\Buttons\\UI-GroupLoot-Coin-Up" }, + { filterKey= 'worldQuestType', filterValue = LE_QUEST_TAG_TYPE_PVP, label = 'PvP', texture = "Interface\\Icons\\Ability_PVP_GladiatorMedallion", spacing = 10 }, + { filterKey= 'worldQuestType', filterValue = LE_QUEST_TAG_TYPE_PET_BATTLE, label = 'Pet Battle', texture = "Interface\\Icons\\PetJournalPortrait", }, + { filterKey= 'worldQuestType', filterValue = LE_QUEST_TAG_TYPE_DUNGEON, label = 'Dungeon', texture = "Interface\\LFGFRAME\\UI-LFR-PORTRAIT", }, + { filterKey= 'worldQuestType', filterValue = LE_QUEST_TAG_TYPE_PROFESSION, label = 'Profession', texture = "Interface\\ICONS\\70_professions_scroll_02", }, +} +local defaults = {} + +WorldPlanSummaryMixin = { + selectedBountyIndex = {}, + bounties = {}, + filterList = {}, + buttons = {}, +} +WorldPlanFilterPinMixin = {} + +function WorldPlanSummaryMixin:OnLoad() + self:RegisterEvent('QUEST_LOG_UPDATE') + self:RegisterEvent('WORLD_MAP_UPDATE') + + WorldPlan:AddHandler(self, defaults) + + for index, info in ipairs(DEFAULT_FILTER_LIST) do + info.zone = DEFAULT_FILTER_LAYOUT + info.continent = DEFAULT_FILTER_LAYOUT + info.pinMask = "Interface\\Minimap\\UI-Minimap-Background" + + WorldPlan:AddTypeInfo(self,index, info) + end + +end + + +function WorldPlanSummaryMixin:OnEvent(event) +end + +local bountyIndex +local debug_headers = {} + +function WorldPlanSummaryMixin:Setup() + self:GetFilters() +end + + +function WorldPlanSummaryMixin:OnEvent(event,...) + self.isStale = true +end + +function WorldPlanSummaryMixin:OnShow() + self:Refresh() +end + +function WorldPlanSummaryMixin:GetFilters() + + + wipe(self.filterList) + + for index, info in ipairs(DEFAULT_FILTER_LIST) do + tinsert(self.filterList, info) + end + self.bounties, self.numBounties = GetQuestBountyInfoForMapID(WorldPlan.currentMapID) + self.BountyFilters = {} + for index, data in ipairs(self.bounties) do + local info = self.BountyFilters[index] + if not info then + info = {} + self.BountyFilters[index] = info + end + + local questTitle = GetQuestLogTitle(GetQuestLogIndexByID(data.questID)) + + info.filterKey = 'factionID' + info.filterValue = data.factionID + info.label = questTitle + info.texture = data.icon + print('loading emissary', questTitle) + + tinsert(self.filterList, info) + --{ filterKey= 'worldQuestType', filterValue = LE_QUEST_TAG_TYPE_PROFESSION, label = 'Profession', texture = "Interface\\LFGFRAME\\UI-LFR-PORTRAIT", }, + end +end + +function WorldPlanSummaryMixin:Reset() + self.pinLayout = self:GetTypeInfo(255) + self:GetFilters() +end + +function WorldPlanSummaryMixin:Refresh(forced) + self:Update(forced) +end + +local filterFill = "Interface\\BUTTONS\\YELLOWORANGE64" +local filterMask = "Interface\\Minimap\\UI-Minimap-Background" +function WorldPlanSummaryMixin:Update(forced) + local blocks = self.buttons + local relativeFrame = WorldMapFrame.UIElementsFrame.TrackingOptionsButton + local numHeaders = 0 + print('|cFF00FF88'..tostring(self)..':Refresh()|r', 'currentMap=',self.currentMapID) + + + local quests = WorldPlanQuests.QuestsByZone[self.currentMapID] or WorldPlanQuests.QuestsByID + + + for index, info in ipairs(self.filterList) do + local numQuests = 0 + + for questID, pin in pairs(quests) do + if pin.used then + if not info.filterKey then + numQuests = numQuests + 1 + elseif pin[info.filterKey] == info.filterValue then + numQuests = numQuests + 1 + end + end + end + print(tostring(index).. ' ("'..tostring(info.label)..'" f('.. tostring(info.filterKey).. '='..tostring(info.filterValue) .. '), '..tostring(numQuests)..')') + + if numQuests >= 1 then + numHeaders = numHeaders + 1 + local button = blocks[numHeaders] + if not blocks[numHeaders] then + button = CreateFrame('Button', 'WorldPlanFilterButton'..numHeaders, WorldMapScrollFrame, 'WorldPlanFilterPin') + + button:SetSize(24,24) + button.icon:ClearAllPoints() + button.icon:SetAllPoints(button) + + button.iconBorder:SetPoint('TOPLEFT', button, 'TOPLEFT', -2, 2) + button.iconBorder:SetPoint('BOTTOMRIGHT', button, 'BOTTOMRIGHT', 2, -2) + button.iconBorder:SetMask(filterMask) + button.iconBorder:SetTexture(filterFill) + button.iconBorder:SetDesaturated(true) + + button.supertrackBorder:Hide() + blocks[numHeaders] = button + end + + button.info = info + button:SetID(index) + button.spacing = ((info.filterKey ~= relativeFrame.filterKey) and 10) or 0 + button.relativeFrame = relativeFrame + button:Refresh((numHeaders == 1), numQuests) + button:Show() + relativeFrame = button + end + + end + + self.numHeaders = numHeaders + for i = numHeaders + 1, #blocks do + if blocks[i] then + blocks[i]:Hide() + end + end +end + +function WorldPlanSummaryMixin:Cleanup() + + -- hide trailing buttons +end + +function WorldPlanFilterPinMixin:OnEnter() + +end +function WorldPlanFilterPinMixin:OnLeave() + +end + + +function WorldPlanFilterPinMixin:Refresh(isFirst, numQuests) + isFirst = isFirst or self.isFirst + numQuests = numQuests or self.numQuests + + local info = self.info + + self.isFirst = isFirst + self.numQuests = numQuests + self.filterKey = info.filterKey + self.filterValue = info.filterValue + self.tagID = info.tagID + + self.icon:SetMask(filterMask) + self.icon:SetTexture(info.texture) + self.count:SetText(numQuests) + self.cVar = info.cVar + + + self.itemTexture = self.texture + + if isFirst then + self:SetPoint('TOP', self.relativeFrame, 'BOTTOM', 0, -5) + else + self:SetPoint('TOPRIGHT', self.relativeFrame, 'BOTTOMRIGHT', 0, -(3 + (self.spacing or 0))) + + end + print('anchor to', self.relativeFrame:GetName(), info.mask) + + local r, g, b, a = 1,1,1,1 + local used = WorldPlan.UsedFilters[self.filterKey] + if used and self.filterKey then + if used[self.filterValue] == true then + r, g, b = 0, 1, 0 + elseif used[self.filterValue] == false then + r, g, b = 1, 0, 0 + end + else + if self.cVar and GetCVarBool(self.cVar) then + r, g, b = 0, 1, 0 + end + end + self.iconBorder:SetVertexColor(r, g, b, a) + --self:UpdateSize() +end + +function WorldPlanFilterPinMixin:OnLoad() + self:RegisterForClicks('AnyUp') + self:SetFrameStrata('HIGH') + self:SetFrameLevel(151) + self:SetScript('OnUpdate', nil) +end + +function WorldPlanFilterPinMixin:OnUpdate () +end + +function WorldPlanFilterPinMixin:OnLeave () + if GameTooltip:IsOwned(self) then + GameTooltip:Hide() + end +end + +-- shift-click: reset filter +-- click: rotate through include(1), exclude(-1), ignore(nil) +function WorldPlanFilterPinMixin:OnClick (button) + + local filterKey = self.filterKey + local filterValue = self.filterValue + + + local operation = opPrefix + local setInclude = (button == 'LeftButton') + + + if not filterKey then + -- resetting + wipe(WorldPlan.UsedFilters) + + elseif IsShiftKeyDown() then + WorldPlan.UsedFilters[filterKey] = nil + else + WorldPlan.UsedFilters[filterKey] = WorldPlan.UsedFilters[filterKey] or {} + WorldPlan.UsedFilters[filterKey][filterValue] = setInclude + print(filterKey, filterValue, '=', setInclude) + + for index, info in ipairs(WorldPlan.FilterOptions) do + if info.filterKey == filterKey then + if (not IsControlKeyDown()) and (filterValue ~= info.filterValue) then + WorldPlan.UsedFilters[filterKey][info.filterValue] = (not setInclude) + print(filterKey, info.filterValue, '=', WorldPlan.UsedFilters[filterKey][info.filterValue]) + end + end + end + + end + print('|cFF00FF88Filter Update:', filterKey, filterValue, operation) + WorldPlan:Refresh() +end \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FilterBar.xml Fri Oct 28 14:06:07 2016 -0400 @@ -0,0 +1,20 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ +..\FrameXML\UI.xsd"> + <Script file="FilterBar.lua" /> + <Frame name="$parentSummary" parent="WorldPlan" mixin="WorldPlanSummaryMixin"> + <Scripts> + <OnLoad method="OnLoad" /> + <OnEvent method="OnEvent" /> + </Scripts> + + </Frame> + <Button name="WorldPlanFilterPin" virtual="true" inherits="WorldPlanQuestPin" mixin="WorldPlanFilterPinMixin"> + <Scripts> + <OnMouseDown method="OnMouseDown" /> + <OnClick method="OnClick" /> + <OnLoad method="OnLoad" /> + <OnEnter method="OnEnter" /> + <OnLeave method="OnLeave" /> + </Scripts> + </Button> +</Ui> \ No newline at end of file
--- a/QuestPOI.lua Thu Oct 27 13:50:56 2016 -0400 +++ b/QuestPOI.lua Fri Oct 28 14:06:07 2016 -0400 @@ -13,7 +13,7 @@ local print = DEVIAN_WORKSPACE and function(...) _G.print('WP', ...) end or function() end local qprint = DEVIAN_WORKSPACE and function(...) _G.print('POI', ...) end or function() end -local wqprint = DEVIAN_WORKSPACE and function(...) _G.print('WorldQuest', ...) end or function() end +local wqprint = DEVIAN_WORKSPACE and function(...) _G.print('WorldQuests', ...) end or function() end local iprint = DEVIAN_WORKSPACE and function(...) _G.print('ItemScan', ...) end or function() end local QuestPOI = WorldPlanPOIMixin @@ -172,19 +172,22 @@ qprint('|cFF00FF88'..self:GetName()..':RefreshData()|r') if info then - - self.x = info.x or self.x - self.y = info.y or self.y self.inProgress = info.inProgress self.floor = info.floor self.numObjectives = info.numObjectives or 0 - print('|cFFFF4400subbing in new info', info.x, info.y, self.x, self.y) + if info.x and info.y then + self.x = info.x or self.x + self.y = info.y or self.y + qprint('|cFFFF4400applying taskInfo coords:', info.x, info.y) + end + + self.passesBlizzFilters = WorldMap_DoesWorldQuestInfoPassFilters(info) end local questID = self:GetID() local questTitle, rewardIcon, rewardName, rewardCount, rewardStyle, rewardType, itemID, quantity, quality, _ - local hasUpdate, isPending = self.isNew, false + local hasUpdate, isPending = self.hasUpdate, self.isPending if not HaveQuestData(questID) then @@ -207,7 +210,7 @@ rewardName = GetMoneyString(money) rewardType = REWARD_CASH end - rewardStyle = WorldPlan:GetTypeInfo(rewardType) + rewardStyle = self:GetTypeInfo(rewardType) self.itemNumber = rewardCount or self.itemNumber self.rewardType = rewardType or REWARD_ITEM @@ -264,7 +267,8 @@ qprint(' |cFF00FFFF'..questID..'|r hasUpdate:', hasUpdate, 'isPending:', isPending) - qprint(' ', self.title, self.itemTexture, 'rewardType:', self.rewardType, 'tag:', self.tagID, 'style', self.style ) + qprint(' ', 'rewardType:', self.rewardType, 'tag:', self.tagID) + qprint(' ', tostring(self.title), " |T"..tostring(self.itemTexture)..":12:12|t", tostring(self.itemName)) end return hasUpdate, isPending end @@ -277,15 +281,14 @@ function WorldPlanPOIMixin:ShowNew() self:SetShown(true) self.isNew = nil + self.hasUpdate = true self.FadeIn:Play() end function WorldPlanPOIMixin:OnShow () qprint('|cFFFFFF00["'..tostring(self.title)..'"]|r:OnShow() update:', self.hasUpdate, 'new:', self.isNew, 'animation:', self.isAnimating) - qprint(debugstack()) -- pop this on principle if self.hasUpdate then - self:Refresh() end @@ -328,9 +331,7 @@ function WorldPlanPOIMixin:OnEvent(event, ...) if event == 'SUPER_TRACKED_QUEST_CHANGED' then - if self:IsVisible() then - self:Refresh() - end + self.hasUpdate = true end end @@ -338,6 +339,12 @@ local PIN_UPDATE_DELAY = .016 local TOP_PIN_ID function WorldPlanPOIMixin:OnUpdate (sinceLast) + + if self.hasUpdate then + wqprint('|cFFFFFF00push poi update') + self:Refresh() + return + end -- control update check intervals self.throttle = (self.throttle or PIN_UPDATE_DELAY) - sinceLast if self.throttle <= 0 then @@ -361,10 +368,6 @@ end end - if self.hasUpdate then - self:Refresh() - self.hasUpdate = nil - end -- update time elements local tl = self.timeThreschold @@ -397,17 +400,18 @@ function WorldPlanPOIMixin:Refresh () local db = WorldPlan.db - local print = qprint - print('|cFF00FF88["'..tostring(self.title)..'"]|r:Refresh()', tostring(self.title), "|T"..tostring(self.itemTexture)..":12:12|t", tostring(self.itemName)) - print(self.style) + local print = wqprint + print('|cFF00FF88'..self:GetName()..'|r:Refresh()') local questID = self:GetID() - local style,subStyle = WorldPlan:GetTypeInfo(self.rewardType or ((self.quality or 0) + 127)) + local style,subStyle = self:GetTypeInfo(self.rewardType) if self.filtered then subStyle = style.minimized end + self.style = style + local borderMask = style.mask local borderFill = style.texture @@ -421,18 +425,20 @@ self.showNumber = subStyle.showNumber - print(' - subStyle:', (self.filtered == true), self.subStyle) --WorldPlan:print(tostring(self.title), "|T"..tostring(self.itemTexture)..":16:16|t", tostring(self.itemName)) SetMaskedTexture(icon, self.itemTexture or ICON_UNKNOWN, borderMask) icon:SetAllPoints(self) if self.itemName then - local color = self.rewardColor or COMMON_COLOR - if self.hasNumeric then + if subStyle.numberFontObject then + wqprint('change font', _G[subStyle.numberFontObject]:GetName()) + self.count:SetFontObject(_G[subStyle.numberFontObject]) + end + self.count:SetShown(true) self.count:SetText(self.itemNumber) self.count:SetTextColor(unpack(self.numberRGB)) @@ -444,8 +450,7 @@ end SetMaskedTexture(iconBorder, borderFill, borderMask) - local border = WorldPlan:GetTypeInfo(self.rewardType) - print(self.rewardType, print) + local border = self:GetTypeInfo(self.rewardType) iconBorder:SetVertexColor(border.r, border.g, border.b, border.a) iconBorder:SetDesaturated(true) @@ -472,7 +477,8 @@ else self.EliteBorder:Hide() end - qprint('|cFF88FF00updated', questID, self.title, self.rewardType, (style.showNumber and self.itemNumber) or '') + --qprint('|cFF88FF00updated', questID, self.title, self.rewardType, (style.showNumber and self.itemNumber) or '') + --print(' - subStyle:', (self.filtered == true), self.subStyle) self:UpdateSize()
--- a/WorldPlan.lua Thu Oct 27 13:50:56 2016 -0400 +++ b/WorldPlan.lua Fri Oct 28 14:06:07 2016 -0400 @@ -1,14 +1,8 @@ --- Veneer -- WorldPlan.lua -- Created: 8/16/2016 8:19 AM -- %file-revision% ---[[ - Summary: - Adds reward icons to the world quest POI markers, and adds said markers to the continent map. - Issues: - Dalaran quests aren't visible until that map has been specifically viewed by the player. ---]] +local addonName, db = ... local ICON_UNKNOWN = "Interface\\ICONS\\inv_misc_questionmark" local ICON_MONEY = "Interface\\Buttons\\UI-GroupLoot-Coin-Up" @@ -22,13 +16,18 @@ WorldPlanCore = { defaults = {}, - + modules = {}, +} +WorldPlanQuestsMixin = { + QuestsByZone = {}, + QuestsByID = {}, + freePins = {}, } WorldPlanPOIMixin = {} -WorldPlanFilterPinMixin = {} +WorldPlanFilterPinMixin = setmetatable({ QuestsByID = {}, freePins = {} }, {__tostring = function() return 'QuestHandler' end}) local WorldPlanFlightMapMixin = setmetatable({}, {__tostring = function() return 'FlightMapHandler' end}) -local WorldQuests = setmetatable({ QuestsByID = {}, freePins = {} }, {__tostring = function() return 'QuestHandler' end}) -local FilterBar = setmetatable({ SummaryHeaders = {} }, {__tostring = function() return 'FilterBar' end}) +local WorldQuests = WorldPlanQuestsMixin + local WorldPlan = WorldPlanCore local QuestPOI = WorldPlanPOIMixin @@ -62,13 +61,6 @@ local MC_GetNumZones, MC_GetZoneInfo = C_MapCanvas.GetNumZones, C_MapCanvas.GetZoneInfo -local PinBaseIndex = 1600 -local BROKEN_ISLES_ID, DALARAN_ID, AZSUNA_ID, VALSHARAH_ID, HIGHMOUNTAIN_ID, STORMHEIM_ID, SURAMAR_ID, EOA_ID = 1007, 1014, 1015,1018, 1024, 1017, 1033, 1096 - --- maps where we do our own anchors -local CONTINENT_MAPS = { [BROKEN_ISLES_ID] = BROKEN_ISLES_ID, } -local WORLD_QUEST_MAPS = { [DALARAN_ID] = 'Dalaran70', [AZSUNA_ID] = 'Azsuna', [VALSHARAH_ID] = "Val'sharah", - [HIGHMOUNTAIN_ID] = 'Highmountain', [STORMHEIM_ID] = 'Stormheim', [SURAMAR_ID] = 'Suramar', [EOA_ID] = 'EyeOfAszhara', } -- default color templates local ARTIFACT_COLOR = ITEM_QUALITY_COLORS[LE_ITEM_QUALITY_ARTIFACT] local MONEY_COLOR = {hex ='|cFFFFFF00', r=1, g=1, b=0} @@ -82,12 +74,13 @@ rewardMask = POI_BORDER_MASK, texture = POI_BORDER_FILL, continent = { - PinSize = 18, - Border = 3, - TrackingBorder = 2, + PinSize = 14, + Border = 2, + TrackingBorder = 1, TagSize = 6, - TimeleftStage = 3, + TimeleftStage = 0, showNumber = true, + numberFontObject = 'WorldPlanFont' }, zone = { PinSize = 22, @@ -96,11 +89,12 @@ TagSize = 12, TimeleftStage = 3, showNumber = true, + numberFontObject = 'WorldPlanNumberFontThin' }, minimized = { PinSize = 4, - Border = 1, - TrackingBorder = 2, + Border = 0, + TrackingBorder = 1, NoIcon = true, TimeleftStage = 1, showNumber = false, @@ -165,12 +159,6 @@ local hasNewQuestPins local isContinentMap local numPins = 0 -local QuestsByZone = {} -local QuestsByFaction = {} -local QuestsByReward = {} -local QuestsByTag = {} -local QuestsByID = {} -local QuestPositions = {} local FilterInclusions = {rewardType = {}, worldQuestType = {}, factionID = {}} local NotificationTypes = {} local ZoneInfo = {} @@ -183,8 +171,6 @@ local notifyPlayed local scanner, wmtt, WorldMapPOIFrame -WorldPlanCore.QuestsByID = QuestsByID -WorldPlanCore.QuestsByZone = QuestsByZone local tasksQueue = {} local function OnNext (func) @@ -203,17 +189,6 @@ tinsert(tasksQueue, func) end --- combines templates -local function DoMixins(frame,...) - for i = 1, select('#', ...) do - for k,v in pairs(select(i,...)) do - frame[k] = v - end - end - return frame -end - - -- update a masked texture without messing up its blending mask local SetMaskedTexture = function(region, file, mask) mask = mask or POI_BORDER_MASK @@ -243,30 +218,42 @@ DEFAULT_CHAT_FRAME:AddMessage("|cFF0088FFWorldPlan|r: " .. msg) end +local current_type_owner +function WorldPlan:AddHandler (frame, defaults) + print('|cFFFFFF00'..self:GetName()..':AddHandler()', frame:GetName()) + tinsert(self.modules, frame) + self.defaults[frame] = defaults + frame.GetTypeInfo = function(frame, typeID) + return self:GetTypeInfo(frame, typeID) + end +end + function WorldPlan:OnLoad () self.Types = setmetatable({}, { __newindex = function(t, k, v) - print('adding type', k) if type(v) == 'table' then - v = setmetatable(v, {__index = function(t,k) - print('##deferring to default key', k) - return DEFAULT_TYPE[k] + print('adding owner', k) + v = setmetatable(v, { + __newindex = function(t2,k2,v2) + if type(v2) == 'table' then + print('adding type', k2) + v2 = setmetatable(v2, {__index = function(t3,k3) + --print('##deferring to default key', k3) + return DEFAULT_TYPE[k3] + end}) + end + rawset(t2,k2,v2) end}) end rawset(t,k,v) end }) - local rgbWhite = {1, 1, 1} - self.Types[REWARD_REAGENT] = { r = 0, g = 1, b = 1 } - self.Types[REWARD_ARTIFACT_POWER] = { r = 1, g = .25, b = .5, hasNumeric = true, numberRGB = rgbWhite } - self.Types[REWARD_GEAR] = { r = .1, g = .2, b = 1 } - self.Types[REWARD_CURRENCY] = { r = 1, g = 1, b = 0, hasNumeric = true, numberRGB = rgbWhite, } - self.Types[REWARD_CASH] = { r = 0, g = 0, b = 0, } + self.Types[self] = {} for index, color in pairs(ITEM_QUALITY_COLORS) do - self.Types[(index+127)] = { r = color.r, g = color.g, b = color.b, hex = color.hex, } + self:AddTypeInfo(self, index, { r = color.r, g = color.g, b = color.b, hex = color.hex, }) end WorldPlan = self @@ -285,16 +272,12 @@ self:RegisterEvent("ARTIFACT_XP_UPDATE") self:RegisterEvent("ADDON_LOADED") self:SetParent(WorldMapFrame) - - WorldPlan.modules = { - WorldQuests, FilterBar, WorldPlanFlightMapMixin, - } end function WorldPlan:OnShow() print(self:GetName()..':OnShow()') if self.isStale then - self:RefreshAll() + self:Refresh() end end @@ -314,7 +297,8 @@ end elseif event == 'WORLD_MAP_UPDATE' then self.currentMapID = GetCurrentMapAreaID() - self:RefreshAll() + print('|cFFFF4400currentMapID =', self.currentMapID) + self:Refresh() else for i, module in ipairs(self.modules) do if module.OnEvent then @@ -360,23 +344,36 @@ hooksecurefunc("UIDropDownMenu_Initialize", self.OnDropDownInitialize) end -function WorldPlan:GetTypeInfo(typeID) +function WorldPlan:AddTypeInfo(owner, id, info) + self.Types[owner] = self.Types[owner] or {} + self.Types[owner][id] = info + print('Type('..owner:GetName()..')('..id..') = '.. tostring(info)) +end + +function WorldPlan:GetTypeInfo(owner, typeID) local info, extraInfo - if (not typeID) or (not self.Types[typeID]) then - qprint('## sent default type') + if not owner then + --print('## deferring to default type list') + else + --print('## pulling for', owner:GetName(), 'id =', typeID) + end + + owner = owner or self + if (not typeID) or (not self.Types[owner][typeID]) then + --print('## sending list default') info = DEFAULT_TYPE else - qprint('## sent defined type', typeID) - info = self.Types[typeID] + --print('## sent list definition', typeID) + info = self.Types[owner][typeID] end if isContinentMap then extraInfo = info.continent - qprint('### continent subtype', extraInfo) + --print('### continent subtype', extraInfo) else extraInfo = info.zone - qprint('### zone subtype', extraInfo) + --print('### zone subtype', extraInfo) end return info, extraInfo end @@ -413,7 +410,8 @@ end end -function WorldPlan:RefreshAll (forced) +function WorldPlan:Refresh (forced) + print('|cFFFFFF00'..self:GetName()..':Refresh()|r forced:', forced, 'init:', self.initialized) if not self.initialized then return end @@ -517,11 +515,22 @@ UIDropDownMenu_AddButton(info) end +-------------------------------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------------------------------------- + +local PinBaseIndex = 1600 +local BROKEN_ISLES_ID, DALARAN_ID, AZSUNA_ID, VALSHARAH_ID, HIGHMOUNTAIN_ID, STORMHEIM_ID, SURAMAR_ID, EOA_ID = 1007, 1014, 1015,1018, 1024, 1017, 1033, 1096 + +-- maps where we do our own anchors +local CONTINENT_MAPS = { [BROKEN_ISLES_ID] = BROKEN_ISLES_ID, } +local WORLD_QUEST_MAPS = { [DALARAN_ID] = 'Dalaran70', [AZSUNA_ID] = 'Azsuna', [VALSHARAH_ID] = "Val'sharah", + [HIGHMOUNTAIN_ID] = 'Highmountain', [STORMHEIM_ID] = 'Stormheim', [SURAMAR_ID] = 'Suramar', [EOA_ID] = 'EyeOfAszhara', } + function WorldQuests:Setup() for mapID, mapName in pairs(WORLD_QUEST_MAPS) do - QuestsByZone[mapID] = {} + self.QuestsByZone[mapID] = {} end @@ -542,8 +551,33 @@ end +local defaults = {} +function WorldQuests:OnLoad() + print('|cFF00FF88'..self:GetName()..':OnLoad') + + WorldPlan:AddHandler(self, defaults) + + local rgbWhite = {1, 1, 1} + WorldPlan:AddTypeInfo(self, REWARD_REAGENT, { r = 0, g = 1, b = 1 }) + WorldPlan:AddTypeInfo(self, REWARD_ARTIFACT_POWER, { r = 1, g = .25, b = .5, hasNumeric = true, numberRGB = rgbWhite }) + WorldPlan:AddTypeInfo(self, REWARD_GEAR, { r = .1, g = .2, b = 1 }) + WorldPlan:AddTypeInfo(self, REWARD_CURRENCY, { r = 1, g = 1, b = 0, hasNumeric = true, numberRGB = {1,1,0}, }) + WorldPlan:AddTypeInfo(self, REWARD_CASH, { r = 0, g = 0, b = 0, }) + + for areaID, fileName in pairs(WORLD_QUEST_MAPS) do + self.QuestsByZone[areaID] = {} + end + + self:RegisterEvent('QUEST_LOG_UPDATE') + self:RegisterEvent('WORLD_QUEST_COMPLETED_BY_SPELL') + self:RegisterEvent('SKILL_LINES_CHANGED') + + +end + function WorldQuests:OnEvent (event, ...) - print('|cFFFFFF00'..tostring(self)..':OnEvent()'..event..'|r', GetTime(), ...) + local print = wqprint + print('|cFFFFFF00'..self:GetName()..':OnEvent()'..event..'|r', GetTime(), ...) if event == 'QUEST_LOG_UPDATE' then local questID, added = ... if questID and added then @@ -552,23 +586,27 @@ else self:RefreshData() end - print('WorldMapFrame', WorldMapFrame:IsVisible(), 'doRefresh:', hasNewQuestPins) - if WorldMapFrame:IsVisible() and hasNewQuestPins then - self:Refresh(true) - end - + print('WorldMapFrame', WorldMapFrame:IsVisible(), 'hasUpdates:', self.hasUpdate) elseif event == 'WORLD_QUEST_COMPLETED_BY_SPELL' then local questID = ... - if questID and QuestsByID[questID] then - self:ReleasePin(QuestsByID[questID]) + if questID and self.QuestsByID[questID] then + self:ReleasePin(self.QuestsByID[questID]) end elseif event == 'SKILL_LINES_CHANGED' then + self.hasUpdate = true + end +end + +function WorldQuests:OnUpdate() + if self.hasUpdate then + wqprint('|cFF00FF00pushing update') self:Refresh(true) end end + local TQ_GetQuestLocation = C_TaskQuest.GetQuestLocation function WorldQuests:AcquirePin (questID, mapID) - local pin = QuestsByID[questID] + local pin = self.QuestsByID[questID] local isNew = false if not pin then isNew = true @@ -582,6 +620,9 @@ pin = CreateFrame('Frame', name, WorldMapPOIFrame, 'WorldPlanQuestPin') pin:SetFrameStrata('HIGH') + pin.GetTypeInfo = function(frame, typeID) + return self:GetTypeInfo(typeID) + end NumPinFrames = NumPinFrames + 1 --pin.iconBorder:SetVertexColor(0,0,0,1) end @@ -593,12 +634,12 @@ pin.questID = questID pin.worldQuest = true - QuestsByID[questID] = pin + self.QuestsByID[questID] = pin else --print('|cFF00FF00Using', pin:GetName()) end mapID = mapID or TQ_GetQuestZoneID(questID) - QuestsByZone[mapID][questID] = pin + self.QuestsByZone[mapID][questID] = pin return pin, isNew end @@ -608,15 +649,12 @@ local id = pin.questId if id then - QuestsByID[id] = nil - for i, zone in pairs(QuestsByZone) do + self.QuestsByID[id] = nil + for i, zone in pairs(self.QuestsByZone) do print('-', i, zone[i]) zone[id] = nil end end - if pin.factionID then - QuestsByFaction[pin.factionID][id] = nil - end pin:Hide() pin:ClearAllPoints() tinsert(self.freePins, pin) @@ -632,48 +670,49 @@ -- info not available yet return end + + print('|cFF00FF88'..self:GetName()..':RefreshData()|r', 'map:', mapID, 'realMap:', GetCurrentMapAreaID()) + if mapID == BROKEN_ISLES_ID then self.hasUpdate = false - print('|cFF00FFFFRefreshQuestsForMap|r', mapID, GetMapNameByID(mapID), superTrackedID) + print('|cFF00FFFFContinent:|r', mapID, GetMapNameByID(mapID), superTrackedID) self.fullSearch = true for i = 1, MC_GetNumZones(mapID) do local submapID, name, depth = MC_GetZoneInfo(mapID, i) self:RefreshData(submapID) end self.fullSearch = nil - elseif QuestsByZone[mapID] then + elseif self.QuestsByZone[mapID] then local taskInfo = TQ_GetQuestsForPlayerByMapID(mapID) - local quest = QuestsByZone[mapID] local numQuests = 0 if taskInfo and #taskInfo >= 1 then - print('|cFF00FFFFRefreshQuestsForMap|r', mapID, GetMapNameByID(mapID), #taskInfo) - wipe(QuestsByZone[mapID]) + print('|cFF00FFFF Zone:|r', mapID, GetMapNameByID(mapID), #taskInfo) + wipe(self.QuestsByZone[mapID]) ZoneInfo[mapID] = taskInfo + qprint('|cFFFF4400START of', GetMapNameByID(mapID)) for taskID, info in pairs(taskInfo) do - print('-', taskID) local questID = info.questId info.mapID = mapID local questPOI = self:AcquirePin(questID, mapID) - local hasUpdate, isPending = questPOI:RefreshData(taskInfo) + local hasUpdate, isPending = questPOI:RefreshData(info) self.hasUpdate = (self.hasUpdate or hasUpdate) self.isPending = (self.isPending or isPending) numQuests = numQuests + 1 end + qprint('|cFFFF4400END of', GetMapNameByID(mapID)) end end - print(' hasUpdate:', self.hasUpdate, 'isPending:', self.isPending, 'timer:', self.OnNext) - if self.hasUpdate then - self.OnNext = self.OnNext or C_Timer.NewTimer(0.25, function() - self:Refresh(true) - self.OnNext = nil - end) + if not self.fullSearch then + print(' hasUpdate:', self.hasUpdate, 'isPending:', self.isPending, 'timer:', (self.OnNext and 'waiting' or '')) + end + end function WorldQuests:Refresh(forced) local print = wqprint - print('|cFF00FF88'..tostring(self)..':Refresh()|r') + print('|cFF00FF88'..self:GetName()..':Refresh()|r') if not WorldMapPOIFrame:IsVisible() then return end @@ -690,11 +729,8 @@ -- prepares elements for a map update function WorldQuests:Reset () local print = wqprint - print('|cFF00FF88'..tostring(self)..':Reset()|r') - wipe(QuestPositions) - wipe(QuestsByReward) - wipe(QuestsByTag) - for questID, pin in pairs(QuestsByID) do + print('|cFF00FF88'..self:GetName()..':Reset()|r') + for questID, pin in pairs(self.QuestsByID) do pin.used = nil end end @@ -715,7 +751,7 @@ print('not updating map for reasons') return end - print('|cFF88FF00'..tostring(self)..':UpdateAnchors|r', submapID, GetMapNameByID(submapID), 'pin count:', numPins) + print('|cFF88FF00'..self:GetName()..':UpdateAnchors|r', submapID, GetMapNameByID(submapID), 'pin count:', numPins) local numZones = MC_GetNumZones(submapID) if numZones then for i = 1, numZones do @@ -723,12 +759,13 @@ self:UpdateAnchors(subMapID) end end - local pins = QuestsByZone[submapID] + local pins = self.QuestsByZone[submapID] if pins then local hostFrame = WorldMapPOIFrame local mapWidth, mapHeight = hostFrame:GetSize() for questID, pin in pairs(pins) do + pin.hasUpdate = true pin:IsShowable() if pin.used then pin:SetFrameLevel(PinBaseIndex+ (pin.whiteListed and 200 or 0) +numPins) @@ -758,10 +795,11 @@ local fadeGrouped = (db.FadeWhileGrouped and IsInGroup()) numPins = 0 - for questID, pin in pairs(QuestsByID) do + for questID, pin in pairs(self.QuestsByID) do -- can we show it? if showQuestPOI and (pin.used) then + pin.hasUpdate = true if fadeGrouped then pin:SetAlpha(0.25) else @@ -790,9 +828,8 @@ -- trap new but animating pins here else -- hard show existing pin - print('refresh #', questID, 'filtered:', pin.filtered) - pin.hasUpdate = true - pin:Show(true) + print('refresh #', questID, 'filtered:', pin.filtered, 'hasUpdate', pin.hasUpdate) + pin:Show() tinsert(debug_show,questID) end else @@ -809,6 +846,7 @@ print(' hiding:', table.concat(debug_hide, ',' )) hasNewQuestPins = nil notifyPlayed = nil + self.hasUpdate = nil end -- data provider manipulations for the taxi map @@ -833,7 +871,7 @@ for pin in self:EnumerateAllPins() do if pin.worldQuest then --print('got pin #', pin.questID) - local wp = QuestsByID[pin.questID] + local wp = self.QuestsByID[pin.questID] if wp then wp:ClearAllPoints() wp:SetParent(FlightMapFrame.ScrollContainer) @@ -873,24 +911,12 @@ print(' |cFFFF4400IsShowable()|r', self.title) - local isIncluded - for filterKey, filterValues in pairs(WorldPlan.UsedFilters) do - local controlValue = self[filterKey] - if controlValue then - local filterType = filterValues[controlValue] - if filterType == true then - isIncluded = true - print(' include? ', filterKey, controlValue, filterType) - end - end - self.filtered = (not isIncluded) + if not self.passesBlizzFilters then + self.filtered = true end - - if not TQ_IsActive(self.questID) then self.used = nil - end - if qType == LE_QUEST_TAG_TYPE_PROFESSION then + elseif qType == LE_QUEST_TAG_TYPE_PROFESSION then if not (db.ShowAllProfessionQuests or (self.tradeskillLineIndex and GetProfessionInfo(self.tradeskillLineIndex))) then self.used = nil end @@ -904,11 +930,10 @@ --- Fixes icons upon size update function QuestPOI:UpdateSize (style, subStyle) - self.style = self.style or POI_DEFAULT_TYPE style = style or self.style subStyle = subStyle or self.subStyle - qprint('|cFF00FF88'..self:GetName()..'|r:UpdateSize()', style, subStyle) + --qprint('|cFF00FF88'..self:GetName()..'|r:UpdateSize()', style, subStyle) self.currentWidth = subStyle.PinSize self.borderSize = subStyle.Border @@ -966,242 +991,11 @@ end -function FilterBar:OnEvent(event) - if event == 'QUEST_LOG_UPDATE' then - self:Refresh() - end -end - -function FilterBar:PassesFilterSet(filterKey, pin) - local passesFilter = true - for filterKey, filters in pairs(QuestFilters) do - for rewardType, value in pairs(QuestFilters[filterKey]) do - if value == 1 and rewardType == pin[filterKey] then - passesFilter = true - elseif value == -1 and rewardType == pin[filterKey] then - passesFilter = false - end - end - end - return passesFilter -end - - -local bountyIndex -local debug_headers = {} - -function FilterBar:Setup() - self:GetFilters() -end - -function FilterBar:OnEvent(event,...) - if event == 'QUEST_LOG_UPDATE' then - self:Reset() - self:Refresh() - end -end - -function FilterBar:GetFilters() - - local print = fbprint - wipe(WorldPlan.FilterOptions) - - for index, info in ipairs(POI_FILTER_OPTIONS) do - tinsert(WorldPlan.FilterOptions, info) - end - self.bounties, self.numBounties = GetQuestBountyInfoForMapID(WorldPlan.currentMapID) - self.BountyFilters = {} - for index, data in ipairs(self.bounties) do - local info = self.BountyFilters[index] - if not info then - info = {} - self.BountyFilters[index] = info - end - - local questTitle = GetQuestLogTitle(GetQuestLogIndexByID(data.questID)) - - info.filterKey = 'factionID' - info.filterValue = data.factionID - info.label = questTitle - info.texture = data.icon - print('loading emissary', questTitle) - tinsert(WorldPlan.FilterOptions, info) - --{ filterKey= 'worldQuestType', filterValue = LE_QUEST_TAG_TYPE_PROFESSION, label = 'Profession', texture = "Interface\\LFGFRAME\\UI-LFR-PORTRAIT", }, - end -end - -function FilterBar:Reset() - self:GetFilters() -end - -function FilterBar:Refresh(forced) - local print = fbprint - local blocks = self.SummaryHeaders - local relativeFrame = WorldMapFrame.UIElementsFrame.TrackingOptionsButton - local numHeaders = 0 - print('|cFF00FF88'..tostring(self)..':Refresh()|r', 'currentMap=',WorldPlan.currentMapID) - - - local quests = QuestsByZone[WorldPlan.currentMapID] or QuestsByID - - - for index, info in ipairs(WorldPlan.FilterOptions) do - local numQuests = 0 - - for questID, pin in pairs(quests) do - if pin.used then - if not info.filterKey then - numQuests = numQuests + 1 - elseif pin[info.filterKey] == info.filterValue then - numQuests = numQuests + 1 - end - end - end - print(tostring(index).. ' ("'..tostring(info.label)..'" f('.. tostring(info.filterKey).. '='..tostring(info.filterValue) .. '), '..tostring(numQuests)..')') - - if numQuests >= 1 then - numHeaders = numHeaders + 1 - local button = blocks[numHeaders] - if not blocks[numHeaders] then - button = CreateFrame('Button', 'WorldPlanFilterButton'..numHeaders, WorldMapScrollFrame, 'WorldPlanFilterPin') - for k,v in pairs(info)do print(k,v) end - button.iconBorder:SetTexture(info.fill or POI_BORDER_FILL) - button.iconBorder:SetMask(info.mask or POI_BORDER_MASK) - button.iconBorder:SetDesaturated(info.desaturated) - button.supertrackBorder:SetTexture(info.fill or POI_BORDER_FILL) - button.supertrackBorder:SetMask(info.mask or POI_BORDER_MASK) - button.supertrackBorder:SetDesaturated(true) - blocks[numHeaders] = button - end - - button:SetID(index) - button.spacing = ((info.filterKey ~= relativeFrame.filterKey) and 10) or 0 - button.relativeFrame = relativeFrame - button:Refresh(info, (numHeaders == 1), numQuests) - button:Show() - relativeFrame = button - end - - end - - self.numHeaders = numHeaders - for i = numHeaders + 1, #WorldPlan.FilterOptions do - if self.SummaryHeaders[i] then - self.SummaryHeaders[i]:Hide() - end - end -end - -function FilterBar:Cleanup() - - -- hide trailing buttons -end - - -function FilterPin:Refresh(info, isFirst, numQuests) - local print = fbprint - isFirst = isFirst or self.isFirst - numQuests = numQuests or self.numQuests - - if info then - self.isFirst = isFirst - self.numQuests = numQuests - self.filterKey = info.filterKey - self.filterValue = info.filterValue - self.tagID = info.tagID - - self.icon:ClearAllPoints() - self.icon:SetTexture(info.texture) - self.icon:SetAllPoints(self) - self.supertrackBorder:Hide() - self.count:SetText(numQuests) - self:Show() - end - - - self.itemTexture = self.texture - - if isFirst then - self:SetPoint('TOP', self.relativeFrame, 'BOTTOM', 0, -5) - else - self:SetPoint('TOPRIGHT', self.relativeFrame, 'BOTTOMRIGHT', 0, -(3*2 + 1 + (self.spacing or 0))) - - end - print('anchor to', self.relativeFrame:GetName()) - - local r, g, b, a = 1,1,1,1 - local used = WorldPlan.UsedFilters[self.filterKey] - if used and self.filterKey then - if used[self.filterValue] == true then - r, g, b = 0, 1, 0 - elseif used[self.filterValue] == false then - r, g, b = 1, 0, 0 - end - end - self.iconBorder:SetVertexColor(r, g, b, a) - self:UpdateSize() -end - -function FilterPin:OnLoad() - self:RegisterForClicks('AnyUp') - self:SetFrameStrata('HIGH') - self:SetFrameLevel(151) - self:SetScript('OnUpdate', nil) - self.style = db.filterStyle - self.subStyle = db.defaultPinStyle.continent -end - -function FilterPin:OnUpdate () - -end - -function FilterPin:OnLeave () - if GameTooltip:IsOwned(self) then - GameTooltip:Hide() - end -end - --- shift-click: reset filter --- click: rotate through include(1), exclude(-1), ignore(nil) -function FilterPin:OnClick (button) - local print = fbprint - local filterKey = self.filterKey - local filterValue = self.filterValue - - - local operation = opPrefix - local setInclude = (button == 'LeftButton') - - - if not filterKey then - -- resetting - wipe(WorldPlan.UsedFilters) - - elseif IsShiftKeyDown() then - WorldPlan.UsedFilters[filterKey] = nil - else - WorldPlan.UsedFilters[filterKey] = WorldPlan.UsedFilters[filterKey] or {} - WorldPlan.UsedFilters[filterKey][filterValue] = setInclude - print(filterKey, filterValue, '=', setInclude) - - for index, info in ipairs(WorldPlan.FilterOptions) do - if info.filterKey == filterKey then - if (not IsControlKeyDown()) and (filterValue ~= info.filterValue) then - WorldPlan.UsedFilters[filterKey][info.filterValue] = (not setInclude) - print(filterKey, info.filterValue, '=', WorldPlan.UsedFilters[filterKey][info.filterValue]) - end - end - end - - end - print('|cFF00FF88Filter Update:', filterKey, filterValue, operation) - WorldPlan:RefreshAll() -end --%debug% local SetTimedCallbackForAllPins = function(seconds, callback) C_Timer.After(seconds, function() - for id, pin in pairs(QuestsByID) do + for id, pin in pairs(WorldPlanQuests.QuestsByID) do callback(pin) end end)
--- a/WorldPlan.toc Thu Oct 27 13:50:56 2016 -0400 +++ b/WorldPlan.toc Fri Oct 28 14:06:07 2016 -0400 @@ -10,4 +10,5 @@ ## OptionalDeps: Veneer WorldPlan.xml -ClassPlan.xml \ No newline at end of file +FilterBar.xml +ClassPlan.xml
--- a/WorldPlan.xml Thu Oct 27 13:50:56 2016 -0400 +++ b/WorldPlan.xml Fri Oct 28 14:06:07 2016 -0400 @@ -4,9 +4,9 @@ <Script file="WorldPlan.lua" /> <Script file="QuestPOI.lua" /> - <Font name="WorldPlanFont" font="Interface\AddOns\WorldPlan\Font\ArchivoNarrow-Bold.ttf" height="13" outline="NORMAL" virtual="true" /> + <Font name="WorldPlanFont" font="Interface\AddOns\WorldPlan\Font\ArchivoNarrow-Regular.ttf" height="12" outline="NORMAL" virtual="true" /> <Font name="WorldPlanNumberFont" font="Interface\AddOns\WorldPlan\Font\ArchivoNarrow-Bold.ttf" height="10" outline="NORMAL" virtual="true" /> - <Font name="WorldPlanNumberFontThin" font="Interface\AddOns\WorldPlan\Font\ArchivoNarrow-Regular.ttf" height="13" outline="THICK" virtual="true" /> + <Font name="WorldPlanNumberFontThin" font="Interface\AddOns\WorldPlan\Font\ArchivoNarrow-Regular.ttf" height="14" outline="NORMAL" virtual="true" /> <GameTooltip name="WorldPlanTooltip" parent="UIParent" inherits="GameTooltipTemplate"> @@ -87,12 +87,12 @@ </Texture> </Layer> <Layer level="OVERLAY"> - <FontString inherits="WorldPlanNumberFontThin" parentKey="count"> + <FontString name="$parentCount" inherits="WorldPlanNumberFontThin" parentKey="count"> <Anchors> <Anchor point="BOTTOM" relativeKey="$parent.icon" x="0" y="0" /> </Anchors> </FontString> - <FontString inherits="WorldPlanNumberFont" parentKey="timeLabel"> + <FontString name="$parentTimeLeft" inherits="WorldPlanNumberFont" parentKey="timeLabel"> <Anchors> <Anchor point="BOTTOM" relativePoint="TOP" relativeKey="$parent.label" x="0" y="0" /> </Anchors> @@ -153,4 +153,13 @@ </Scripts> </Frame> + <Frame name="$parentQuests" mixin="WorldPlanQuestsMixin" parent="WorldPlan"> + <Scripts> + <OnLoad method="OnLoad" /> + <OnEvent method="OnEvent" /> + <OnUpdate method="OnUpdate" /> + <OnShow method="OnShow" /> + </Scripts> + </Frame> + </Ui> \ No newline at end of file