forked from jjbreis/AAVBlackrock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconf.lua
80 lines (69 loc) · 1.94 KB
/
conf.lua
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
local L = LibStub("AceLocale-3.0"):GetLocale("atroxArenaViewer", true)
-- Slash commands
SLASH_ATROXARENAVIEWER1 = "/aav"
SLASH_ATROXARENAVIEWER2 = "/AAV"
SlashCmdList["ATROXARENAVIEWER"] = function(msg)
msg = string.lower(msg or "")
local self = _G["atroxArenaViewer"]
print("> /aav " .. msg)
if (msg == "import") then
StaticPopup_Show("AAV_IMPORT_DIALOG")
elseif (msg == "ui") then
if(AAV_TableGui:isMatchesFrameShowing()) then
AAV_TableGui:hideMatchesFrame()
else
AAV_TableGui:showMatchesFrame()
end
elseif (msg == "record") then
self:changeRecording()
elseif (msg == "options") then
InterfaceOptionsFrame_OpenToCategory("AAVBlackrock")
--[[ elseif (msg == "play") then
if (atroxArenaViewerData.data) then
print(L.CONF_DESCR_PLAY)
for k,v in pairs(atroxArenaViewerData.data) do
print(" " .. k .. " - " .. v.map .. " at " .. v.startTime)
end
else
print(L.NO_MATCHES_FOUND)
end
elseif (string.find(msg, 'play%s%d*')) then
local num = tonumber(string.sub(msg, 6))
if (num and atroxArenaViewerData.data[num]) then
self:createPlayer(num)
self:playMatch(num)
else
print(L.ERROR_WRONG_INPUT)
end
elseif (msg == "delete") then
if (atroxArenaViewerData.data) then
print(L.CONF_DESCR_DELETE)
for k,v in pairs(atroxArenaViewerData.data) do
print(" " .. k .. " - " .. v.map .. " at " .. v.startTime)
end
else
print(L.NO_MATCHES_FOUND)
end ]]--
elseif (msg == "delete all") then
numOfMatches = #atroxArenaViewerData.data
for i = 1, numOfMatches do
parent:deleteMatch(1)
end
--[[ elseif (string.find(msg, 'delete%s%d*')) then
local num = tonumber(string.sub(msg, 8))
if (num) then
self:deleteMatch(num)
print(L.CONF_MATCH_DELETED)
else
print(L.ERROR_WRONG_INPUT)
end ]]--
else
print(L.CONF_HELP_LINE1)
print(L.CONF_HELP_LINE2)
print(L.CONF_HELP_LINE3)
print(L.CONF_HELP_LINE4)
print(L.CONF_HELP_LINE5)
print(L.CONF_HELP_LINE6)
end
end