-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDB.lua
More file actions
107 lines (94 loc) · 2.3 KB
/
Copy pathDB.lua
File metadata and controls
107 lines (94 loc) · 2.3 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
local _, core = ...
core.DB = {}
local DB = core.DB
function DB:init()
if not LFGDeclineCounterDB then
LFGDeclineCounterDB = {}
end
if not LFGDeclineCounterCharacterDB then
LFGDeclineCounterCharacterDB = {}
end
if not LFGDeclineCounterDB.theme then
LFGDeclineCounterDB.theme = {
r = 0,
g = 0.8,
b = 1,
hex = "00ccff"
}
end
if not LFGDeclineCounterDB.options then
LFGDeclineCounterDB.options = {
anchor = "top left",
orientation = "right",
xOffset = 0,
yOffset = 2,
padding = 2,
scale = 1,
font = "Fonts\\FRIZQT__.TTF",
textSize = 12
}
end
if not LFGDeclineCounterDB.accountLife then
LFGDeclineCounterDB.accountLife = {
applyCount = 0,
declineCount = 0,
cancelCount = 0,
delistCount = 0,
inviteCount = 0,
acceptCount = 0,
show = true
}
end
if not LFGDeclineCounterCharacterDB.charLife then
LFGDeclineCounterCharacterDB.charLife = {
applyCount = 0,
declineCount = 0,
cancelCount = 0,
delistCount = 0,
inviteCount = 0,
acceptCount = 0,
show = true
}
end
if not LFGDeclineCounterDB.showCounters then
LFGDeclineCounterDB.showCounters = {
cancel = true,
delist = true,
invite = true,
accept = true
}
end
if not LFGDeclineCounterDB.session then
LFGDeclineCounterDB.session = {
applyCount = 0,
declineCount = 0,
cancelCount = 0,
delistCount = 0,
inviteCount = 0,
acceptCount = 0,
crossCharacter = true,
currentCharacter = {UnitFullName("player")}
}
end
if not LFGDeclineCounterDB.timer then
LFGDeclineCounterDB.timer = {
time = GetTime(),
expiration = GetTime() + 60 * 5 --5 min,
}
end
core.DB.options = LFGDeclineCounterDB.options
core.DB.accountLife = LFGDeclineCounterDB.accountLife
core.DB.charLife = LFGDeclineCounterCharacterDB.charLife
core.DB.showCounters = LFGDeclineCounterDB.showCounters
core.DB.session = LFGDeclineCounterDB.session
core.DB.timer = LFGDeclineCounterDB.timer
end
function DB:exit()
LFGDeclineCounterDB.options = core.DB.options
LFGDeclineCounterDB.accountLife = core.DB.accountLife
LFGDeclineCounterCharacterDB.charLife = core.DB.charLife
LFGDeclineCounterDB.showCounters = core.DB.showCounters
LFGDeclineCounterDB.session = core.DB.session
core.DB.timer.expiration = GetTime() + 60 * 5 --5 min
LFGDeclineCounterDB.timer = core.DB.timer
end