- 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
+8 -1
View File
@@ -6,7 +6,9 @@ do
return
end
DF.alias_text_colors = {
DF.alias_text_colors = DF.alias_text_colors or {}
local defaultColors = {
["HUNTER"] = {0.67, 0.83, 0.45},
["WARLOCK"] = {0.58, 0.51, 0.79},
["PRIEST"] = {1.0, 1.0, 1.0},
@@ -164,4 +166,9 @@ do
["yellow"] = {1, 1, 0, 1},
["yellowgreen"] = {0.603922, 0.803922, 0.196078, 1}
}
for colorName, colorTable in pairs (defaultColors) do
DF.alias_text_colors [colorName] = colorTable
end
end
+7 -1
View File
@@ -80,6 +80,7 @@ function DF:CreateCoolTip()
["FixedWidthSub"] = true,
["FixedHeightSub"] = true,
["AlignAsBlizzTooltip"] = true,
["AlignAsBlizzTooltipFrameHeightOffset"] = true,
["IgnoreSubMenu"] = true,
["IgnoreButtonAutoHeight"] = true,
["TextHeightMod"] = true,
@@ -1609,6 +1610,11 @@ function DF:CreateCoolTip()
menuButton:SetPoint ("left", frame1, "left", -4, 0)
menuButton:SetPoint ("right", frame1, "right", 4, 0)
if (menuButton.divbar) then
menuButton.divbar:Hide()
menuButton.isDiv = false
end
--> height
if (CoolTip.OptionsTable.AlignAsBlizzTooltip) then
local height = _math_max (8, menuButton.leftText:GetStringHeight(), menuButton.rightText:GetStringHeight(), menuButton.leftIcon:GetHeight(), menuButton.rightIcon:GetHeight())
@@ -1667,7 +1673,7 @@ function DF:CreateCoolTip()
frame1:SetHeight (CoolTip.OptionsTable.FixedHeight)
else
if (CoolTip.OptionsTable.AlignAsBlizzTooltip) then
frame1:SetHeight ( (temp-10) * -1)
frame1:SetHeight ( ((temp-10) * -1) + (CoolTip.OptionsTable.AlignAsBlizzTooltipFrameHeightOffset or 0))
elseif (CoolTip.OptionsTable.IgnoreButtonAutoHeight) then
frame1:SetHeight ( (temp+spacing) * -1)
else
+1 -1
View File
@@ -1,5 +1,5 @@
local dversion = 100
local dversion = 105
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
+25 -5
View File
@@ -1165,6 +1165,8 @@ function DF:NewFillPanel (parent, rows, name, member, w, h, total_lines, fill_ro
panel.scrollframe = scrollframe
scrollframe.lines = {}
DF:ReskinSlider (scrollframe)
--create lines
function panel:UpdateRowAmount()
local size = options.rowheight
@@ -4815,7 +4817,7 @@ DF.IconRowFunctions = {
newIconFrame:SetBackdropBorderColor (0, 0, 0, 0)
newIconFrame:EnableMouse (false)
local cooldownFrame = CreateFrame ("cooldown", "$parentIconCooldown" .. self.NextIcon, self, "CooldownFrameTemplate")
local cooldownFrame = CreateFrame ("cooldown", "$parentIconCooldown" .. self.NextIcon, newIconFrame, "CooldownFrameTemplate")
cooldownFrame:SetAllPoints()
cooldownFrame:EnableMouse (false)
@@ -4823,6 +4825,10 @@ DF.IconRowFunctions = {
newIconFrame.Text:SetPoint ("center")
newIconFrame.Text:Hide()
newIconFrame.Desc = newIconFrame:CreateFontString (nil, "overlay", "GameFontNormal")
newIconFrame.Desc:SetPoint ("bottom", newIconFrame, "top", 0, 2)
newIconFrame.Desc:Hide()
newIconFrame.Cooldown = cooldownFrame
self.IconPool [self.NextIcon] = newIconFrame
@@ -4858,7 +4864,7 @@ DF.IconRowFunctions = {
return iconFrame
end,
SetIcon = function (self, spellId, borderColor, startTime, duration, forceTexture)
SetIcon = function (self, spellId, borderColor, startTime, duration, forceTexture, descText)
local spellName, _, spellIcon
@@ -4878,20 +4884,30 @@ DF.IconRowFunctions = {
else
iconFrame:SetBackdropBorderColor (0, 0, 0 ,0)
end
if (startTime) then
CooldownFrame_Set (iconFrame.Cooldown, startTime, duration, true, true)
if (self.options.show_text) then
iconFrame.Text:Show()
iconFrame.Text:SetText (floor (startTime + duration - GetTime()))
else
iconFrame.Text:Hide()
end
else
iconFrame.Text:Hide()
end
if (descText and self.options.desc_text) then
iconFrame.Desc:Show()
iconFrame.Desc:SetText (descText.text)
iconFrame.Desc:SetTextColor (DF:ParseColors (descText.text_color or self.options.desc_text_color))
DF:SetFontSize (iconFrame.Desc, descText.text_size or self.options.desc_text_size)
else
iconFrame.Desc:Hide()
end
iconFrame:SetSize (self.options.icon_width, self.options.icon_height)
iconFrame:Show()
@@ -4958,10 +4974,13 @@ local default_icon_row_options = {
texcoord = {.1, .9, .1, .9},
show_text = true,
text_color = {1, 1, 1, 1},
desc_text = true,
desc_text_color = {1, 1, 1, 1},
desc_text_size = 7,
left_padding = 1, --distance between right and left
top_padding = 1, --distance between top and bottom
icon_padding = 1, --distance between each icon
backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true},
backdrop = {},
backdrop_color = {0, 0, 0, 0.5},
backdrop_border_color = {0, 0, 0, 1},
anchor = {side = 6, x = 2, y = 0},
@@ -4979,6 +4998,7 @@ function DF:CreateIconRow (parent, name, options)
f:BuildOptionsTable (default_icon_row_options, options)
f:SetSize (f.options.icon_width, f.options.icon_height + (f.options.top_padding * 2))
f:SetBackdrop (f.options.backdrop)
f:SetBackdropColor (unpack (f.options.backdrop_color))
f:SetBackdropBorderColor (unpack (f.options.backdrop_border_color))
+43 -3
View File
@@ -623,7 +623,7 @@ DF.CrowdControlSpells = {
[408] = "ROGUE", --Kidney Shot
[6770] = "ROGUE", --Sap
[1776] = "ROGUE", --Gouge
[853] = "PALADIN", --Hammer of Justice
[20066] = "PALADIN", --Repentance (talent)
[105421] = "PALADIN", --Blinding Light (talent)
@@ -643,7 +643,7 @@ DF.CrowdControlSpells = {
[203123] = "DRUID", --Maim
[50259] = "DRUID", --Dazed (from Wild Charge)
[209753] = "DRUID", --Cyclone (from pvp talent)
[3355] = "HUNTER", --Freezing Trap
[19577] = "HUNTER", --Intimidation
[190927] = "HUNTER", --Harpoon
@@ -654,6 +654,7 @@ DF.CrowdControlSpells = {
[115078] = "MONK", --Paralysis
[198909] = "MONK", --Song of Chi-Ji (talent)
[116706] = "MONK", --Disable
[107079] = "MONK", --Quaking Palm (racial)
[118905] = "SHAMAN", --Static Charge (Capacitor Totem)
[51514] = "SHAMAN", --Hex
@@ -817,7 +818,46 @@ DF.RuneIDs = {
-- /dump UnitAura ("player", 1)
-- /dump UnitAura ("player", 2)
function DF:GetSpellsForEncounterFromJournal (instanceEJID, encounterEJID)
EJ_SelectInstance (instanceEJID)
local name, description, encounterID, rootSectionID, link = EJ_GetEncounterInfo (encounterEJID) --taloc (primeiro boss de Uldir)
if (not name) then
print ("DetailsFramework: Encounter Info Not Found!", instanceEJID, encounterEJID)
return {}
end
local spellIDs = {}
--overview
local sectionInfo = C_EncounterJournal.GetSectionInfo (rootSectionID)
local nextID = {sectionInfo.siblingSectionID}
while (nextID [1]) do
--> get the deepest section in the hierarchy
local ID = tremove (nextID)
local sectionInfo = C_EncounterJournal.GetSectionInfo (ID)
if (sectionInfo) then
if (sectionInfo.spellID and type (sectionInfo.spellID) == "number" and sectionInfo.spellID ~= 0) then
tinsert (spellIDs, sectionInfo.spellID)
end
local nextChild, nextSibling = sectionInfo.firstChildSectionID, sectionInfo.siblingSectionID
if (nextSibling) then
tinsert (nextID, nextSibling)
end
if (nextChild) then
tinsert (nextID, nextChild)
end
else
break
end
end
return spellIDs
end
+38 -5
View File
File diff suppressed because one or more lines are too long
+14 -11
View File
@@ -2873,6 +2873,10 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
r, g, b = unpack (_detalhes.class_colors [self.classe])
end
--> habilidades
local icon_size = _detalhes.tooltip.icon_size
local icon_border = _detalhes.tooltip.icon_border_texcoord
do
--> TOP HABILIDADES
@@ -2945,9 +2949,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
end
--> habilidades
local icon_size = _detalhes.tooltip.icon_size
local icon_border = _detalhes.tooltip.icon_border_texcoord
local topAbility = ActorSkillsSortTable [1] and ActorSkillsSortTable [1][2] or 0
if (#ActorSkillsSortTable > 0) then
for i = 1, _math_min (tooltip_max_abilities, #ActorSkillsSortTable) do
@@ -2971,13 +2973,14 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
end
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
_detalhes:AddTooltipBackgroundStatusbar (false, totalDamage/topAbility*100)
end
else
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
end
--> MOSTRA INIMIGOS
local topEnemy = ActorTargetsSortTable [1] and ActorTargetsSortTable [1][2] or 0
if (instancia.sub_atributo == 1 or instancia.sub_atributo == 6) then
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_TARGETS"], headerColor, #ActorTargetsSortTable, [[Interface\Addons\Details\images\icons]], 0, 0.03125, 0.126953125, 0.15625)
@@ -3001,11 +3004,8 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
for i = 1, _math_min (max_targets, #ActorTargetsSortTable) do
local este_inimigo = ActorTargetsSortTable [i]
GameCooltip:AddLine (este_inimigo[1]..": ", FormatTooltipNumber (_, este_inimigo[2]) .." (".._cstr("%.1f", este_inimigo[2]/ActorDamageWithPet*100).."%)")
--GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\espadas", nil, nil, 14, 14)
--GameCooltip:AddIcon ([[Interface\CHARACTERFRAME\UI-StateIcon]], nil, nil, 14, 14, 33/64, 61/64, 31/64, 60/64)
--GameCooltip:AddIcon ([[Interface\FriendsFrame\StatusIcon-Offline]], nil, nil, 14, 14, 0, 1, 0, 15/16)
GameCooltip:AddIcon ([[Interface\PetBattles\PetBattle-StatIcons]], nil, nil, 12, 12, 0, 0.5, 0, 0.5, {.7, .7, .7, 1}, nil, true)
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\PetBattles\PetBattle-StatIcons]], nil, nil, icon_size.W, icon_size.H, 0, 0.5, 0, 0.5, {.7, .7, .7, 1}, nil, true)
_detalhes:AddTooltipBackgroundStatusbar (false, este_inimigo[2] / topEnemy * 100)
end
end
end
@@ -3072,6 +3072,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
ismaximized = true
end
local topPet = totais [1] and totais [1][2] or 0
for index, _table in _ipairs (totais) do
if (_table [2] > 0 and (index <= _detalhes.tooltip.tooltip_max_pets or ismaximized)) then
@@ -3097,8 +3098,10 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
else
GameCooltip:AddLine (n, FormatTooltipNumber (_, _math_floor (_table [3])) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
end
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 14, 14, 0.25, 0.49609375, 0.75, 1)
_detalhes:AddTooltipBackgroundStatusbar (false, _table [2] / topPet * 100)
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, icon_size.W, icon_size.H, 0.25, 0.49609375, 0.75, 1)
end
end
+39 -8
View File
@@ -1253,12 +1253,27 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
local ActorTotal = self [actor_key]
--add actor spells
for _spellid, _skill in _pairs (ActorSkillsContainer) do
local SkillName, _, SkillIcon = _GetSpellInfo (_spellid)
if (_skill [skill_key] > 0) then
_table_insert (ActorHealingTable, {_spellid, _skill [skill_key], _skill [skill_key]/ActorTotal*100, {SkillName, nil, SkillIcon}, _skill [skill_key]/meu_tempo, _skill.total})
end
end
--add actor pets
for petIndex, petName in _ipairs (self:Pets()) do
local petActor = instancia.showing[class_type]:PegarCombatente (nil, petName)
if (petActor) then
for _spellid, _skill in _pairs (petActor:GetActorSpells()) do
if (_skill [skill_key] > 0) then
local SkillName, _, SkillIcon = _GetSpellInfo (_spellid)
ActorHealingTable [#ActorHealingTable+1] = {_spellid, _skill [skill_key], _skill [skill_key]/ActorTotal*100, {SkillName, nil, SkillIcon}, _skill [skill_key]/meu_tempo, _skill.total, petName:gsub ((" <.*"), "")}
end
end
end
end
_table_sort (ActorHealingTable, _detalhes.Sort2)
--> TOP Curados
@@ -1295,21 +1310,36 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
local icon_size = _detalhes.tooltip.icon_size
local icon_border = _detalhes.tooltip.icon_border_texcoord
local topAbility = ActorHealingTable [1] and ActorHealingTable [1][2] or 0
for i = 1, _math_min (tooltip_max_abilities, #ActorHealingTable) do
if (ActorHealingTable[i][2] < 1) then
break
end
local spellName = ActorHealingTable[i][4][1]
local petName = ActorHealingTable[i][7]
if (petName) then
spellName = spellName .. " (|cFFCCBBBB" .. petName .. "|r)"
end
if (instancia.sub_atributo == 2) then --> hps
GameCooltip:AddLine (ActorHealingTable[i][4][1]..": ", FormatTooltipNumber (_, _math_floor (ActorHealingTable[i][5])).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
GameCooltip:AddLine (spellName ..": ", FormatTooltipNumber (_, _math_floor (ActorHealingTable[i][5])).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
elseif (instancia.sub_atributo == 3) then --> overheal
local overheal = ActorHealingTable[i][2]
local total = ActorHealingTable[i][6]
GameCooltip:AddLine (ActorHealingTable[i][4][1] .." (|cFFFF3333" .. _math_floor ( (overheal / (overheal+total)) *100) .. "%|r):", FormatTooltipNumber (_, _math_floor (ActorHealingTable[i][2])).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
GameCooltip:AddLine (spellName .." (|cFFFF3333" .. _math_floor ( (overheal / (overheal+total)) *100) .. "%|r):", FormatTooltipNumber (_, _math_floor (ActorHealingTable[i][2])).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
else
GameCooltip:AddLine (ActorHealingTable[i][4][1]..": ", FormatTooltipNumber (_, ActorHealingTable[i][2]).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
GameCooltip:AddLine (spellName ..": ", FormatTooltipNumber (_, ActorHealingTable[i][2]).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
end
GameCooltip:AddIcon (ActorHealingTable[i][4][3], nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
_detalhes:AddTooltipBackgroundStatusbar (false, ActorHealingTable[i][2] / topAbility * 100)
end
if (instancia.sub_atributo == 6) then
@@ -1321,6 +1351,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
end
local container = instancia.showing [2]
local topTarget = ActorHealingTargets [1] and ActorHealingTargets [1][2] or 0
if (instancia.sub_atributo == 1) then -- 1 or 2 -> healing done or hps
@@ -1351,7 +1382,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
GameCooltip:AddStatusBar (100, 1, .5, .5, .5, .7)
else
GameCooltip:AddLine (ActorHealingTargets[i][1]..": ", FormatTooltipNumber (_, ActorHealingTargets[i][2]) .." (".._cstr ("%.1f", ActorHealingTargets[i][3]).."%)")
_detalhes:AddTooltipBackgroundStatusbar()
_detalhes:AddTooltipBackgroundStatusbar (false, ActorHealingTargets[i][2] / topTarget * 100)
end
local targetActor = container:PegarCombatente (nil, ActorHealingTargets[i][1])
@@ -1362,9 +1393,9 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
classe = "UNKNOW"
end
if (classe == "UNKNOW") then
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1)
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, icon_size.W, icon_size.H, .25, .5, 0, 1)
else
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe]))
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, icon_size.W, icon_size.H, _unpack (_detalhes.class_coords [classe]))
end
end
end
@@ -1442,7 +1473,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
GameCooltip:AddLine (n, FormatTooltipNumber (_, _table [2]) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
end
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 14, 14, 0.25, 0.49609375, 0.75, 1)
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, icon_size.W, icon_size.H, 0.25, 0.49609375, 0.75, 1)
end
end
+21 -10
View File
@@ -1497,11 +1497,19 @@
GameCooltip:AddStatusBar (100, 1, 0, 0, 0, 0.8)
end
function _detalhes:AddTooltipBackgroundStatusbar (side)
function _detalhes:AddTooltipBackgroundStatusbar (side, value, useSpark)
_detalhes.tooltip.background [4] = 0.8
_detalhes.tooltip.icon_size.W = 16
_detalhes.tooltip.icon_size.H = 16
value = value or 100
if (not side) then
GameCooltip:AddStatusBar (100, 1, unpack (_detalhes.tooltip.background))
local r, g, b, a = unpack (_detalhes.tooltip.background)
GameCooltip:AddStatusBar (value, 1, r, g, b, a, useSpark, {value = 100, color = {.21, .21, .21, 0.8}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
else
GameCooltip:AddStatusBar (100, 2, unpack (_detalhes.tooltip.background))
GameCooltip:AddStatusBar (value, 2, unpack (_detalhes.tooltip.background))
end
end
@@ -1524,13 +1532,16 @@
end
end
local bgColor, borderColor = {0.37, 0.37, 0.37, .75}, {.30, .30, .30, .3}
local bgColor, borderColor = {0, 0, 0, 0.8}, {0, 0, 0, 0} --{0.37, 0.37, 0.37, .75}, {.30, .30, .30, .3}
function _detalhes:BuildInstanceBarTooltip (frame)
local GameCooltip = GameCooltip
GameCooltip:Reset()
GameCooltip:SetType ("tooltip")
GameCooltip:SetOption ("MinWidth", _math_max (230, self.baseframe:GetWidth()*0.98))
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar_background]])
GameCooltip:SetOption ("TextSize", _detalhes.tooltip.fontsize)
GameCooltip:SetOption ("TextFont", _detalhes.tooltip.fontface)
@@ -1540,14 +1551,13 @@
GameCooltip:SetOption ("LeftBorderSize", -4)
GameCooltip:SetOption ("RightBorderSize", 4)
GameCooltip:SetOption ("ButtonsYMod", 4)
GameCooltip:SetOption ("RightTextMargin", 0)
GameCooltip:SetOption ("MinWidth", _math_max (230, self.baseframe:GetWidth()*0.9))
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar_background]])
GameCooltip:SetOption ("VerticalOffset", 8)
GameCooltip:SetOption ("AlignAsBlizzTooltip", true)
GameCooltip:SetOption ("AlignAsBlizzTooltipFrameHeightOffset", -8)
GameCooltip:SetOption ("LineHeightSizeOffset", 4)
GameCooltip:SetOption ("VerticalPadding", -4)
--GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color) --{.090, .090, .188, .1}
GameCooltip:SetBackdrop (1, _detalhes.cooltip_preset2_backdrop, bgColor, borderColor)
local myPoint = _detalhes.tooltip.anchor_point
@@ -1556,6 +1566,7 @@
local y_Offset = _detalhes.tooltip.anchor_offset[2]
if (_detalhes.tooltip.anchored_to == 1) then
GameCooltip:SetHost (frame, myPoint, anchorPoint, x_Offset, y_Offset)
else
GameCooltip:SetHost (DetailsTooltipAnchor, myPoint, anchorPoint, x_Offset, y_Offset)
+3 -1
View File
@@ -1448,7 +1448,9 @@ function _detalhes:StoreEncounter (combat)
local name, type, difficulty, difficultyName, maxPlayers, playerDifficulty, isDynamicInstance, mapID, instanceGroupSize = GetInstanceInfo()
if (not store_instances [mapID]) then
local bossCLEUID = combat.boss_info and combat.boss_info.id
if (not store_instances [mapID] and not _detalhes.EncountersToStoreData [bossCLEUID]) then
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: instance not allowed.")
end
+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
+4 -1
View File
@@ -3647,7 +3647,7 @@
header = {
{name = L["STRING_FORGE_HEADER_INDEX"], width = 40, type = "text", func = no_func},
{name = "NpcID", width = 100, type = "entry", func = no_func},
{name = "Npc Name", width = 200, type = "entry", func = no_func},
{name = "Npc Name", width = 400, type = "entry", func = no_func},
},
fill_panel = false,
@@ -4551,6 +4551,9 @@ function _detalhes.OpenDetailsDeathRecap (segment, RecapID)
end
--> remove the dot signal from the spell name
if (not spellName) then
spellName = "*?*"
end
spellName = spellName:gsub (L["STRING_DOT"], "")
line.sourceName:SetText (spellName .. " (" .. "|cFFC6B0D9" .. source .. "|r" .. ")")
+4
View File
@@ -926,6 +926,10 @@ local default_profile = {
scale = 1,
},
options_window = {
scale = 1,
},
--> segments
segments_amount = 18,
segments_amount_to_save = 18,
+44 -22
View File
@@ -386,28 +386,6 @@ function SlashCmdList.DETAILS (msg, editbox)
DEFAULT_CHAT_FRAME:AddMessage(msg, 1,0.7,0.5)
end
elseif (msg == "ej") then
function PrintAllEncounterSections(encounterID, difficultyID)
EJ_SetDifficulty(difficultyID)
local stack, encounter, _, _, curSectionID = {}, EJ_GetEncounterInfo(encounterID)
print(stack, encounter, _, _, curSectionID)
repeat
local title, desc, depth, icon, model, siblingID, nextSectionID, filteredByDifficulty, link, _, f1, f2, f3, f4 = EJ_GetSectionInfo(curSectionID)
if not filteredByDifficulty then
--print((" "):rep(depth) .. link .. ": " .. desc)
--npcs nao tem icone e possuel modelo diferente de zero.
--spells tem icone e possuel modelo = zero
print (title, icon, model, siblingID)
end
table.insert(stack, siblingID)
table.insert(stack, nextSectionID)
curSectionID = table.remove(stack)
until not curSectionID
end
-- Print everything in 25-man Normal Madness of Deathwing:
PrintAllEncounterSections (869, 4)
elseif (msg == "time") then
print ("GetTime()", GetTime())
print ("time()", time())
@@ -1323,6 +1301,9 @@ Damage Update Status: @INSTANCEDAMAGESTATUS
instance:InstanceAlert ("Boss Defeated! Show Ranking", icon, 10, func, true)
elseif (msg == "scroll" or msg == "scrolldamage" or msg == "scrolling") then
Details:ScrollDamage()
elseif (msg == "spec") then
local spec = GetSpecialization()
@@ -1437,6 +1418,47 @@ Damage Update Status: @INSTANCEDAMAGESTATUS
_detalhes:InstanciaCallFunction (_detalhes.ResetaGump)
_detalhes:AtualizaGumpPrincipal (-1, true)
elseif (msg == "ej") then
local result = {}
local spellIDs = {}
--uldir
EJ_SelectInstance (1031)
-- pega o root section id do boss
local name, description, encounterID, rootSectionID, link = EJ_GetEncounterInfo (2168) --taloc (primeiro boss de Uldir)
--overview
local sectionInfo = C_EncounterJournal.GetSectionInfo (rootSectionID)
local nextID = {sectionInfo.siblingSectionID}
while (nextID [1]) do
--> get the deepest section in the hierarchy
local ID = tremove (nextID)
local sectionInfo = C_EncounterJournal.GetSectionInfo (ID)
if (sectionInfo) then
tinsert (result, sectionInfo)
if (sectionInfo.spellID and type (sectionInfo.spellID) == "number" and sectionInfo.spellID ~= 0) then
tinsert (spellIDs, sectionInfo.spellID)
end
local nextChild, nextSibling = sectionInfo.firstChildSectionID, sectionInfo.siblingSectionID
if (nextSibling) then
tinsert (nextID, nextSibling)
end
if (nextChild) then
tinsert (nextID, nextChild)
end
else
break
end
end
Details:DumpTable (result)
elseif (msg == "record") then
+3
View File
@@ -188,6 +188,9 @@ function _detalhes:OpenOptionsWindow (instance, no_reopen, section)
window.using_skin = 1
local scaleBar = Details.gump:CreateScaleBar (DetailsOptionsWindow, Details.options_window)
DetailsOptionsWindow:SetScale (Details.options_window.scale)
DetailsOptionsWindow.instance = instance
DetailsOptionsWindow.loading_settings = true
+5 -2
View File
@@ -2160,7 +2160,7 @@ local icon_frame_on_enter = function (self)
end
elseif (actor.dead_at) then
elseif (actor.name) then --ensure it's an actor table
@@ -2289,7 +2289,10 @@ local icon_frame_on_enter = function (self)
end
local icon_frame_on_leave = function (self)
GameCooltip:Hide()
--GameTooltip:Hide()
if (GameTooltip and GameTooltip:IsShown()) then
GameTooltip:Hide()
end
if (self.row.icone_classe:GetTexture() ~= "") then
--self.row.icone_classe:SetSize (self.row.icone_classe:GetWidth()-1, self.row.icone_classe:GetWidth()-1)
+7 -1
View File
@@ -156,6 +156,10 @@ do
all_switch.wallpaper:SetPoint ("bottomright", all_switch, "bottomright", -4, 4)
all_switch.buttons = {}
all_switch.ShowAnimation = _detalhes.gump:CreateAnimationHub (all_switch, function() all_switch:Show() end)
_detalhes.gump:CreateAnimation (all_switch.ShowAnimation, "scale", 1, 0.04, 1, 0, 1, 1, "BOTTOM", 0, 0)
_detalhes.gump:CreateAnimation (all_switch.ShowAnimation, "alpha", 1, 0.04, 0, 1)
all_switch:SetScript ("OnMouseDown", function (self, button)
if (button == "RightButton") then
self:Hide()
@@ -232,7 +236,9 @@ do
GameCooltip:Hide()
all_switch:ClearAllPoints()
all_switch:SetPoint ("bottom", self.baseframe.UPFrame, "top", 4)
all_switch:Show()
all_switch.ShowAnimation:Play()
--all_switch:Show()
if (_detalhes.switch.frame:IsShown()) then
_detalhes.switch:CloseMe()
+1 -14
View File
@@ -1851,20 +1851,7 @@ function _G._detalhes:Start()
--> override the overall data flag on this release only (remove on the release)
Details.overall_flag = 0x10
--[=[
--> suppress warnings for the first few seconds
CLOSE_SCRIPTERRORWINDOW = function()
if (ScriptErrorsFrame) then
ScriptErrorsFrame:Hide()
end
end
if (ScriptErrorsFrame) then
ScriptErrorsFrame:HookScript ("OnShow", CLOSE_SCRIPTERRORWINDOW)
ScriptErrorsFrame:Hide()
end
C_Timer.After (5, function() _G ["CLOSE_SCRIPTERRORWINDOW"] = nil end)
--]=]
end
_detalhes.AddOnLoadFilesTime = GetTime()