Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 40 additions & 8 deletions GUI_Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ local RAID_CLASS_COLORS = RAID_CLASS_COLORS
local WOW_RETAIL = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
local WOW_PANDA_CLASSIC = WOW_PROJECT_ID == WOW_PROJECT_MISTS_CLASSIC or WOW_PROJECT_ID == WOW_PROJECT_CATACLYSM_CLASSIC or WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC or WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC

if FillLocalizedClassList then
if LOCALIZED_CLASS_NAMES_MALE then
for k, v in pairs(LOCALIZED_CLASS_NAMES_MALE) do
BC[k] = v
end
elseif FillLocalizedClassList then
FillLocalizedClassList(BC, false) -- We are sexist here but not much of a choice, when there is no neutral
elseif LocalizedClassList then
BC = LocalizedClassList(false)
Expand Down Expand Up @@ -260,6 +264,7 @@ end

function me:CreateWindowModuleSelection(parent)
me.ModuleOptions = CreateFrame("Frame", nil, parent)
local useNativeDamageMeter = C_DamageMeter ~= nil

local theFrame = me.ModuleOptions

Expand Down Expand Up @@ -302,7 +307,11 @@ function me:CreateWindowModuleSelection(parent)
end
end)
theFrame.Deaths = me:CreateSavedCheckbox(L["Deaths"], theFrame, "Modules", "Deaths")
theFrame.Deaths:SetPoint("TOPLEFT", theFrame.OverhealingDone, "BOTTOMLEFT", 0, 0)
if useNativeDamageMeter then
theFrame.Deaths:SetPoint("TOPLEFT", theFrame, "TOPLEFT", 8, -20)
else
theFrame.Deaths:SetPoint("TOPLEFT", theFrame.OverhealingDone, "BOTTOMLEFT", 0, 0)
end
theFrame.Deaths:SetScript("OnClick", function(this)
if this:GetChecked() then
this:SetChecked(true)
Expand Down Expand Up @@ -347,7 +356,11 @@ function me:CreateWindowModuleSelection(parent)
end
end)
theFrame.Activity = me:CreateSavedCheckbox(L["Activity"], theFrame, "Modules", "Activity")
theFrame.Activity:SetPoint("TOPLEFT", theFrame.HOTUptime, "BOTTOMLEFT", 0, 0)
if useNativeDamageMeter then
theFrame.Activity:SetPoint("TOPLEFT", theFrame.Deaths, "BOTTOMLEFT", 0, 0)
else
theFrame.Activity:SetPoint("TOPLEFT", theFrame.HOTUptime, "BOTTOMLEFT", 0, 0)
end
theFrame.Activity:SetScript("OnClick", function(this)
if this:GetChecked() then
this:SetChecked(true)
Expand All @@ -361,6 +374,16 @@ function me:CreateWindowModuleSelection(parent)
Recount:RefreshMainWindow()
end
end)
if useNativeDamageMeter then
theFrame.HealingTaken:Hide()
theFrame.HealingTaken:Disable()
theFrame.OverhealingDone:Hide()
theFrame.OverhealingDone:Disable()
theFrame.DOTUptime:Hide()
theFrame.DOTUptime:Disable()
theFrame.HOTUptime:Hide()
theFrame.HOTUptime:Disable()
end
end

function me:CreateClassColorSelection(parent)
Expand Down Expand Up @@ -750,7 +773,7 @@ end

function me:RefreshStatusBars()
local BarTextures = SM:List("statusbar")
local size = table.getn(BarTextures)
local size = #(BarTextures)

FauxScrollFrame_Update(me.TextureOptions.ScrollBar, size, 13, 12)
local offset = FauxScrollFrame_GetOffset(me.TextureOptions.ScrollBar)
Expand Down Expand Up @@ -1009,7 +1032,7 @@ function me:CreateTextureSelection(parent)
end
me:UpdateStatusBars()

