Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .pkgmeta
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ externals:
Libs/AceDB-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceDB-3.0
tag: "Release-r1377"
Libs/AceLocale-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceLocale-3.0
tag: "Release-r1377"
Libs/AceConsole-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceConsole-3.0
tag: "Release-r1377"
Expand Down
1 change: 1 addition & 0 deletions Boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ addon.libs = addon.libs or {}
addon.libs.LibDataBroker = LibStub("LibDataBroker-1.1")
addon.libs.LibDBIcon = LibStub("LibDBIcon-1.0")
addon.libs.AceDB = LibStub("AceDB-3.0")
addon.libs.AceLocale = LibStub("AceLocale-3.0")
addon.libs.AceAddon = LibStub("AceAddon-3.0")
addon.libs.LiqUI = LibStub("LiqUI-1.0")

Expand Down
57 changes: 57 additions & 0 deletions Data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ local addon = select(2, ...)
local Data = {}
addon.Data = Data

local L = addon.L
local Helpers = addon.Helpers
local Constants = addon.Constants
local LibLiqUI = addon.libs.LiqUI
Expand Down Expand Up @@ -426,6 +427,9 @@ function Data:MigrateDB()
for _, category in ipairs(self.ObjectiveCategories or {}) do
if category and category.id and category.name then
migrateHiddenColumnKey(mainHidden, category.name, "category_" .. tostring(category.id))
if category.legacyName then
migrateHiddenColumnKey(mainHidden, category.legacyName, "category_" .. tostring(category.id))
end
end
end

Expand Down Expand Up @@ -705,6 +709,7 @@ function Data:ScanCalendar()
if not numEvents then
return
end
self.cache.isDarkmoonOpen = false
for i = 1, numEvents do
local event = C_Calendar.GetDayEvent(0, today, i)
if event and not Helpers:IsSecretValue(event.eventID) and event.eventID == 479 then
Expand Down Expand Up @@ -1108,6 +1113,22 @@ function Data:GetExpansionByID(expansionID)
return nil
end

---@param expansion WK_Expansion?
---@return string
function Data:GetExpansionDisplayName(expansion)
if not expansion then return "" end
if expansion.id == Enum.ExpansionLevel.Dragonflight then
return L["EXPANSION_DRAGONFLIGHT"]
end
if expansion.id == Enum.ExpansionLevel.WarWithin then
return L["EXPANSION_WAR_WITHIN"]
end
if expansion.id == Enum.ExpansionLevel.Midnight then
return L["EXPANSION_MIDNIGHT"]
end
return expansion.name or ""
end

---@return WK_SkillLine[]
function Data:GetSkillLines()
return self.SkillLines
Expand All @@ -1124,6 +1145,19 @@ function Data:GetSkillLineByID(skillLineID)
return nil
end

---@param skillLine WK_SkillLine?
---@return string
function Data:GetSkillLineDisplayName(skillLine)
if not skillLine then return "" end
if C_TradeSkillUI and C_TradeSkillUI.GetTradeSkillDisplayName then
local displayName = C_TradeSkillUI.GetTradeSkillDisplayName(skillLine.id)
if displayName and displayName ~= "" then
return displayName
end
end
return skillLine.name or ""
end

---@return WK_SkillLineVariant[]
function Data:GetSkillLineVariants()
return self.SkillLineVariants
Expand All @@ -1140,6 +1174,19 @@ function Data:GetSkillLineVariantByID(skillLineVariantID)
return nil
end

---@param skillLineVariant WK_SkillLineVariant?
---@return string
function Data:GetSkillLineVariantDisplayName(skillLineVariant)
if not skillLineVariant then return "" end
if C_TradeSkillUI and C_TradeSkillUI.GetTradeSkillDisplayName then
local displayName = C_TradeSkillUI.GetTradeSkillDisplayName(skillLineVariant.id)
if displayName and displayName ~= "" then
return displayName
end
end
return skillLineVariant.name or ""
end

