Skip to content

Commit

Permalink
Merge pull request #148 from thurin/cata-update
Browse files Browse the repository at this point in the history
Cata update
  • Loading branch information
tukz authored Apr 29, 2024
2 parents 97e16ee + ef92eed commit e01dddb
Show file tree
Hide file tree
Showing 15 changed files with 253 additions and 20 deletions.
4 changes: 3 additions & 1 deletion .pkgmeta
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ externals:
Tukui/Libs/CallbackHandler-1.0: https://repos.curseforge.com/wow/callbackhandler/trunk/CallbackHandler-1.0
Tukui/Libs/LibStub: https://repos.curseforge.com/wow/libstub/trunk
Tukui/Libs/SortBags: https://github.com/shirsig/SortBags
Tukui/Libs/SortBags_Vanilla: https://github.com/shirsig/SortBags-vanilla
Tukui/Libs/SortBags_Vanilla:
url: https://github.com/shirsig/SortBags
branch: classic-era
Tukui/Libs/TaintLess:
url: https://www.townlong-yak.com/addons.git/taintless
commit: default
Expand Down
2 changes: 2 additions & 0 deletions Tukui/Core/Gui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ local CheckClient = function(self)

if Client == "RETAIL" and T.Retail then
return true
elseif Client == "CATA" and T.Cata then
return true
elseif Client == "WOTLK" and T.WotLK then
return true
elseif Client == "BCC" and T.BCC then
Expand Down
1 change: 1 addition & 0 deletions Tukui/Core/Init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Engine[1].Retail = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
Engine[1].BCC = (WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC) or (Toc >= 20000 and Toc < 30000)
Engine[1].Classic = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
Engine[1].WotLK = (WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC) or (Toc >= 30000 and Toc < 40000)
Engine[1].Cata = (WOW_PROJECT_ID == WOW_PROJECT_CATACLYSM_CLASSIC) or (Toc >= 40000 and Toc < 50000)
Engine[1].DF = Toc >= 100000 and Toc < 110000
Engine[1].WindowedMode = Windowed
Engine[1].FullscreenMode = Fullscreen
Expand Down
2 changes: 1 addition & 1 deletion Tukui/Core/Loading.lua
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ function Loading:OnEvent(event)
-- restore original stopwatch commands
SlashCmdList["STOPWATCH"] = Stopwatch_Toggle
elseif (event == "PLAYER_ENTERING_WORLD") then
if not T.WotLK then
if not T.WotLK and not T.Cata then
T["Miscellaneous"]["ObjectiveTracker"]:Enable()
end
elseif (event == "VARIABLES_LOADED") then
Expand Down
8 changes: 6 additions & 2 deletions Tukui/Modules/ActionBars/Bar1.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function ActionBars:CreateBar1()
local Movers = T["Movers"]
local Size = C.ActionBars.NormalButtonSize
local Spacing = C.ActionBars.ButtonSpacing
local Druid, Rogue, Warrior, Priest = "", "", "", ""
local Druid, Rogue, Warrior, Priest, Warlock = "", "", "", "", ""
local ButtonsPerRow = C.ActionBars.Bar1ButtonsPerRow
local NumButtons = C.ActionBars.Bar1NumButtons
local VehicleBar = format("[vehicleui][possessbar] %d;", GetVehicleBarIndex and GetVehicleBarIndex()) or ""
Expand Down Expand Up @@ -36,7 +36,7 @@ function ActionBars:CreateBar1()
end

if (C.ActionBars.SwitchBarOnStance) then
if T.WotLK then
if T.WotLK or T.Cata then
Rogue = "[bonusbar:1] 7; [bonusbar:2] 8;"
else
Rogue = "[bonusbar:1] 7;"
Expand All @@ -50,6 +50,9 @@ function ActionBars:CreateBar1()

Warrior = "[bonusbar:1] 7; [bonusbar:2] 8; [bonusbar:3] 9;"
Priest = "[bonusbar:1] 7;"
if T.Cata then
Warlock = "[form:1] 7;"
end
end

local DefaultPaging
Expand All @@ -65,6 +68,7 @@ function ActionBars:CreateBar1()
["ROGUE"] = Rogue,
["WARRIOR"] = Warrior,
["PRIEST"] = Priest,
["WARLOCK"] = Warlock,
["DEFAULT"] = DefaultPaging,
}

