Skip to content

Commit

Permalink
Reworked button adjustment code for vanilla/anniversary
Browse files Browse the repository at this point in the history
  • Loading branch information
GovtGeek committed Nov 26, 2024
1 parent d913aae commit 598d9ad
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Outfitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,13 @@ for vIndex, vSlotName in ipairs(Outfitter.cSlotNames) do
Outfitter.cSlotOrder[vSlotName] = vIndex
end
function Outfitter:OutfitterButtonAdjust()
if Outfitter:IsClassicEra() then
OutfitterButton:SetPoint("TOPRIGHT", PaperDollFrame, "TOPRIGHT", -28, -40)
end
if C_Seasons and C_Seasons.HasActiveSeason() and (C_Seasons.GetActiveSeason() == Enum.SeasonID.SeasonOfDiscovery) then
OutfitterButton:ClearAllPoints()
OutfitterButton:SetPoint("BOTTOMRIGHT", RuneFrameControlButton, "BOTTOMLEFT", 10, -4)
end
if not Outfitter:IsClassicCataclysm() then
--[[-- TODO? Use this for all adjustments - remove the EquipmentManagerAdjust
if cvar == "equipmentManager" and value == "1" then -- cvar values are strings
Expand All @@ -1239,10 +1246,6 @@ function Outfitter:OutfitterButtonAdjust()
OutfitterFrame:SetPoint("TOPLEFT", PaperDollFrame, "TOPRIGHT", -34, -48)
end
--]]--
if RuneFrameControlButton ~= nil then
OutfitterButton:ClearAllPoints()
OutfitterButton:SetPoint("BOTTOMRIGHT", RuneFrameControlButton, "BOTTOMLEFT", 10, -4)
end
else
OutfitterButton:SetPoint("TOPRIGHT", PaperDollFrame, "TOPRIGHT", 4, -28)
end
Expand Down Expand Up @@ -5209,10 +5212,11 @@ function Outfitter:Initialize()
-- Season of Discovery handling
if C_Seasons and C_Seasons.HasActiveSeason() and (C_Seasons.GetActiveSeason() == Enum.SeasonID.SeasonOfDiscovery) then
self.EventLib:RegisterEvent("ENGRAVING_MODE_CHANGED", self.EngravingModeChanged, self)
Outfitter:OutfitterButtonAdjust()
end
--

-- Move the Outfitter button according to the version we're running
Outfitter:OutfitterButtonAdjust()

self:DispatchOutfitEvent("OUTFITTER_INIT")

self.SchedulerLib:ScheduleUniqueRepeatingTask(0.5, self.UpdateSwimming, self, nil, "Outfitter:UpdateSwimming")
Expand Down

0 comments on commit 598d9ad

Please sign in to comment.