if table.getn(BarTextures) <= 13 then
if #(BarTextures) <= 13 then
for i = 1, 13 do
theFrame.Rows[i]:SetWidth(196)
theFrame.Rows[i]:SetPoint("TOP", theFrame, "TOP", 0, -i * 14 - 2)
Expand Down Expand Up @@ -1071,7 +1094,7 @@ end

function me:RefreshFonts()
local Fonts = SM:List("font")
local size = table.getn(Fonts)
local size = #(Fonts)

FauxScrollFrame_Update(me.FontOptions.ScrollBar, size, 13, 12)
local offset = FauxScrollFrame_GetOffset(me.FontOptions.ScrollBar)
Expand Down Expand Up @@ -1106,7 +1129,7 @@ function me:CreateFontSelection(parent)
end
me:UpdateFonts()

if table.getn(Fonts) <= 13 then
if #(Fonts) <= 13 then
for i = 1, 13 do
theFrame.Rows[i]:SetWidth(196)
theFrame.Rows[i]:SetPoint("TOP", theFrame, "TOP", 0, -i * 14 - 2)
Expand Down Expand Up @@ -1346,6 +1369,7 @@ end

function me:SetupRealtimeOptions(parent)
me.RealtimeOptions = CreateFrame("Frame", nil, parent)
local useNativeDamageMeter = C_DamageMeter ~= nil
local theFrame = me.RealtimeOptions
theFrame:SetHeight(parent:GetHeight() - 34)
theFrame:SetWidth(200)
Expand Down Expand Up @@ -1394,10 +1418,18 @@ function me:SetupRealtimeOptions(parent)
Recount:CreateRealtimeWindow("!RAID", "HEALINGTAKEN", "Raid HTPS")
end)
theFrame.RHTPSButton:SetText(L["HTPS"])
if useNativeDamageMeter then
theFrame.RHTPSButton:Hide()
theFrame.RHTPSButton:Disable()
end

theFrame.TitleRaid = theFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
theFrame.TitleRaid:SetText(L["Network"])
theFrame.TitleRaid:SetPoint("TOP", theFrame, "TOP", 0, -106)
if useNativeDamageMeter then
theFrame.TitleRaid:SetPoint("TOP", theFrame, "TOP", 0, -80)
else
theFrame.TitleRaid:SetPoint("TOP", theFrame, "TOP", 0, -106)
end

theFrame.FPSButton = CreateFrame("Button", nil, theFrame, "UIPanelButtonTemplate")
theFrame.FPSButton:SetWidth(90)
Expand Down
47 changes: 35 additions & 12 deletions GUI_Detail.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ local wipe = wipe


local CreateFrame = CreateFrame
local SendChatMessage = SendChatMessage
local SendChatMessage = (C_ChatInfo and C_ChatInfo.SendChatMessage) or SendChatMessage
local BNSendWhisper = BNSendWhisper

local UIParent = UIParent
Expand Down Expand Up @@ -431,7 +431,7 @@ function me:RefreshDeathDetails()
local size

if Data then
size = table.getn(Data)
size = #(Data)
else
size = 0
end
Expand Down Expand Up @@ -1436,11 +1436,16 @@ function Recount:UpdateSummaryMode(name)
local activetime = (data2.ActiveTime or 0) + Epsilon
local damagetaken = data2.DamageTaken or 0
local dot_time = data2.DOT_Time or 0
local unsupportedText = "N/A"
theFrame.Damage.Total:SetValue(damage)
theFrame.Damage.Taken:SetValue(damagetaken)
theFrame.Damage.PerSec:SetValue((math.floor(10 * damage / (activetime) + 0.5) / 10))
theFrame.Damage.Time:SetValue(timedamage.."s ("..math.floor(100 * timedamage / (TotalTime + Epsilon) + 0.5).."%)")
theFrame.Damage.Misc:SetValue(math.floor(10 * dot_time / (activetime + Epsilon) + 0.5) / 10)
if Recount.UseDamageMeter then
theFrame.Damage.Misc:SetValue(unsupportedText)
else
theFrame.Damage.Misc:SetValue(math.floor(10 * dot_time / (activetime + Epsilon) + 0.5) / 10)
end

--Set Pet Data
if data.Pet and #data.Pet > 0 then
Expand Down Expand Up @@ -1480,8 +1485,12 @@ function Recount:UpdateSummaryMode(name)
theFrame.Pet.Taken:SetValue(petdamagetaken)
theFrame.Pet.PerSec:SetValue((math.floor(10 * petdamage / petactivetime + 0.5) / 10))
theFrame.Pet.Time:SetValue(pettimedamage)
Num, Focus = me:CalculateFocus(pettimedamaging)
theFrame.Pet.Focus:SetValue(Num.." ("..Focus.."%)")
if Recount.UseDamageMeter then
theFrame.Pet.Focus:SetValue(unsupportedText)
else
Num, Focus = me:CalculateFocus(pettimedamaging)
theFrame.Pet.Focus:SetValue(Num.." ("..Focus.."%)")
end

if #data.Pet > 1 then
theFrame.Pet.Page:SetText(L["Click for next Pet"])
Expand All @@ -1506,21 +1515,35 @@ function Recount:UpdateSummaryMode(name)
local hot_time = data2.HOT_Time or 0

theFrame.Healing.Total:SetValue((healing + absorbs).." ("..(math.floor(10 * (healing + absorbs) / (activetime) + 0.5) / 10)..")")
theFrame.Healing.Taken:SetValue(healingtaken)
theFrame.Healing.Overhealing:SetValue(overhealing.." ("..(math.floor(10 * overhealing / (activetime) + 0.5) / 10)..")".." ("..(math.floor(1000 * overhealing / (overhealing + healing + Epsilon) + 0.5) / 10).."%)")
theFrame.Healing.Time:SetValue(timeheal.."s ("..math.floor(100 * timeheal / (TotalTime + Epsilon) + 0.5).."%)")
theFrame.Healing.Misc:SetValue(math.floor(10 * hot_time / (activetime + Epsilon) + 0.5) / 10)
if Recount.UseDamageMeter then
theFrame.Healing.Taken:SetValue(unsupportedText)
theFrame.Healing.Overhealing:SetValue(unsupportedText)
theFrame.Healing.Misc:SetValue(unsupportedText)
else
theFrame.Healing.Taken:SetValue(healingtaken)
theFrame.Healing.Overhealing:SetValue(overhealing.." ("..(math.floor(10 * overhealing / (activetime) + 0.5) / 10)..")".." ("..(math.floor(1000 * overhealing / (overhealing + healing + Epsilon) + 0.5) / 10).."%)")
theFrame.Healing.Misc:SetValue(math.floor(10 * hot_time / (activetime + Epsilon) + 0.5) / 10)
end


local timedamaging = data2.TimeDamaging

Num, Focus = me:CalculateFocus(timedamaging)
theFrame.Damage.Focus:SetValue(Num.." ("..Focus.."%)")
if Recount.UseDamageMeter then
theFrame.Damage.Focus:SetValue(unsupportedText)
else
Num, Focus = me:CalculateFocus(timedamaging)
theFrame.Damage.Focus:SetValue(Num.." ("..Focus.."%)")
end

local timehealing = data2.TimeHealing

Num, Focus = me:CalculateFocus(timehealing)
theFrame.Healing.Focus:SetValue(Num.." ("..Focus.."%)")
if Recount.UseDamageMeter then
theFrame.Healing.Focus:SetValue(unsupportedText)
else
Num, Focus = me:CalculateFocus(timehealing)
theFrame.Healing.Focus:SetValue(Num.." ("..Focus.."%)")
end


theFrame.Name = name
Expand Down
2 changes: 1 addition & 1 deletion GUI_Graph.lua
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ end

function Recount:GraphRefreshCombat()
local combat = Recount.db2.CombatTimes
local size = table.getn(combat)
local size = #(combat)
FauxScrollFrame_Update(Recount.GraphWindow.ScrollBar2, size, 10, 20)
local offset = FauxScrollFrame_GetOffset(Recount.GraphWindow.ScrollBar2)
local Rows = Recount.GraphWindow.TimeRows
Expand Down
Loading