Expand Down
7 changes: 6 additions & 1 deletion Tukui/Modules/ActionBars/BarStance.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ function ActionBars:CreateStanceBar()

local Bar = CreateFrame("Frame", "TukuiStanceBar", T.PetHider, "SecureHandlerStateTemplate")
Bar:SetSize((PetSize * 10) + (Spacing * 11), PetSize + (Spacing * 2))
Bar:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 28, 233)
-- Hunter in Cata has both stance and pet. Offset stance so not on top of each other
if T.Cata and (T.MyClass == "HUNTER" or T.MyClass == "DEATHKNIGHT") then
Bar:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 28, 277)
else
Bar:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 28, 233)
end
Bar:SetFrameStrata("LOW")
Bar:SetFrameLevel(10)
Bar:RegisterEvent("UPDATE_SHAPESHIFT_COOLDOWN")
Expand Down
4 changes: 2 additions & 2 deletions Tukui/Modules/ActionBars/Skin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function ActionBars:SkinButton(button)
Button:UpdateState(Button)
end

if (T.Retail) or (T.Classic and T.WoWBuild >= 51146) or (T.WotLK and T.WoWBuild >= 46917) then
if (T.Retail) or (T.Classic and T.WoWBuild >= 51146) or (T.WotLK and T.WoWBuild >= 46917) or (T.Cata) then
Normal:SetParent(T.Hider)
end
end
Expand Down Expand Up @@ -200,7 +200,7 @@ function ActionBars:SkinPetAndShiftButton(Normal, Button, Icon, Name, Pet)
Flash:SetTexture("")

if Normal then
if (T.Retail) or (T.WotLK and T.WoWBuild >= 46917) then
if (T.Retail) or (T.WotLK and T.WoWBuild >= 46917) or (T.Cata) then
Normal:SetParent(T.Hider)
end

Expand Down
12 changes: 8 additions & 4 deletions Tukui/Modules/ChatFrames/ChatFrames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ function Chat:StyleFrame(frame)
_G[format("ChatFrame%sTabSelectedMiddle", ID)]:Kill()
_G[format("ChatFrame%sTabSelectedRight", ID)]:Kill()

_G[format("ChatFrame%sButtonFrameMinimizeButton", ID)]:Kill()
if T.Cata then
_G[format("ChatFrame%sMinimizeButton", ID)]:Kill()
else
_G[format("ChatFrame%sButtonFrameMinimizeButton", ID)]:Kill()
end
_G[format("ChatFrame%sButtonFrame", ID)]:Kill()

_G[format("ChatFrame%sEditBoxLeft", ID)]:Kill()
Expand Down Expand Up @@ -340,7 +344,7 @@ function Chat:Reset()
FCF_SetLocked(ChatFrame5, 1)
FCF_DockFrame(ChatFrame5)

if T.Retail or T.WotLK then
if T.Retail or T.WotLK or T.Cata then
FCF_OpenNewWindow(COMMUNITIES_DEFAULT_CHANNEL_NAME)
FCF_SetLocked(ChatFrame6, 1)
FCF_DockFrame(ChatFrame6)
Expand All @@ -366,7 +370,7 @@ function Chat:Reset()

-- Remove everything in first 4 chat windows
for i = 1, 6 do
if (T.Retail and i ~= 2 and i ~= 3) or (T.BCC and i ~= 2 and i ~= 6) or (T.Classic and i ~= 2 and i ~= 6) or (T.WotLK and i ~= 2 and i ~= 3) then
if (T.Retail and i ~= 2 and i ~= 3) or (T.BCC and i ~= 2 and i ~= 6) or (T.Classic and i ~= 2 and i ~= 6) or (T.WotLK and i ~= 2 and i ~= 3) or (T.Cata and i ~= 2 and i ~= 3) then
local ChatFrame = _G["ChatFrame"..i]

ChatFrame_RemoveAllMessageGroups(ChatFrame)
Expand Down Expand Up @@ -447,7 +451,7 @@ function Chat:Reset()
-- ChatFrame 6 Setup --
-----------------------