---@return WK_Objective[]
function Data:GetObjectives()
return self.Objectives
Expand All @@ -1161,6 +1208,16 @@ function Data:GetObjectiveCategoryByID(categoryID)
return nil
end

---@param repeatable string?
---@return string
function Data:GetRepeatableDisplayName(repeatable)
if repeatable == "No" then return L["REPEATABLE_NO"] end
if repeatable == "Weekly" then return L["REPEATABLE_WEEKLY"] end
if repeatable == "Monthly" then return L["REPEATABLE_MONTHLY"] end
if repeatable == "Yes" then return L["REPEATABLE_YES"] end
return repeatable or ""
end

-- Get the progress for all objectives for the current character.
function Data:GetAllProgress()
local character = self:GetCharacter()
Expand Down
24 changes: 16 additions & 8 deletions Data/ObjectiveCategories.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,26 @@
local addon = select(2, ...)

local Constants = addon.Constants
local L = addon.L

---@class WK_Data
local Data = addon.Data

---@param text string
---@param repeatable string
---@return string
local function categoryDescription(text, repeatable)
return text .. "\n\n" .. L["CATEGORY_REPEATABLE_LINE"]:format(WHITE_FONT_COLOR:WrapTextInColorCode(repeatable))
end

---@type WK_ObjectiveCategory[]
Data.ObjectiveCategories = {
{id = Constants.objectiveCategory.Unique, name = "Uniques", description = "These are one-time items found in treasures around the world and sold by vendors.\n\nRepeatable: " .. WHITE_FONT_COLOR:WrapTextInColorCode("No"), type = "item", repeatable = "No",},
{id = Constants.objectiveCategory.FirstCraft, name = "First Craft", description = "These are your first craft or first gathering bonuses.\n\nNote: Not every profession or expansion is updated yet.\n\nRepeatable: " .. WHITE_FONT_COLOR:WrapTextInColorCode("No"), type = "recipe", repeatable = "No",},
{id = Constants.objectiveCategory.Treatise, name = "Treatise", description = "These can be crafted with Inscription. Send a Crafting Order if you don't have the profession.\n\nRepeatable: " .. WHITE_FONT_COLOR:WrapTextInColorCode("Weekly"), type = "item", repeatable = "Weekly", hint = true,},
{id = Constants.objectiveCategory.WeeklyQuest, name = "Weekly Quest", description = "Complete a quest from your profession trainer or from the Artisan's Consortium.\n\nRepeatable: " .. WHITE_FONT_COLOR:WrapTextInColorCode("Weekly"), type = "quest", repeatable = "Weekly",},
{id = Constants.objectiveCategory.Treasure, name = "Treasure", description = "These are randomly looted from treasures around the world.\n\nRepeatable: " .. WHITE_FONT_COLOR:WrapTextInColorCode("Weekly"), type = "item", repeatable = "Weekly", hint = true,},
{id = Constants.objectiveCategory.Gathering, name = "Gathering", description = "These are randomly looted from gathering nodes around the world.\n\nFor Enchanting these are looted from Disenchanting.\n\nRepeatable: " .. WHITE_FONT_COLOR:WrapTextInColorCode("Weekly"), type = "item", repeatable = "Weekly",},
{id = Constants.objectiveCategory.DarkmoonQuest, name = "Darkmoon", description = "Complete a quest at the Darkmoon Faire.\n\nRepeatable: " .. WHITE_FONT_COLOR:WrapTextInColorCode("Monthly"), type = "quest", repeatable = "Monthly",},
{id = Constants.objectiveCategory.CatchUp, name = "Catch-Up", description = "Keep track of your catch-up points.\n\nYou will be able to gain these points once you've completed some of the other objectives.\n\nRepeatable: " .. WHITE_FONT_COLOR:WrapTextInColorCode("Yes"), type = "item", repeatable = "Yes",},
{id = Constants.objectiveCategory.Unique, name = L["CATEGORY_UNIQUE"], legacyName = "Uniques", description = categoryDescription(L["CATEGORY_UNIQUE_DESC"], L["REPEATABLE_NO"]), type = "item", repeatable = "No",},
{id = Constants.objectiveCategory.FirstCraft, name = L["CATEGORY_FIRST_CRAFT"], legacyName = "First Craft", description = categoryDescription(L["CATEGORY_FIRST_CRAFT_DESC"], L["REPEATABLE_NO"]), type = "recipe", repeatable = "No",},
{id = Constants.objectiveCategory.Treatise, name = L["CATEGORY_TREATISE"], legacyName = "Treatise", description = categoryDescription(L["CATEGORY_TREATISE_DESC"], L["REPEATABLE_WEEKLY"]), type = "item", repeatable = "Weekly", hint = true,},
{id = Constants.objectiveCategory.WeeklyQuest, name = L["CATEGORY_WEEKLY_QUEST"], legacyName = "Weekly Quest", description = categoryDescription(L["CATEGORY_WEEKLY_QUEST_DESC"], L["REPEATABLE_WEEKLY"]), type = "quest", repeatable = "Weekly",},
{id = Constants.objectiveCategory.Treasure, name = L["CATEGORY_TREASURE"], legacyName = "Treasure", description = categoryDescription(L["CATEGORY_TREASURE_DESC"], L["REPEATABLE_WEEKLY"]), type = "item", repeatable = "Weekly", hint = true,},
{id = Constants.objectiveCategory.Gathering, name = L["CATEGORY_GATHERING"], legacyName = "Gathering", description = categoryDescription(L["CATEGORY_GATHERING_DESC"], L["REPEATABLE_WEEKLY"]), type = "item", repeatable = "Weekly",},
{id = Constants.objectiveCategory.DarkmoonQuest, name = L["CATEGORY_DARKMOON"], legacyName = "Darkmoon", description = categoryDescription(L["CATEGORY_DARKMOON_DESC"], L["REPEATABLE_MONTHLY"]), type = "quest", repeatable = "Monthly",},
{id = Constants.objectiveCategory.CatchUp, name = L["CATEGORY_CATCH_UP"], legacyName = "Catch-Up", description = categoryDescription(L["CATEGORY_CATCH_UP_DESC"], L["REPEATABLE_YES"]), type = "item", repeatable = "Yes",},
}
1 change: 1 addition & 0 deletions Debug/Types/Objectives.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---@class WK_ObjectiveCategory
---@field id WK_ObjectiveCategoryId
---@field name string
---@field legacyName string?
---@field description string
---@field type "item" | "quest" | "recipe"
---@field repeatable "No" | "Yes" | "Weekly" | "Monthly"
Expand Down
4 changes: 4 additions & 0 deletions Locales/Init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---@class WK_Addon
local addon = select(2, ...)

