Repository navigation
Expand file tree
/
Copy pathRandomMountButton.lua
More file actions
100 lines (80 loc) · 3.58 KB
/
Copy pathRandomMountButton.lua
File metadata and controls
100 lines (80 loc) · 3.58 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
local function create()
local mountSelectorFrame = RuthesMS.frames.mountSelectorFrame.frame
-- Normal mount
local randomMountButton = CreateFrame("Button", "RuthesMSRandomMountButton", mountSelectorFrame,
"UIPanelButtonTemplate")
randomMountButton:Hide()
randomMountButton:SetScript("OnClick", function()
RuthesMS.utils.mount.reloadMounts()
RuthesMS.utils.summon.summonRandomMount(false)
end)
-- Small mount
local randomSmallMountButton = CreateFrame("Button", "RuthesMSRandomSmallMountButton", mountSelectorFrame,
"UIPanelButtonTemplate")
randomSmallMountButton:Hide()
randomSmallMountButton:SetScript("OnClick", function()
RuthesMS.utils.mount.reloadMounts()
RuthesMS.utils.summon.summonRandomMount(false, true)
end)
-- Ground mount
local randomGroundMountButton = CreateFrame("Button", "RuthesMSRandomGroundMountButton", mountSelectorFrame,
"UIPanelButtonTemplate")
randomGroundMountButton:Hide()
randomGroundMountButton:SetScript("OnClick", function()
RuthesMS.utils.mount.reloadMounts()
RuthesMS.utils.summon.summonRandomMount(false, false, true)
end)
-- Aquatic mount
local randomAquaticMountButton = CreateFrame("Button", "RuthesMSRandomAquaticMountButton", mountSelectorFrame,
"UIPanelButtonTemplate")
randomAquaticMountButton:Hide()
randomAquaticMountButton:SetScript("OnClick", function()
RuthesMS.utils.mount.reloadMounts()
RuthesMS.utils.summon.summonRandomMount(true)
end)
-- Repair mount
local randomRepairMountButton = CreateFrame("Button", "RuthesMSRandomRepairMountButton", mountSelectorFrame,
"UIPanelButtonTemplate")
randomRepairMountButton:Hide()
randomRepairMountButton:SetScript("OnClick", function()
RuthesMS.utils.mount.reloadMounts()
RuthesMS.utils.summon.summonRandomRepairMount()
end)
-- Transmog mount
local randomTransmogMountButton = CreateFrame("Button", "RuthesMSRandomTransmogMountButton", mountSelectorFrame,
"UIPanelButtonTemplate")
randomTransmogMountButton:Hide()
randomTransmogMountButton:SetScript("OnClick", function()
RuthesMS.utils.mount.reloadMounts()
RuthesMS.utils.summon.summonRandomTransmogMount()
end)
-- Auction house mount
local randomAuctionHouseMountButton = CreateFrame("Button", "RuthesMSRandomAuctionHouseMountButton",
mountSelectorFrame, "UIPanelButtonTemplate")
randomAuctionHouseMountButton:Hide()
randomAuctionHouseMountButton:SetScript("OnClick", function()
RuthesMS.utils.mount.reloadMounts()
RuthesMS.utils.summon.summonRandomAuctionHouseMount()
end)
-- Mailbox mount
local randomMailboxMountButton = CreateFrame("Button", "RuthesMSRandomMailboxMountButton", mountSelectorFrame,
"UIPanelButtonTemplate")
randomMailboxMountButton:Hide()
randomMailboxMountButton:SetScript("OnClick", function()
RuthesMS.utils.mount.reloadMounts()
RuthesMS.utils.summon.summonRandomMailboxMount()
end)
-- Multiple character mount
local randomMultipleMountButton = CreateFrame("Button", "RuthesMSRandomMultipleMountButton", mountSelectorFrame,
"UIPanelButtonTemplate")
randomMultipleMountButton:Hide()
randomMultipleMountButton:SetScript("OnClick", function()
RuthesMS.utils.mount.reloadMounts()
RuthesMS.utils.summon.summonRandomMultipleMount()
end)
RuthesMS.buttons.randomMountButton.button = randomMountButton
end
RuthesMS.buttons.randomMountButton = {
create = create,
button = nil
}