Skip to content

Commit

Permalink
API update
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Nov 29, 2024
1 parent 2e21255 commit 4cbdb8a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
32 changes: 16 additions & 16 deletions settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ addon:RegisterSettings('QuickQuestDB3', {
tooltip = L['When "%s" is selected %s will only be automated while tracking them']:format(ACCOUNT_QUEST_LABEL, MINIMAP_TRACKING_ACCOUNT_COMPLETED_QUESTS:lower()),
default = 3,
options = {
NEVER,
ACCOUNT_QUEST_LABEL,
ALWAYS,
{value=1, label=NEVER},
{value=2, label=ACCOUNT_QUEST_LABEL},
{value=3, label=ALWAYS},
},
},
{
Expand All @@ -21,9 +21,9 @@ addon:RegisterSettings('QuickQuestDB3', {
tooltip = L['When "%s" is selected %s will only be automated while tracking them']:format(ACCOUNT_QUEST_LABEL, MINIMAP_TRACKING_ACCOUNT_COMPLETED_QUESTS:lower()),
default = 3,
options = {
NEVER,
ACCOUNT_QUEST_LABEL,
ALWAYS,
{value=1, label=NEVER},
{value=2, label=ACCOUNT_QUEST_LABEL},
{value=3, label=ALWAYS},
},
},
{
Expand Down Expand Up @@ -56,9 +56,9 @@ addon:RegisterSettings('QuickQuestDB3', {
title = L['When to automate gossip'],
default = 2,
options = {
NEVER,
L['Soloing'],
ALWAYS,
{value=1, label=NEVER},
{value=2, label=L['Soloing']},
{value=3, label=ALWAYS},
},
},
{
Expand All @@ -74,9 +74,9 @@ addon:RegisterSettings('QuickQuestDB3', {
tooltip = L['Hold this key to temporarily disable all automation'],
default = 'SHIFT',
options = {
ALT = ALT_KEY,
CTRL = CTRL_KEY,
SHIFT = SHIFT_KEY,
{value='ALT', label=ALT_KEY},
{value='CTRL', label=CTRL_KEY},
{value='SHIFT', label=SHIFT_KEY},
},
},
{
Expand Down Expand Up @@ -223,7 +223,7 @@ do
self.editBox:SetFocus()
end
StaticPopupDialogs[addonName .. 'BlocklistTargetPopup'].OnAlt = function(self)
local id = addon:GetNPCID('target')
local id = addon:GetUnitID('target')
if id then
self.data.callback(id)
end
Expand All @@ -247,7 +247,7 @@ do
end

local CURSOR_HELP_TEXT = string.format('|A:NPE_RightClick:18:18|a %s', REMOVE)
addon:RegisterSubCanvas(L['Item Blocklist'], function(canvas)
addon:RegisterSubSettingsCanvas(L['Item Blocklist'], function(canvas)
local grid = addon:CreateScrollGrid(canvas)
grid:SetInsets(10, 10, 10, 20)
grid:SetElementType('Button')
Expand Down Expand Up @@ -310,7 +310,7 @@ local BACKDROP = {
insets = {left = 4, right = 4, top = 4, bottom = 4}
}

addon:RegisterSubCanvas(L['NPC Blocklist'], function(canvas)
addon:RegisterSubSettingsCanvas(L['NPC Blocklist'], function(canvas)
local creatureIDs = setmetatable({}, {
__index = function(self, npcID)
local model = CreateFrame('PlayerModel')
Expand Down Expand Up @@ -395,7 +395,7 @@ addon:RegisterSubCanvas(L['NPC Blocklist'], function(canvas)
end, 'Target')
end)

addon:RegisterSubCanvas(L['Quest Blocklist'], function(canvas)
addon:RegisterSubSettingsCanvas(L['Quest Blocklist'], function(canvas)
local list = addon:CreateScrollList(canvas)
list:SetInsets(nil, nil, 10, 20)
list:SetElementType('Button')
Expand Down
2 changes: 1 addition & 1 deletion utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ end

-- blocklists
function addon:IsNPCIgnored()
local npcID = addon:GetNPCID('npc')
local npcID = addon:GetUnitID('npc')
if npcID then
return QuickQuestBlocklistDB.npcs[npcID]
end
Expand Down

0 comments on commit 4cbdb8a

Please sign in to comment.