addon.L = addon.libs.AceLocale:GetLocale(addon.name)
86 changes: 86 additions & 0 deletions Locales/enUS.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---@class WK_Addon
local addon = select(2, ...)

local L = addon.libs.AceLocale:NewLocale(addon.name, "enUS", true, true)
if not L then return end

L["TABLE_HEADER_NAME"] = "Name"
L["TABLE_HEADER_REALM"] = "Realm"
L["TABLE_HEADER_LAST_UPDATE"] = "Last Update"
L["TABLE_HEADER_PROFESSION"] = "Profession"
L["TABLE_HEADER_EXPANSION"] = "Expansion"
L["TABLE_HEADER_SKILL"] = "Skill"
L["TABLE_HEADER_CONCENTRATION"] = "Concentration"
L["TABLE_HEADER_KNOWLEDGE"] = "Knowledge"
L["TABLE_HEADER_OBJECTIVE"] = "Objective"
L["TABLE_HEADER_CATEGORY"] = "Category"
L["TABLE_HEADER_LOCATION"] = "Location"
L["TABLE_HEADER_REPEATABLE"] = "Repeat?"
L["TABLE_HEADER_PROGRESS"] = "Progress"
L["TABLE_HEADER_POINTS"] = "Points"

L["TOOLTIP_NAME"] = "Your characters."
L["TOOLTIP_REALM"] = "Realm names."
L["TOOLTIP_LAST_UPDATE"] = "The last time data was saved for this character."
L["TOOLTIP_PROFESSION"] = "Your professions."
L["TOOLTIP_EXPANSION"] = "Expansion for this profession row."
L["TOOLTIP_SKILL"] = "Current skill levels.\n\nNote: This is only updated when you open the profession window or craft a recipe."
L["TOOLTIP_CONCENTRATION"] = "Current concentration."
L["TOOLTIP_KNOWLEDGE_TITLE"] = "Knowledge Points"
L["TOOLTIP_KNOWLEDGE"] = "Current knowledge gained."

