Skip to content

Commit

Permalink
Add Sunken Temple to SoD
Browse files Browse the repository at this point in the history
Make minor changes to UI, remove 60 raids from SoD for the moment
  • Loading branch information
cloudbells committed Apr 4, 2024
1 parent 2b4f4a2 commit e442186
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion AutoLoggerClassic_Vanilla.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 11500
## Interface: 11502
## Title: AutoLoggerClassic
## Notes: Automatically triggers combat logging on and off in raids.
## Author: cloudbells
Expand Down
8 changes: 3 additions & 5 deletions Instances.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
local _, ns = ...

if ns:IsClassic() then
if ns:IsSoD() then
ns.RAIDS = {[48] = "Blackfathom Deeps", [90] = "Gnomeregan", [109] = "Sunken Temple"}
elseif ns:IsClassic() then
ns.RAIDS = {
[509] = "AQ20",
[531] = "AQ40",
Expand All @@ -10,10 +12,6 @@ if ns:IsClassic() then
[249] = "Onyxia's Lair",
[309] = "Zul'Gurub",
}
if ns:IsSoD() then
ns.RAIDS[48] = "Blackfathom Deeps"
ns.RAIDS[90] = "Gnomeregan"
end
elseif ns:IsTBC() then
ns.RAIDS = {
[509] = "AQ20",
Expand Down
14 changes: 6 additions & 8 deletions Interface/Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,10 @@ function ns:InitMainFrame()
mainFrame:HookScript("OnShow", MainFrame_OnShow)
tinsert(UISpecialFrames, "AutoLoggerClassicFrame")

if ns:IsClassic() then
if ns:IsSoD() then
mainFrame:SetSize(556, 112)
else
mainFrame:SetSize(540, 112)
end
if ns:IsSoD() then
mainFrame:SetSize(552, 72)
elseif ns:IsClassic() then
mainFrame:SetSize(540, 112)
elseif ns:IsWOTLK() or ns:IsTBC() then
mainFrame:SetSize(630, 472)
end
Expand All @@ -135,15 +133,15 @@ function ns:InitMainFrame()
-- Title text.
local title = titleFrame:CreateFontString(nil, "BACKGROUND", fontInstance:GetName())
title:SetText("AutoLoggerClassic")
title:SetPoint("LEFT", 4, 0)
title:SetPoint("LEFT", 2, 0)
titleFrame.title = title

-- Close button.
local closeButton = CreateFrame("Button", "AutoLoggerClassicCloseButton", titleFrame)
CUI:ApplyTemplate(closeButton, CUI.templates.HighlightFrameTemplate)
CUI:ApplyTemplate(closeButton, CUI.templates.PushableFrameTemplate)
CUI:ApplyTemplate(closeButton, CUI.templates.BorderedFrameTemplate)
local size = titleFrame:GetHeight() - 1
local size = titleFrame:GetHeight() - 6
closeButton:SetSize(size, size)
local texture = closeButton:CreateTexture(nil, "ARTWORK")
texture:SetTexture("Interface/Addons/AutoLoggerClassic/Media/CloseButton")
Expand Down
2 changes: 1 addition & 1 deletion Libs/CloudUI-1.0/Widgets/Dropdown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ end
-- Sets the given frame's value at the given index.
local function SetValueAt(self, index, value)
assert(index and type(index) == "number" and index > 0, "SetValueAt: 'index' needs to be a non-negative number")
assert(text, "SetValueAt: 'value' can't be nil")
assert(value, "SetValueAt: 'value' can't be nil")
if self.values[index] then
self.values[index] = value
end
Expand Down
2 changes: 1 addition & 1 deletion Util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ end

-- Returns true if the game version is Season of Dicovery.
function ns:IsSoD()
return C_Seasons.GetActiveSeason() == Enum.SeasonID.Placeholder
return Enum.SeasonID.SeasonOfDiscovery and C_Seasons.GetActiveSeason() == Enum.SeasonID.SeasonOfDiscovery
end

0 comments on commit e442186

Please sign in to comment.