Repository navigation
Expand file tree
/
Copy pathconfig.lua
More file actions
126 lines (123 loc) · 4.28 KB
/
Copy pathconfig.lua
File metadata and controls
126 lines (123 loc) · 4.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
local myname, ns = ...
ns.defaults = {
profile = {
-- found = false,
icon_scale = 1.5,
icon_alpha = 1.0,
icon_item = true,
},
char = {
hidden = {
['*'] = {},
},
},
}
ns.options = {
type = "group",
name = myname:gsub("HandyNotes_", ""),
get = function(info) return ns.db[info[#info]] end,
set = function(info, v)
ns.db[info[#info]] = v
ns.HL:SendMessage("HandyNotes_NotifyUpdate", myname:gsub("HandyNotes_", ""))
end,
args = {
icon = {
type = "group",
name = "Icon settings",
inline = true,
args = {
desc = {
name = "These settings control the look and feel of the icon.",
type = "description",
order = 0,
},
icon_scale = {
type = "range",
name = "Icon Scale",
desc = "The scale of the icons",
min = 0.10, max = 2, step = 0.01,
order = 20,
},
icon_alpha = {
type = "range",
name = "Icon Alpha",
desc = "The alpha transparency of the icons",
min = 0, max = 1, step = 0.01,
order = 30,
},
},
},
display = {
type = "group",
name = "What to display",
inline = true,
args = {
-- found = {
-- type = "toggle",
-- name = "Show found",
-- desc = "Show waypoints for items you've already found?",
-- order = 20,
-- },
unhide = {
type = "execute",
name = "Reset hidden nodes",
desc = "Show all nodes that you manually hid by right-clicking on them and choosing \"hide\".",
func = function()
for map,coords in pairs(ns.hidden) do
wipe(coords)
end
ns.HL:Refresh()
end,
order = 50,
},
},
},
},
}
local player_faction = UnitFactionGroup("player")
ns.should_show_point = function(coord, point, currentZone, currentLevel)
if point.level and point.level ~= currentLevel then
return false
end
if ns.hidden[currentZone] and ns.hidden[currentZone][coord] then
return false
end
if point.junk and not ns.db.show_junk then
return false
end
if point.faction and point.faction ~= player_faction then
return false
end
if (not ns.db.found) then
if point.quest and IsQuestFlaggedCompleted(point.quest) then
return false
end
if point.achievement then
local id, name, points, completed, month, day, year, description, flags, icon, rewardText, isGuildAch, wasEarnedByMe, earnedBy = GetAchievementInfo(point.achievement)
if completed then
return false
end
if point.criteria then
local description, type, completed, quantity, requiredQuantity, characterName, flags, assetID, quantityString, criteriaID = GetAchievementCriteriaInfoByID(point.achievement, point.criteria)
if completed then
return false
end
end
end
if point.follower and C_Garrison.IsFollowerCollected(point.follower) then
return false
end
-- This is actually super-targeted at Basten, who is repeatable daily and drops a toy
-- Might want to generalize at some point...
if point.toy and point.item and point.repeatable and select(4, C_ToyBox.GetToyInfo(point.item)) then
return false
end
end
if (not ns.db.repeatable) and point.repeatable then
return false
end
if point.npc and not point.follower and not ns.db.show_npcs then
return false
end
return true
end