L["TITLE_CHECKLIST"] = "Checklist"
L["TITLEBAR_CHARACTERS"] = "Characters"
L["TITLEBAR_CHARACTERS_TOOLTIP"] = "Enable/Disable your characters."
L["TITLEBAR_EXPANSION"] = "Expansion"
L["TITLEBAR_EXPANSION_MAIN_TOOLTIP"] = "Filter rows by selected expansions."
L["TITLEBAR_EXPANSION_CHECKLIST_TOOLTIP"] = "Filter table by expansion."
L["TITLEBAR_COLUMNS"] = "Columns"
L["TITLEBAR_COLUMNS_MAIN_TOOLTIP"] = "Enable/Disable table columns."
L["TITLEBAR_COLUMNS_CHECKLIST_TOOLTIP"] = "Toggle columns."
L["TITLEBAR_CHECKLIST"] = "Checklist"
L["TITLEBAR_CHECKLIST_TOOLTIP"] = "Toggle the Checklist window"
L["TITLEBAR_CATEGORIES"] = "Categories"
L["TITLEBAR_CATEGORIES_TOOLTIP"] = "Toggle categories."
L["TITLEBAR_TOGGLE"] = "Toggle List"
L["TITLEBAR_TOGGLE_TOOLTIP"] = "Expand/Collapse the checklist."

L["SETTING_SHOW_FULL_PROFESSION_NAME"] = "Show full profession name"
L["SETTING_SHOW_FULL_PROFESSION_NAME_TOOLTIP"] = "Show the full profession name with the expansion variant."
L["SETTING_HIDE_LOW_LEVEL_PROFESSIONS"] = "Hide low level professions"
L["SETTING_HIDE_LOW_LEVEL_PROFESSIONS_TOOLTIP"] = "Hide professions with a skill level below 25."
L["SETTING_SHOW_MINIMAP_BUTTON"] = "Show the minimap button"
L["SETTING_SHOW_MINIMAP_BUTTON_TOOLTIP"] = "It does get crowded around the minimap sometimes."
L["SETTING_LOCK_MINIMAP_BUTTON"] = "Lock the minimap button"
L["SETTING_LOCK_MINIMAP_BUTTON_TOOLTIP"] = "No more moving the button around accidentally!"
L["SETTING_HIDE_IN_COMBAT"] = "Hide in combat"
L["SETTING_HIDE_IN_DUNGEONS"] = "Hide in dungeons"
L["SETTING_HIDE_COMPLETED_OBJECTIVES"] = "Hide completed objectives"

L["CATEGORY_UNIQUE"] = "Uniques"
L["CATEGORY_FIRST_CRAFT"] = "First Craft"
L["CATEGORY_TREATISE"] = "Treatise"
L["CATEGORY_WEEKLY_QUEST"] = "Weekly Quest"
L["CATEGORY_TREASURE"] = "Treasure"
L["CATEGORY_GATHERING"] = "Gathering"
L["CATEGORY_DARKMOON"] = "Darkmoon"
L["CATEGORY_CATCH_UP"] = "Catch-Up"

