-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIvoryTower_RaidProfiles.lua
54 lines (51 loc) · 1.83 KB
/
IvoryTower_RaidProfiles.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
local _, IvoryTower = ...
local RAID_PROFILES = {
["Ivory Tower — Arenas"] = {
["options"] = {
["autoActivate2Players"] = true,
["autoActivate3Players"] = true,
["autoActivatePvE"] = true,
["autoActivatePvP"] = true,
["autoActivateSpec1"] = true,
["autoActivateSpec2"] = true,
["autoActivateSpec3"] = true,
["autoActivateSpec4"] = true,
["frameHeight"] = 72,
["frameWidth"] = 144
},
["savedPosition"] = {false, "TOP", 225, "TOP", 550, "ATTACHED", 0}
},
["Ivory Tower — Battlegrounds"] = {
["options"] = {
["autoActivate10Players"] = true,
["autoActivate15Players"] = true,
["autoActivate5Players"] = true,
["autoActivatePvE"] = true,
["autoActivatePvP"] = true,
["autoActivateSpec1"] = true,
["autoActivateSpec2"] = true,
["autoActivateSpec3"] = true,
["autoActivateSpec4"] = true,
["frameHeight"] = 54,
["frameWidth"] = 108,
["keepGroupsTogether"] = true
},
["savedPosition"] = {false, "TOP", 225, "TOP", 550, "ATTACHED", 0}
}
}
function IvoryTower:CreateNewRaidProfile(profileName)
local tooManyRaidProfiles = GetNumRaidProfiles() == GetMaxNumCUFProfiles()
if (RaidProfileExists(profileName) or tooManyRaidProfiles) then
return false
end
CreateNewRaidProfile(profileName)
return true
end
for profileName, data in pairs(RAID_PROFILES) do
if (IvoryTower:CreateNewRaidProfile(profileName)) then
for option, value in pairs(data.options) do
SetRaidProfileOption(profileName, option, value)
end
SetRaidProfileSavedPosition(profileName, unpack(data.savedPosition))
end
end