-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcore.lua
More file actions
65 lines (60 loc) · 2.49 KB
/
core.lua
File metadata and controls
65 lines (60 loc) · 2.49 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
local _midsummer, _midsummerNS = ...
local growthAmount = 66
local checkAll = false;
local extinguish = true;
local open = false
local continentButtons = {MidsummerFrameEasternKingdomsButton, MidsummerFrameKalimdorButton, MidsummerFrameOutlandButton, MidsummerFrameNorthrendButton, MidsummerFrameCataclysmButton, MidsummerFramePandariaButton, MidsummerFrameDraenorButton, MidsummerFrameBrokenIslesButton};
function _midsummerNS.outputProcess(result, objectives)
local missingLocations = {}
if checkAll == true then
for k,v in pairs(objectives)
do
print( k .. " " .. result[k] .. " " .. tostring(IsQuestFlaggedCompleted(v)))
end
else
for k, v in pairs(objectives)
do
local testValue = IsQuestFlaggedCompleted(v)
if (testValue == false) then
table.insert(missingLocations, result[k])
end
end
if table.getn(missingLocations) > 0 then
print ("You still need to visit the following locations: ")
for k, v in pairs(missingLocations)
do
print(missingLocations[k])
end
else
print("You've completed all the objectives for this achievement.")
end
end
end
function _midsummerNS.frameClicked(self)
local point, relativeTo, relativePoint, xOfs, yOfs = self:GetPoint();
if (self:GetHeight() < 127 ) then
self:SetHeight(128)
for k, v in pairs(continentButtons) do
local vPoint, vRelativeTo, vRelativePOint, vXOfs, vYOfs = v:GetPoint()
if (yOfs > vYOfs) then
v:SetPoint("TOPLEFT", "MidsummerFrame", vXOfs, tostring((tonumber(vYOfs)) - (growthAmount)))
end
end
if (open == false) then
MidsummerFrame:SetHeight(MidsummerFrame:GetHeight() + (growthAmount))
open = true
end
else
self:SetHeight(62)
for k, v in pairs(continentButtons) do
local vPoint, vRelativeTo, vRelativePOint, vXOfs, vYOfs = v:GetPoint()
if (yOfs > vYOfs) then
v:SetPoint("TOPLEFT", "MidsummerFrame", vXOfs, tostring((tonumber(vYOfs)) + (growthAmount)))
end
end
if (open == true) then
MidsummerFrame:SetHeight(MidsummerFrame:GetHeight() - (growthAmount))
open = false
end
end
end