L["CATEGORY_UNIQUE_DESC"] = "These are one-time items found in treasures around the world and sold by vendors."
L["CATEGORY_FIRST_CRAFT_DESC"] = "These are your first craft or first gathering bonuses.\n\nNote: Not every profession or expansion is updated yet."
L["CATEGORY_TREATISE_DESC"] = "These can be crafted with Inscription. Send a Crafting Order if you don't have the profession."
L["CATEGORY_WEEKLY_QUEST_DESC"] = "Complete a quest from your profession trainer or from the Artisan's Consortium."
L["CATEGORY_TREASURE_DESC"] = "These are randomly looted from treasures around the world."
L["CATEGORY_GATHERING_DESC"] = "These are randomly looted from gathering nodes around the world.\n\nFor Enchanting these are looted from Disenchanting."
L["CATEGORY_DARKMOON_DESC"] = "Complete a quest at the Darkmoon Faire."
L["CATEGORY_CATCH_UP_DESC"] = "Keep track of your catch-up points.\n\nYou will be able to gain these points once you've completed some of the other objectives."
L["CATEGORY_REPEATABLE_LINE"] = "Repeatable: %s"

L["REPEATABLE_NO"] = "No"
L["REPEATABLE_WEEKLY"] = "Weekly"
L["REPEATABLE_MONTHLY"] = "Monthly"
L["REPEATABLE_YES"] = "Yes"

L["EXPANSION_DRAGONFLIGHT"] = "Dragonflight"
L["EXPANSION_WAR_WITHIN"] = "The War Within"
L["EXPANSION_MIDNIGHT"] = "Midnight"
86 changes: 86 additions & 0 deletions Locales/zhCN.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---@class WK_Addon
local addon = select(2, ...)

local L = addon.libs.AceLocale:NewLocale(addon.name, "zhCN")
if not L then return end

L["TABLE_HEADER_NAME"] = "角色"
L["TABLE_HEADER_REALM"] = "服务器"
L["TABLE_HEADER_LAST_UPDATE"] = "最后更新"
L["TABLE_HEADER_PROFESSION"] = "专业"
L["TABLE_HEADER_EXPANSION"] = "资料片"
L["TABLE_HEADER_SKILL"] = "技能"
L["TABLE_HEADER_CONCENTRATION"] = "专注值"
L["TABLE_HEADER_KNOWLEDGE"] = "知识点"
L["TABLE_HEADER_OBJECTIVE"] = "目标"
L["TABLE_HEADER_CATEGORY"] = "分类"
L["TABLE_HEADER_LOCATION"] = "地点"
L["TABLE_HEADER_REPEATABLE"] = "可重复?"
L["TABLE_HEADER_PROGRESS"] = "进度"
L["TABLE_HEADER_POINTS"] = "点数"

L["TOOLTIP_NAME"] = "你的角色。"
L["TOOLTIP_REALM"] = "服务器名称。"
L["TOOLTIP_LAST_UPDATE"] = "该角色上次保存数据的时间。"
L["TOOLTIP_PROFESSION"] = "你的专业。"
L["TOOLTIP_EXPANSION"] = "此专业行所属的资料片。"
L["TOOLTIP_SKILL"] = "当前技能等级。\n\n注意:只有在打开专业窗口或制作配方时才会更新。"
L["TOOLTIP_CONCENTRATION"] = "当前专注值。"
L["TOOLTIP_KNOWLEDGE_TITLE"] = "专业知识点"
L["TOOLTIP_KNOWLEDGE"] = "当前已获得的知识点。"

L["TITLE_CHECKLIST"] = "清单"
L["TITLEBAR_CHARACTERS"] = "角色"
L["TITLEBAR_CHARACTERS_TOOLTIP"] = "启用或禁用你的角色。"
L["TITLEBAR_EXPANSION"] = "资料片"
L["TITLEBAR_EXPANSION_MAIN_TOOLTIP"] = "按选择的资料片筛选行。"
L["TITLEBAR_EXPANSION_CHECKLIST_TOOLTIP"] = "按资料片筛选表格。"
L["TITLEBAR_COLUMNS"] = "列"
L["TITLEBAR_COLUMNS_MAIN_TOOLTIP"] = "启用或禁用表格列。"
L["TITLEBAR_COLUMNS_CHECKLIST_TOOLTIP"] = "切换列显示。"
L["TITLEBAR_CHECKLIST"] = "清单"
L["TITLEBAR_CHECKLIST_TOOLTIP"] = "切换清单窗口"
L["TITLEBAR_CATEGORIES"] = "分类"
L["TITLEBAR_CATEGORIES_TOOLTIP"] = "切换分类显示。"
L["TITLEBAR_TOGGLE"] = "折叠清单"
L["TITLEBAR_TOGGLE_TOOLTIP"] = "展开或折叠清单。"

