Skip to content

Commit

Permalink
Use Dashi
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Dec 19, 2024
1 parent 45a9b8d commit 1d5a3cc
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -324,17 +324,6 @@ addon:RegisterSubSettingsCanvas(L['NPC Blocklist'], function(canvas)
end
})

local creatureNames = setmetatable({}, {
__index = function(self, npcID)
local data = C_TooltipInfo.GetHyperlink('unit:Creature-0-0-0-0-' .. npcID .. '-0')
local name = data and data.lines and data.lines[1] and data.lines[1].leftText
if name then
rawset(self, npcID, name)
return name
end
end
})

local grid = addon:CreateScrollGrid(canvas)
grid:SetInsets(10, 10, 10, 20)
grid:SetElementType('Button')
Expand Down Expand Up @@ -376,7 +365,7 @@ addon:RegisterSubSettingsCanvas(L['NPC Blocklist'], function(canvas)
end)
grid:SetElementOnScript('OnEnter', function(element)
GameTooltip:SetOwner(element, 'ANCHOR_TOPLEFT') -- TODO
GameTooltip:AddLine(creatureNames[element.data] or UNKNOWN, 1, 1, 1)
GameTooltip:AddLine(addon:GetNPCName(element.data) or UNKNOWN, 1, 1, 1)
GameTooltip:AddLine(element.data)
GameTooltip:AddLine(CURSOR_HELP_TEXT, 1, 0, 0)
GameTooltip:Show()
Expand Down

0 comments on commit 1d5a3cc

Please sign in to comment.