if T.Retail or T.WotLK then
if T.Retail or T.WotLK or T.Cata then
for i = 1, #Channels do
ChatFrame_RemoveChannel(ChatFrame1, Channels[i])
ChatFrame_AddChannel(ChatFrame6, Channels[i])
Expand Down
2 changes: 1 addition & 1 deletion Tukui/Modules/DataTexts/Elements/Time.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ local OnMouseUp = function(button, click)
return
end

if T.Retail or T.WotLK then
if T.Retail or T.WotLK or T.Cata then
GameTimeFrame_OnClick()
else
Stopwatch_Toggle()
Expand Down
8 changes: 4 additions & 4 deletions Tukui/Modules/Maps/Minimap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ function Minimap:EnableMouseWheelZoom()
if (delta > 0) then
ZoomIn:Click()
elseif (delta < 0) then
if T.Retail or T.WotLK then
if T.Retail or T.WotLK or T.Cata then
if Minimap:GetZoom() ~= 0 then
ZoomOut:Click()
end
Expand Down Expand Up @@ -423,7 +423,7 @@ function Minimap:UpdateZone()
end

function Minimap:EnableMouseOver()
local Tracking = (T.Retail or T.WotLK) and MiniMapTrackingButton or MiniMapTracking
local Tracking = (T.Retail or T.WotLK or T.Cata) and MiniMapTrackingButton or MiniMapTracking
local TrackingIcon = MiniMapTrackingIcon

self:HookScript("OnEnter", function(self)
Expand Down Expand Up @@ -507,7 +507,7 @@ function Minimap:SizeMinimap()
end

function Minimap:TaxiExitOnEvent(event)
if (T.Retail or T.WotLK) and CanExitVehicle() then
if (T.Retail or T.WotLK or T.Cata) and CanExitVehicle() then
if (UnitOnTaxi("player")) then
self.Text:SetText("|cffFF0000" .. TAXI_CANCEL .. "|r")
else
Expand All @@ -528,7 +528,7 @@ function Minimap:TaxiExitOnClick()
if (UnitOnTaxi("player")) then
TaxiRequestEarlyLanding()
else
if T.Retail or T.WotLK then
if T.Retail or T.WotLK or T.Cata then
VehicleExit()
end
end
Expand Down
2 changes: 1 addition & 1 deletion Tukui/Modules/Miscellaneous/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function Miscellaneous:Enable()
Miscellaneous["ItemLevel"]:Enable()
Miscellaneous["Alerts"]:Enable()

if T.Retail or T.WotLK then
if T.Retail or T.WotLK or T.Cata then
Miscellaneous["VehicleIndicator"]:Enable()
end

Expand Down
2 changes: 1 addition & 1 deletion Tukui/Modules/Miscellaneous/MicroMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function MicroMenu:GameMenu()

MicroMenu:SetFrameStrata("HIGH")
MicroMenu:SetFrameLevel(600)
MicroMenu:SetSize(250, T.Classic and 298 or T.WotLK and 372 or 408)
MicroMenu:SetSize(250, T.Classic and 298 or T.WotLK and 372 or T.Cata and 438 or 408)
MicroMenu:CreateBackdrop("Transparent")
MicroMenu:CreateShadow()
MicroMenu:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
Expand Down
2 changes: 1 addition & 1 deletion Tukui/Modules/UnitFrames/Classes/DeathKnight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ UnitFrames.AddClassFeatures["DEATHKNIGHT"] = function(self)
RunesBar.PostUpdate = UnitFrames.RunesPostUpdate
RunesBar.colorSpec = true

if T.WotLK then
if T.WotLK or T.Cata then
RunesBar.UpdateColor = UnitFrames.RunesUpdateColor
end

Expand Down
2 changes: 1 addition & 1 deletion Tukui/Modules/UnitFrames/Units/Arena.lua
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function UnitFrames:Arena()
self.Debuffs = Debuffs
end

if T.BCC or T.WotLK then
if T.BCC or T.WotLK or T.Cata then
local Trinket = CreateFrame("Frame", nil, self)
Trinket:SetSize(35, 35)
Trinket:SetPoint("BOTTOMRIGHT", self, "BOTTOMLEFT", -6, 0)
Expand Down
Loading

0 comments on commit e01dddb

Please sign in to comment.