L["SETTING_SHOW_FULL_PROFESSION_NAME"] = "显示完整专业名称"
L["SETTING_SHOW_FULL_PROFESSION_NAME_TOOLTIP"] = "显示包含资料片变体的完整专业名称。"
L["SETTING_HIDE_LOW_LEVEL_PROFESSIONS"] = "隐藏低等级专业"
L["SETTING_HIDE_LOW_LEVEL_PROFESSIONS_TOOLTIP"] = "隐藏技能等级低于 25 的专业。"
L["SETTING_SHOW_MINIMAP_BUTTON"] = "显示小地图按钮"
L["SETTING_SHOW_MINIMAP_BUTTON_TOOLTIP"] = "小地图周围有时确实会有点拥挤。"
L["SETTING_LOCK_MINIMAP_BUTTON"] = "锁定小地图按钮"
L["SETTING_LOCK_MINIMAP_BUTTON_TOOLTIP"] = "避免不小心移动按钮。"
L["SETTING_HIDE_IN_COMBAT"] = "战斗中隐藏"
L["SETTING_HIDE_IN_DUNGEONS"] = "地下城中隐藏"
L["SETTING_HIDE_COMPLETED_OBJECTIVES"] = "隐藏已完成目标"

L["CATEGORY_UNIQUE"] = "一次性"
L["CATEGORY_FIRST_CRAFT"] = "首次制作"
L["CATEGORY_TREATISE"] = "论述"
L["CATEGORY_WEEKLY_QUEST"] = "周常任务"
L["CATEGORY_TREASURE"] = "宝藏"
L["CATEGORY_GATHERING"] = "采集"
L["CATEGORY_DARKMOON"] = "暗月"
L["CATEGORY_CATCH_UP"] = "追赶"

L["CATEGORY_UNIQUE_DESC"] = "这些是世界各地宝藏中发现或商人出售的一次性物品。"
L["CATEGORY_FIRST_CRAFT_DESC"] = "这些是首次制作或首次采集奖励。\n\n注意:并非所有专业或资料片都已更新。"
L["CATEGORY_TREATISE_DESC"] = "这些可以通过铭文制作。如果你没有该专业,可以发布制造订单。"
L["CATEGORY_WEEKLY_QUEST_DESC"] = "完成专业训练师或匠人商盟提供的任务。"
L["CATEGORY_TREASURE_DESC"] = "这些会从世界各地的宝藏中随机拾取。"
L["CATEGORY_GATHERING_DESC"] = "这些会从世界各地的采集点中随机拾取。\n\n附魔专业则来自分解。"
L["CATEGORY_DARKMOON_DESC"] = "完成暗月马戏团的任务。"
L["CATEGORY_CATCH_UP_DESC"] = "追踪你的追赶点数。\n\n完成部分其它目标后,即可获得这些点数。"
L["CATEGORY_REPEATABLE_LINE"] = "可重复:%s"

L["REPEATABLE_NO"] = "否"
L["REPEATABLE_WEEKLY"] = "每周"
L["REPEATABLE_MONTHLY"] = "每月"
L["REPEATABLE_YES"] = "是"

L["EXPANSION_DRAGONFLIGHT"] = "巨龙时代"
L["EXPANSION_WAR_WITHIN"] = "地心之战"
L["EXPANSION_MIDNIGHT"] = "至暗之夜"
Loading