mirror of
https://github.com/ckaczor/TuskarrRestockTracker.git
synced 2026-01-25 01:25:41 -05:00
Compare commits
11 Commits
10.0.2-alp
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 999328a358 | |||
| 913fcfeedd | |||
|
|
11a42d3e70 | ||
| 35fa52c2a1 | |||
| 01d3cc5ab6 | |||
| c75dc82327 | |||
| d31d896fd9 | |||
| 6f50ab4dc6 | |||
| 98b6c4a1d0 | |||
| 69d0addd0c | |||
| 700b31d52b |
9
.pkgmeta
9
.pkgmeta
@@ -1,4 +1,4 @@
|
|||||||
package-as: TuskarrCatchAndRelease
|
package-as: TuskarrRestockTracker
|
||||||
|
|
||||||
externals:
|
externals:
|
||||||
Libs/LibStub:
|
Libs/LibStub:
|
||||||
@@ -8,8 +8,7 @@ externals:
|
|||||||
url: https://repos.wowace.com/wow/ace3/trunk/CallbackHandler-1.0
|
url: https://repos.wowace.com/wow/ace3/trunk/CallbackHandler-1.0
|
||||||
tag: latest
|
tag: latest
|
||||||
Libs/LibQTip-1.0:
|
Libs/LibQTip-1.0:
|
||||||
url: https://repos.wowace.com/wow/libqtip-1-0
|
url: https://repos.curseforge.com/wow/libqtip-1-0
|
||||||
tag: latest
|
|
||||||
Libs/LibDataBroker-1.1:
|
Libs/LibDataBroker-1.1:
|
||||||
url: https://github.com/tekkub/libdatabroker-1-1
|
url: https://github.com/tekkub/libdatabroker-1-1
|
||||||
tag: latest
|
tag: latest
|
||||||
@@ -39,4 +38,6 @@ externals:
|
|||||||
tag: latest
|
tag: latest
|
||||||
Libs/LibDBIcon-1.0:
|
Libs/LibDBIcon-1.0:
|
||||||
url: https://repos.wowace.com/wow/libdbicon-1-0/trunk/LibDBIcon-1.0
|
url: https://repos.wowace.com/wow/libdbicon-1-0/trunk/LibDBIcon-1.0
|
||||||
tag: latest
|
tag: latest
|
||||||
|
|
||||||
|
enable-nolib-creation: no
|
||||||
@@ -5,7 +5,7 @@ if not L then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
L["Tuskarr Catch and Release"] = true
|
L["Tuskarr Restock Tracker"] = true
|
||||||
L["Catch and Release: Scalebelly Mackerel"] = true
|
L["Catch and Release: Scalebelly Mackerel"] = true
|
||||||
L["Catch and Release: Thousandbite Piranha"] = true
|
L["Catch and Release: Thousandbite Piranha"] = true
|
||||||
L["Catch and Release: Aileron Seamoth"] = true
|
L["Catch and Release: Aileron Seamoth"] = true
|
||||||
|
|||||||
@@ -4,5 +4,28 @@ local L = LibStub("AceLocale-3.0"):NewLocale(ADDON_NAME, "ruRU")
|
|||||||
if not L then
|
if not L then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
-- Translator ZamestoTV
|
||||||
-- @localization(locale="ruRU", format="lua_additive_table")@
|
L["Tuskarr Restock Tracker"] = "Tuskarr Restock Tracker"
|
||||||
|
L["Catch and Release: Scalebelly Mackerel"] = "Поймай и отпусти: Чешуебрюхая скумбрия"
|
||||||
|
L["Catch and Release: Thousandbite Piranha"] = "Поймай и отпусти: Тысячезубая пиранья"
|
||||||
|
L["Catch and Release: Aileron Seamoth"] = "Поймай и отпусти: Мелкокрылая рыба-пегас"
|
||||||
|
L["Catch and Release: Cerulean Spinefish"] = "Поймай и отпусти: Лазурная иглоспинка"
|
||||||
|
L["Catch and Release: Temporal Dragonhead"] = "Поймай и отпусти: Темпоральная драконоголовка"
|
||||||
|
L["Catch and Release: Islefin Dorado"] = "Поймай и отпусти: Островная дорадо"
|
||||||
|
L["Disabled until level 10"] = "Отключено до 10 уровня"
|
||||||
|
L["Loading..."] = "Загрузка..."
|
||||||
|
L["|cFF00FF00Complete|r"] = "|cFF00FF00Готово|r"
|
||||||
|
L["|cFFFF0000Not Complete|r"] = "|cFFFF0000Не готово|r"
|
||||||
|
L["Loaded"] = "Загружен"
|
||||||
|
L["Done"] = "Готово"
|
||||||
|
L["Show minimap icon"] = "Показывать иконку у миникарты"
|
||||||
|
L["Shows or hides the minimap icon"] = "Показать или скрыть иконку у миникарты"
|
||||||
|
L["|cFFFFFF00Click|r the main button to toggle whether the tooltip stays open"] = "|cFFFFFF00Клик|r по основной кнопке — закрепить/открепить подсказку"
|
||||||
|
L["|cFFFFFF00Right Click|r the main button to cycle through which quest to track"] = "|cFFFFFF00ПКМ|r по основной кнопке — переключить отслеживаемое задание"
|
||||||
|
L["Quest"] = "Задание"
|
||||||
|
L["Fish"] = "Рыба"
|
||||||
|
L["Have"] = "Есть"
|
||||||
|
L["Status"] = "Статус"
|
||||||
|
L["Need"] = "Нужно"
|
||||||
|
L["Gather:"] = "Собрать:"
|
||||||
|
L["Turn In:"] = "Сдать:"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local ADDON_NAME, private = ...
|
local ADDON_NAME, private = ...
|
||||||
|
|
||||||
TuskarrCatchAndRelease = LibStub("AceAddon-3.0"):NewAddon(ADDON_NAME, "AceConsole-3.0", "AceEvent-3.0", "AceTimer-3.0")
|
TuskarrRestockTracker = LibStub("AceAddon-3.0"):NewAddon(ADDON_NAME, "AceConsole-3.0", "AceEvent-3.0", "AceTimer-3.0")
|
||||||
local L = LibStub("AceLocale-3.0"):GetLocale(ADDON_NAME)
|
local L = LibStub("AceLocale-3.0"):GetLocale(ADDON_NAME)
|
||||||
local LibQTip = LibStub("LibQTip-1.0")
|
local LibQTip = LibStub("LibQTip-1.0")
|
||||||
local LibDBIcon = LibStub("LibDBIcon-1.0")
|
local LibDBIcon = LibStub("LibDBIcon-1.0")
|
||||||
@@ -19,7 +19,7 @@ local defaults = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
local options = {
|
local options = {
|
||||||
name = L["Tuskarr Catch and Release"],
|
name = L["Tuskarr Restock Tracker"],
|
||||||
type = "group",
|
type = "group",
|
||||||
args = {
|
args = {
|
||||||
minimap_icon = {
|
minimap_icon = {
|
||||||
@@ -32,7 +32,7 @@ local options = {
|
|||||||
end,
|
end,
|
||||||
set = function(info, value)
|
set = function(info, value)
|
||||||
private.db.global.minimap_icon.hide = not value
|
private.db.global.minimap_icon.hide = not value
|
||||||
TuskarrCatchAndRelease:UpdateMinimapConfig()
|
TuskarrRestockTracker:UpdateMinimapConfig()
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -41,8 +41,8 @@ local options = {
|
|||||||
local LDB = LibStub("LibDataBroker-1.1"):NewDataObject(ADDON_NAME, {
|
local LDB = LibStub("LibDataBroker-1.1"):NewDataObject(ADDON_NAME, {
|
||||||
type = "data source",
|
type = "data source",
|
||||||
icon = "Interface\\Icons\\Inv_fishing_netlinen01",
|
icon = "Interface\\Icons\\Inv_fishing_netlinen01",
|
||||||
label = L["Tuskarr Catch and Release"],
|
label = L["Tuskarr Restock Tracker"],
|
||||||
text = L["Tuskarr Catch and Release"],
|
text = L["Tuskarr Restock Tracker"],
|
||||||
OnClick = function(clickedframe, button)
|
OnClick = function(clickedframe, button)
|
||||||
if not private.loaded then
|
if not private.loaded then
|
||||||
return
|
return
|
||||||
@@ -61,34 +61,34 @@ local LDB = LibStub("LibDataBroker-1.1"):NewDataObject(ADDON_NAME, {
|
|||||||
elseif button == "RightButton" then
|
elseif button == "RightButton" then
|
||||||
private.need_index = private.need_index + 1
|
private.need_index = private.need_index + 1
|
||||||
|
|
||||||
TuskarrCatchAndRelease:UpdateText()
|
TuskarrRestockTracker:UpdateText()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
function TuskarrCatchAndRelease:OnInitialize()
|
function TuskarrRestockTracker:OnInitialize()
|
||||||
private.pinned = false
|
private.pinned = false
|
||||||
private.need_index = 1
|
private.need_index = 1
|
||||||
private.loaded = false
|
private.loaded = false
|
||||||
private.item_name_table = {}
|
private.item_name_table = {}
|
||||||
|
|
||||||
-- Create the database with defaults
|
-- Create the database with defaults
|
||||||
private.db = LibStub("AceDB-3.0"):New("TuskarrCatchAndReleaseDB", defaults)
|
private.db = LibStub("AceDB-3.0"):New("TuskarrRestockTrackerDB", defaults)
|
||||||
|
|
||||||
-- Register options
|
-- Register options
|
||||||
AceConfig:RegisterOptionsTable(ADDON_NAME, options, {"/tcr"})
|
AceConfig:RegisterOptionsTable(ADDON_NAME, options, {"/trt"})
|
||||||
|
|
||||||
-- Add to the options frame
|
-- Add to the options frame
|
||||||
private.optionsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions(ADDON_NAME, L["Tuskarr Catch and Release"])
|
private.optionsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions(ADDON_NAME, L["Tuskarr Restock Tracker"])
|
||||||
|
|
||||||
-- Register a chat command
|
-- Register a chat command
|
||||||
self:RegisterChatCommand("tcr", "ChatCommand")
|
self:RegisterChatCommand("trt", "ChatCommand")
|
||||||
|
|
||||||
-- Register the minimap icon
|
-- Register the minimap icon
|
||||||
LibDBIcon:Register(ADDON_NAME, LDB, private.db.global.minimap_icon)
|
LibDBIcon:Register(ADDON_NAME, LDB, private.db.global.minimap_icon)
|
||||||
end
|
end
|
||||||
|
|
||||||
function TuskarrCatchAndRelease:OnEnable()
|
function TuskarrRestockTracker:OnEnable()
|
||||||
-- Disable if the player is less than 10
|
-- Disable if the player is less than 10
|
||||||
if (UnitLevel("player") < 10) then
|
if (UnitLevel("player") < 10) then
|
||||||
LDB.text = L["Disabled until level 10"]
|
LDB.text = L["Disabled until level 10"]
|
||||||
@@ -100,29 +100,29 @@ function TuskarrCatchAndRelease:OnEnable()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Do the real enable
|
-- Do the real enable
|
||||||
TuskarrCatchAndRelease:OnEnableCore()
|
TuskarrRestockTracker:OnEnableCore()
|
||||||
end
|
end
|
||||||
|
|
||||||
function TuskarrCatchAndRelease:PLAYER_LEVEL_UP(event, newLevel)
|
function TuskarrRestockTracker:PLAYER_LEVEL_UP(event, newLevel)
|
||||||
if (tonumber(newLevel) >= 10) then
|
if (tonumber(newLevel) >= 10) then
|
||||||
-- Do the real enable
|
-- Do the real enable
|
||||||
TuskarrCatchAndRelease:OnEnableCore()
|
TuskarrRestockTracker:OnEnableCore()
|
||||||
|
|
||||||
-- Done with player level events
|
-- Done with player level events
|
||||||
self:UnregisterEvent("PLAYER_LEVEL_UP")
|
self:UnregisterEvent("PLAYER_LEVEL_UP")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function TuskarrCatchAndRelease:OnEnableCore()
|
function TuskarrRestockTracker:OnEnableCore()
|
||||||
-- Show loading text
|
-- Show loading text
|
||||||
TuskarrCatchAndRelease:Print(L["Loading..."])
|
TuskarrRestockTracker:Print(L["Loading..."])
|
||||||
LDB.text = L["Loading..."]
|
LDB.text = L["Loading..."]
|
||||||
|
|
||||||
-- Load item info from cache
|
-- Load item info from cache
|
||||||
TuskarrCatchAndRelease:LoadCache()
|
TuskarrRestockTracker:LoadCache()
|
||||||
end
|
end
|
||||||
|
|
||||||
function TuskarrCatchAndRelease:LoadCache()
|
function TuskarrRestockTracker:LoadCache()
|
||||||
local item_count = 0
|
local item_count = 0
|
||||||
local item_loaded_count = 0
|
local item_loaded_count = 0
|
||||||
local item_table = {}
|
local item_table = {}
|
||||||
@@ -152,22 +152,22 @@ function TuskarrCatchAndRelease:LoadCache()
|
|||||||
|
|
||||||
-- If everything is cached we're good to go
|
-- If everything is cached we're good to go
|
||||||
if (item_count == item_loaded_count) then
|
if (item_count == item_loaded_count) then
|
||||||
TuskarrCatchAndRelease:OnLoaded(self)
|
TuskarrRestockTracker:OnLoaded(self)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function TuskarrCatchAndRelease:OnLoaded(self)
|
function TuskarrRestockTracker:OnLoaded(self)
|
||||||
-- Show loaded text
|
-- Show loaded text
|
||||||
TuskarrCatchAndRelease:Print(L["Loaded"])
|
TuskarrRestockTracker:Print(L["Loaded"])
|
||||||
LDB.text = L["Loaded"]
|
LDB.text = L["Loaded"]
|
||||||
|
|
||||||
self:RegisterEvent("QUEST_LOG_UPDATE")
|
self:RegisterEvent("QUEST_LOG_UPDATE")
|
||||||
self:RegisterEvent("BAG_UPDATE")
|
self:RegisterEvent("BAG_UPDATE")
|
||||||
|
|
||||||
TuskarrCatchAndRelease:UpdateData()
|
TuskarrRestockTracker:UpdateData()
|
||||||
TuskarrCatchAndRelease:UpdateText()
|
TuskarrRestockTracker:UpdateText()
|
||||||
|
|
||||||
private.loaded = true
|
private.loaded = true
|
||||||
end
|
end
|
||||||
@@ -188,11 +188,11 @@ local function SetSort(cell, sort)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
TuskarrCatchAndRelease:UpdateData()
|
TuskarrRestockTracker:UpdateData()
|
||||||
TuskarrCatchAndRelease:UpdateTooltip()
|
TuskarrRestockTracker:UpdateTooltip()
|
||||||
end
|
end
|
||||||
|
|
||||||
function TuskarrCatchAndRelease:UpdateData()
|
function TuskarrRestockTracker:UpdateData()
|
||||||
|
|
||||||
-- Create a table to store all needs
|
-- Create a table to store all needs
|
||||||
private.need_table = {}
|
private.need_table = {}
|
||||||
@@ -263,7 +263,7 @@ function TuskarrCatchAndRelease:UpdateData()
|
|||||||
private.SORT_FUNCTIONS[private.db.global.sort_field .. "_" .. private.db.global.sort_dir])
|
private.SORT_FUNCTIONS[private.db.global.sort_field .. "_" .. private.db.global.sort_dir])
|
||||||
end
|
end
|
||||||
|
|
||||||
function TuskarrCatchAndRelease:UpdateTooltip()
|
function TuskarrRestockTracker:UpdateTooltip()
|
||||||
if LibQTip:IsAcquired(ADDON_NAME) then
|
if LibQTip:IsAcquired(ADDON_NAME) then
|
||||||
private.tooltip:Clear()
|
private.tooltip:Clear()
|
||||||
else
|
else
|
||||||
@@ -315,7 +315,7 @@ function TuskarrCatchAndRelease:UpdateTooltip()
|
|||||||
"LEFT", private.tooltip:GetColumnCount())
|
"LEFT", private.tooltip:GetColumnCount())
|
||||||
end
|
end
|
||||||
|
|
||||||
function TuskarrCatchAndRelease:UpdateText()
|
function TuskarrRestockTracker:UpdateText()
|
||||||
local need_index = 1
|
local need_index = 1
|
||||||
|
|
||||||
if (private.need_index > private.need_count) then
|
if (private.need_index > private.need_count) then
|
||||||
@@ -351,42 +351,42 @@ function LDB.OnEnter(self)
|
|||||||
end
|
end
|
||||||
|
|
||||||
private.LDB_ANCHOR = self
|
private.LDB_ANCHOR = self
|
||||||
TuskarrCatchAndRelease:UpdateTooltip()
|
TuskarrRestockTracker:UpdateTooltip()
|
||||||
|
|
||||||
private.tooltip:Show()
|
private.tooltip:Show()
|
||||||
end
|
end
|
||||||
|
|
||||||
function TuskarrCatchAndRelease:QUEST_LOG_UPDATE()
|
function TuskarrRestockTracker:QUEST_LOG_UPDATE()
|
||||||
if not private.loaded then
|
if not private.loaded then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
TuskarrCatchAndRelease:UpdateData()
|
TuskarrRestockTracker:UpdateData()
|
||||||
TuskarrCatchAndRelease:UpdateText()
|
TuskarrRestockTracker:UpdateText()
|
||||||
|
|
||||||
if not private.LDB_ANCHOR then
|
if not private.LDB_ANCHOR then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
TuskarrCatchAndRelease:UpdateTooltip()
|
TuskarrRestockTracker:UpdateTooltip()
|
||||||
end
|
end
|
||||||
|
|
||||||
function TuskarrCatchAndRelease:BAG_UPDATE()
|
function TuskarrRestockTracker:BAG_UPDATE()
|
||||||
if not private.loaded then
|
if not private.loaded then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
TuskarrCatchAndRelease:UpdateData()
|
TuskarrRestockTracker:UpdateData()
|
||||||
TuskarrCatchAndRelease:UpdateText()
|
TuskarrRestockTracker:UpdateText()
|
||||||
|
|
||||||
if not private.LDB_ANCHOR then
|
if not private.LDB_ANCHOR then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
TuskarrCatchAndRelease:UpdateTooltip()
|
TuskarrRestockTracker:UpdateTooltip()
|
||||||
end
|
end
|
||||||
|
|
||||||
function TuskarrCatchAndRelease:UpdateMinimapConfig()
|
function TuskarrRestockTracker:UpdateMinimapConfig()
|
||||||
if private.db.global.minimap_icon.hide then
|
if private.db.global.minimap_icon.hide then
|
||||||
LibDBIcon:Hide(ADDON_NAME)
|
LibDBIcon:Hide(ADDON_NAME)
|
||||||
else
|
else
|
||||||
@@ -394,7 +394,7 @@ function TuskarrCatchAndRelease:UpdateMinimapConfig()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function TuskarrCatchAndRelease:ChatCommand(input)
|
function TuskarrRestockTracker:ChatCommand(input)
|
||||||
|
|
||||||
local command, arg1 = self:GetArgs(input, 2)
|
local command, arg1 = self:GetArgs(input, 2)
|
||||||
|
|
||||||
@@ -405,13 +405,18 @@ function TuskarrCatchAndRelease:ChatCommand(input)
|
|||||||
command = command:lower()
|
command = command:lower()
|
||||||
|
|
||||||
if command == L["config"]:lower() then
|
if command == L["config"]:lower() then
|
||||||
InterfaceOptionsFrame_OpenToCategory(private.optionsFrame)
|
if Settings then
|
||||||
|
Settings.OpenToCategory("Tuskarr Restock Tracker")
|
||||||
|
elseif InterfaceOptionsFrame_OpenToCategory then
|
||||||
|
InterfaceOptionsFrame_OpenToCategory("Tuskarr Restock Tracker")
|
||||||
|
InterfaceOptionsFrame_OpenToCategory("Tuskarr Restock Tracker")
|
||||||
|
end
|
||||||
elseif command == L["minimap"]:lower() then
|
elseif command == L["minimap"]:lower() then
|
||||||
private.db.global.minimap_icon.hide = not private.db.global.minimap_icon.hide
|
private.db.global.minimap_icon.hide = not private.db.global.minimap_icon.hide
|
||||||
TuskarrCatchAndRelease:UpdateMinimapConfig()
|
TuskarrRestockTracker:UpdateMinimapConfig()
|
||||||
else
|
else
|
||||||
TuskarrCatchAndRelease:Print(L["Available commands:"])
|
TuskarrRestockTracker:Print(L["Available commands:"])
|
||||||
TuskarrCatchAndRelease:Print("|cFF00C0FF" .. L["config"] .. "|r - " .. L["Show configuration"])
|
TuskarrRestockTracker:Print("|cFF00C0FF" .. L["config"] .. "|r - " .. L["Show configuration"])
|
||||||
TuskarrCatchAndRelease:Print("|cFF00C0FF" .. L["minimap"] .. "|r - " .. L["Toggles the minimap icon"])
|
TuskarrRestockTracker:Print("|cFF00C0FF" .. L["minimap"] .. "|r - " .. L["Toggles the minimap icon"])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
## Interface: 100000
|
## Interface: 110205
|
||||||
## Title: Tuskarr Catch and Release
|
## Title: Tuskarr Restock Tracker
|
||||||
## Version: 10.0.0
|
## Version: 11.0.1
|
||||||
## Notes: Helps with the weekly Iskaara Tuskarr fishing quests ("Catch and Release") by keeping track of what quests have been completed and what fish are required.
|
## Notes: Helps with the weekly Iskaara Tuskarr fishing quests ("Catch and Release") by keeping track of what quests have been completed and what fish are required.
|
||||||
## Author: Amanoa
|
## Author: Amanoa
|
||||||
## SavedVariables: TuskarrCatchAndReleaseDB
|
## SavedVariables: TuskarrRestockTrackerDB
|
||||||
## OptionalDeps: Ace3, AceEvent-3.0, LibQTip-1.0, LibStub, AceTimer-3.0, AceConsole-3.0
|
## OptionalDeps: Ace3, AceEvent-3.0, LibQTip-1.0, LibStub, AceTimer-3.0, AceConsole-3.0
|
||||||
|
|
||||||
#@no-lib-strip@
|
#@no-lib-strip@
|
||||||
@@ -28,4 +28,4 @@ Locale\deDE.lua
|
|||||||
|
|
||||||
Data.lua
|
Data.lua
|
||||||
Sort.lua
|
Sort.lua
|
||||||
TuskarrCatchAndRelease.lua
|
TuskarrRestockTracker.lua
|
||||||
Reference in New Issue
Block a user