Skip to content

Instantly share code, notes, and snippets.

@ropp5pop
Created October 1, 2024 13:59
Show Gist options
  • Save ropp5pop/a3224c5c728624193bbffeb48bddbeab to your computer and use it in GitHub Desktop.
Save ropp5pop/a3224c5c728624193bbffeb48bddbeab to your computer and use it in GitHub Desktop.
WoW - Details Code
-- this code runs when the current zone is changed
-- This set the position and size of the window in regards to being in raid, party or solo.
-- window1 (w01) display "Damage Done" by default
local window1 = Details:GetWindow(1)
window1:SetDisplay(DETAILS_SEGMENTID_CURRENT, 1, 1)
DetailsBaseFrame1:SetPoint("BOTTOMLEFT", 584, 34)
if (window1) then
local currentZoneType = Details.zone_type
if (currentZoneType == "none" or "party") then
window1:SetSize(280, 115)
if (currentZoneType == "raid") then
window1:SetSize(294, 230)
window1:ShowWindow()
end
end
end
-- window2 (w02) display "Damage Taken" by default
local window2 = Details:GetWindow(2)
window2:SetDisplay(DETAILS_SEGMENTID_CURRENT, 1, 3)
window2:SetSize(212, 106)
DetailsBaseFrame2:SetPoint("BOTTOMRIGHT", -184, 34)
if (window2) then
local currentZoneType = Details.zone_type
if (currentZoneType == "raid") then
window2:ShowWindow()
end
end
-- window3 (w03) display "Interrupts" by default
local window3 = Details:GetWindow(3)
window3:SetDisplay(DETAILS_SEGMENTID_CURRENT, 4, 3)
window3:SetSize(212, 106)
DetailsBaseFrame3:SetPoint("BOTTOMRIGHT", -406, 34)
if (window3) then
local currentZoneType = Details.zone_type
if (currentZoneType == "none" or "party") then
window3:HideWindow()
if (currentZoneType == "raid") then
window3:ShowWindow()
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment