- Details! is ready for Uldir mythic raiding!.

- Details! Scroll Damage for training in dummies is now ready for more tests, access it /details scrolldamage.
- Damage and Healing tooltips now show a statusbar indicating the percent done by the ability.
- Added a scale slider  to the options panel.
- Added monk's Quaking Palm to crowd control spells.
- Fixed an issue with Plater integration.
- Fixed tooltips not hiding when the cursor leaves the spell icon in the Damage Taken by Spell.
- Framework: fixed an issue with tooltips and menus where the division line wasn't hiding properly.
- Framework: fixed some buttons not showing its text in the options panel.
This commit is contained in:
Tercio
2018-09-10 21:17:53 -03:00
parent 822f15fe74
commit 3f18a99d42
18 changed files with 499 additions and 86 deletions
+232
View File
@@ -3960,6 +3960,10 @@
if (not value) then
Details:Msg ("a /reload might be needed to disable this setting.")
else
if (Plater) then
Plater.RefreshDBUpvalues()
end
end
end,
name = "Show Real Time Dps",
@@ -4068,6 +4072,10 @@
if (not value) then
Details:Msg ("a /reload might be needed to disable this setting.")
else
if (Plater) then
Plater.RefreshDBUpvalues()
end
end
end,
name = "Show Real Time Dps (From You)",
@@ -4176,6 +4184,10 @@
if (not value) then
Details:Msg ("a /reload might be needed to disable this setting.")
else
if (Plater) then
Plater.RefreshDBUpvalues()
end
end
end,
name = "Show Total Damage Taken",
@@ -6589,3 +6601,223 @@ function Details:Dump (t)
DetailsDumpFrame:Show()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> damage scroll
function Details:ScrollDamage()
if (not DetailsScrollDamage) then
local DF = DetailsFramework
DetailsScrollDamage = DetailsFramework:CreateSimplePanel (UIParent)
DetailsScrollDamage:SetSize (707, 505)
DetailsScrollDamage:SetTitle ("Details! Scroll Damage")
DetailsScrollDamage.Data = {}
DetailsScrollDamage:ClearAllPoints()
DetailsScrollDamage:SetPoint ("left", UIParent, "left", 10, 0)
DetailsScrollDamage:Hide()
local scroll_width = 675
local scroll_height = 450
local scroll_lines = 21
local scroll_line_height = 20
local backdrop_color = {.2, .2, .2, 0.2}
local backdrop_color_on_enter = {.8, .8, .8, 0.4}
local backdrop_color_is_critical = {.4, .4, .2, 0.2}
local backdrop_color_is_critical_on_enter = {1, 1, .8, 0.4}
local y = -15
local headerY = y - 15
local scrollY = headerY - 20
--header
local headerTable = {
{text = "Icon", width = 32},
{text = "Spell Name", width = 180},
{text = "Amount", width = 80},
{text = "Time", width = 80},
{text = "Token", width = 130},
{text = "Spell ID", width = 80},
{text = "School", width = 80},
}
local headerOptions = {
padding = 2,
}
DetailsScrollDamage.Header = DetailsFramework:CreateHeader (DetailsScrollDamage, headerTable, headerOptions)
DetailsScrollDamage.Header:SetPoint ("topleft", DetailsScrollDamage, "topleft", 5, headerY)
local scroll_refresh = function (self, data, offset, total_lines)
local ToK = _detalhes:GetCurrentToKFunction()
for i = 1, total_lines do
local index = i + offset
local spellTable = data [index]
if (spellTable) then
local line = self:GetLine (i)
local time, token, hidding, sourceSerial, sourceName, sourceFlag, sourceFlag2, targetSerial, targetName, targetFlag, targetFlag2, spellID, spellName, spellType, amount, overKill, school, resisted, blocked, absorbed, isCritical = unpack (spellTable)
local spellName, _, spellIcon
if (token ~= "SWING_DAMAGE") then
spellName, _, spellIcon = GetSpellInfo (spellID)
else
spellName, _, spellIcon = GetSpellInfo (1)
end
line.SpellID = spellID
line.IsCritical = isCritical
if (isCritical) then
line:SetBackdropColor (unpack (backdrop_color_is_critical))
else
line:SetBackdropColor (unpack (backdrop_color))
end
if (spellName) then
line.Icon:SetTexture (spellIcon)
line.Icon:SetTexCoord (.1, .9, .1, .9)
line.DamageText.text = isCritical and "|cFFFFFF00" .. ToK (_, amount) or ToK (_, amount)
line.TimeText.text = format ("%.4f", time - DetailsScrollDamage.Data.Started)
line.TokenText.text = token:gsub ("SPELL_", "")
line.SchoolText.text = _detalhes:GetSpellSchoolFormatedName (school)
line.SpellIDText.text = spellID
line.SpellNameText.text = spellName
else
line:Hide()
end
end
end
end
local lineOnEnter = function (self)
if (self.IsCritical) then
self:SetBackdropColor (unpack (backdrop_color_is_critical_on_enter))
else
self:SetBackdropColor (unpack (backdrop_color_on_enter))
end
if (self.SpellID) then
GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT")
GameTooltip:SetSpellByID (self.SpellID)
GameTooltip:AddLine (" ")
GameTooltip:Show()
end
end
local lineOnLeave = function (self)
if (self.IsCritical) then
self:SetBackdropColor (unpack (backdrop_color_is_critical))
else
self:SetBackdropColor (unpack (backdrop_color))
end
GameTooltip:Hide()
end
local scroll_createline = function (self, index)
local line = CreateFrame ("button", "$parentLine" .. index, self)
line:SetPoint ("topleft", self, "topleft", 1, -((index-1)*(scroll_line_height+1)) - 1)
line:SetSize (scroll_width - 2, scroll_line_height)
line:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
line:SetBackdropColor (unpack (backdrop_color))
DF:Mixin (line, DF.HeaderFunctions)
line:SetScript ("OnEnter", lineOnEnter)
line:SetScript ("OnLeave", lineOnLeave)
--icon
local icon = line:CreateTexture ("$parentSpellIcon", "overlay")
icon:SetSize (scroll_line_height - 2, scroll_line_height - 2)
--spellname
local spellNameText = DF:CreateLabel (line)
--damage
local damageText = DF:CreateLabel (line)
--time
local timeText = DF:CreateLabel (line)
--token
local tokenText = DF:CreateLabel (line)
--spell ID
local spellIDText = DF:CreateLabel (line)
--school
local schoolText = DF:CreateLabel (line)
line:AddFrameToHeaderAlignment (icon)
line:AddFrameToHeaderAlignment (spellNameText)
line:AddFrameToHeaderAlignment (damageText)
line:AddFrameToHeaderAlignment (timeText)
line:AddFrameToHeaderAlignment (tokenText)
line:AddFrameToHeaderAlignment (spellIDText)
line:AddFrameToHeaderAlignment (schoolText)
line:AlignWithHeader (DetailsScrollDamage.Header, "left")
line.Icon = icon
line.DamageText = damageText
line.TimeText = timeText
line.TokenText = tokenText
line.SchoolText = schoolText
line.SpellIDText = spellIDText
line.SpellNameText = spellNameText
return line
end
local damageScroll = DF:CreateScrollBox (DetailsScrollDamage, "$parentSpellScroll", scroll_refresh, DetailsScrollDamage.Data, scroll_width, scroll_height, scroll_lines, scroll_line_height)
DF:ReskinSlider (damageScroll)
damageScroll:SetPoint ("topleft", DetailsScrollDamage, "topleft", 5, scrollY)
--create lines
for i = 1, scroll_lines do
damageScroll:CreateLine (scroll_createline)
end
local combatLogReader = CreateFrame ("frame")
local playerSerial = UnitGUID ("player")
combatLogReader:SetScript ("OnEvent", function (self)
local timew, token, hidding, sourceSerial, sourceName, sourceFlag, sourceFlag2, targetSerial, targetName, targetFlag, targetFlag2, spellID, spellName, spellType, amount, overKill, school, resisted, blocked, absorbed, isCritical = CombatLogGetCurrentEventInfo()
if (sourceSerial == playerSerial) then
if (token == "SPELL_DAMAGE" or token == "SPELL_PERIODIC_DAMAGE" or token == "RANGE_DAMAGE" or token == "DAMAGE_SHIELD") then
if (not DetailsScrollDamage.Data.Started) then
DetailsScrollDamage.Data.Started = time()
end
tinsert (DetailsScrollDamage.Data, 1, {timew, token, hidding, sourceSerial, sourceName, sourceFlag, sourceFlag2, targetSerial, targetName, targetFlag, targetFlag2, spellID, spellName, spellType, amount, overKill or 0, school or 1, resisted or 0, blocked or 0, absorbed or 0, isCritical})
damageScroll:Refresh()
elseif (token == "SWING_DAMAGE") then
-- amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand = spellID, spellName, spellType, amount, overKill, school, resisted, blocked, absorbed, isCritical
-- tinsert (DetailsScrollDamage.Data, 1, {timew, token, hidding, sourceSerial, sourceName, sourceFlag, sourceFlag2, targetSerial, targetName, targetFlag, targetFlag2, spellID, spellName, spellType, amount, overKill, school, resisted, blocked, absorbed, isCritical})
-- damageScroll:Refresh()
end
end
end)
DetailsScrollDamage:SetScript ("OnShow", function()
wipe (DetailsScrollDamage.Data)
damageScroll:Refresh()
combatLogReader:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
end)
DetailsScrollDamage:SetScript ("OnHide", function()
combatLogReader:UnregisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
end)
end
DetailsScrollDamage:Show()
end