From 0d7dc207465a93fd58f08abe3bec90f63149ecdd Mon Sep 17 00:00:00 2001 From: Tercio Date: Fri, 5 Jun 2015 17:45:28 -0300 Subject: [PATCH] more updates. --- boot.lua | 11 +- classes/classe_custom.lua | 339 +++++++++++++++++++++---------------- framework/cooltip.lua | 2 +- functions/profiles.lua | 6 +- gumps/janela_principal.lua | 2 + startup.lua | 18 ++ 6 files changed, 218 insertions(+), 160 deletions(-) diff --git a/boot.lua b/boot.lua index 726915f6..f35cca57 100644 --- a/boot.lua +++ b/boot.lua @@ -4,11 +4,11 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") _detalhes.build_counter = 996 --it's 996 for release - _detalhes.userversion = "v3.15.2" - _detalhes.realversion = 69 --core version + _detalhes.userversion = "v3.15.3" + _detalhes.realversion = 70 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes - + ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> initialization stuff @@ -21,7 +21,8 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v3.15.2 (|cFFFFCC00Jun 03, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00v3.15.3 (|cFFFFCC00Jun 05, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Custom display 'My Spells' now also show amount of casts and uptime.\n\n |cFFFFFF00-|r Added an extra tooltip for the class icon at the player's bar.\n\n |cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n |cFFFFFF00-|r Effective time will automatically be used when inside a battleground and using sync from the score board.\n\n @@ -36,7 +37,7 @@ do -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.15.2 (|cFFFFCC00Jun 03, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an extra tooltip for the class icon at the player's bar.\n\n|cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n|cFFFFFF00-|r Effective time will automatically be used when inside a battleground and using sync from the score board.\n\n|cFFFFFF00-|r Added 'hide all' option on the minimap menu.\n\n|cFFFFFF00-|r Added support for battlegrounds.\n\n|cFFFFFF00-|r Added option for disable showing battleground enemies when the window is in group mode.\n\n|cFFFFFF00-|r Added option to disable the sync from battleground score board.\n\n|cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n|cFFFFFF00v3.14.4 (|cFFFFCC00May 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r TimeLine (plugin): now also shows marks symbolizing the player death.\n\n|cFFFFFF00-|r Added raid history panel. Open it through bookmark or /details history.\n\n|cFFFFFF00-|r Added support for skins for Player Detail Window.\n\n|cFFFFFF00-|r Added report history on report button.\n\n|cFFFFFF00-|r Added key bindings settings for report what is shown on window #1 or #2.\n\n|cFFFFFF00v3.14.0b (|cFFFFCC00May 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Several texture changes for a smaller download size.\n\n|cFFFFFF00v3.13.4a (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created 'Details! Forge' but is still under development: /details forge.\n\n|cFFFFFF00-|r Several improvements on combatlog reader and custom displays.\n\n|cFFFFFF00-|r Improvements on enemies damage taken tooltip.\n\n|cFFFFFF00v3.13.1 (|cFFFFCC00April 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window and Comparison Panel.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel.\n\n|cFFFFFF00-|r Wallpaper for menus on title bar got a customization option under tooltips bracket on Options Panel.\n\n|cFFFFFF00-|r Updated spell list for Crowd Control and class detection.\n\n|cFFFFFF00-|r Improved Weakaura creation tool under Encounter Details Plugin.\n\n|cFFFFFF00v3.12.10 (|cFFFFCC00April 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the spell uptime on damage player detail window.\n\n|cFFFFFF00-|r Added Rune Tap as cooldown.\n\n|cFFFFFF00-|r Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.\n\n|cFFFFFF00-|r Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.\n\n|cFFFFFF00v3.12.7 (|cFFFFCC00April 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash command /details profile .\n\n|cFFFFFF00v3.12.6 (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): added a report button on Emotes tab.\n\n|cFFFFFF00-|r Encounter Details (plugin): improved Weakauras creation.\n\n|cFFFFFF00-|r Encounter Details (plugin): fixed the report text for interrupts and dispells.\n\n|cFFFFFF00-|r Crowd control by Pets now is merged with its owner.\n\n|cFFFFFF00-|r Truncated left text on bars now shows the entire text when hover over the bar.\n\n|cFFFFFF00-|r Added an extra option on minimap menu to disable the minimap icon.\n\n|cFFFFFF00-|r Fixed a problem when disabling the minimap icon through options panel.\n\n|cFFFFFF00-|r Fixed an issue with item level tracker feature.\n\n|cFFFFFF00v3.12.2 (|cFFFFCC00Mar 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Raid Check (plugin): added item level.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): bug fixes, it's important to update it.\n\n|cFFFFFF00-|r Time Line (plugin): bug fixes.\n\n|cFFFFFF00-|r Added option to disabled th eitem level tracker.\n\n|cFFFFFF00-|r Added item level on Raid Check plugin panel.\n\n|cFFFFFF00-|r Added Spirit Link Totem damage and healing on death log.\n\n|cFFFFFF00-|r Added the total of life exchanged by the Spirit Link Totem on player detail window.\n\n|cFFFFFF00-|r Added more spells for crowd control.\n\n|cFFFFFF00-|r Added scroll on bookmark panel.\n\n|cFFFFFF00-|r Fixed issue with Dps/Hps data broker which wasn't respecting the type of time (effective/activity) selected.\n\n|cFFFFFF00-|r Fixed few bugs when using the key bind to toggle windows.\n\n|cFFFFFF00v3.11.5 (|cFFFFCC00Mar 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data where max/min amount for spells was being calculated wrong.\n\n|cFFFFFF00-|r Fixed a problem while reporting enemy damage taken.\n\n|cFFFFFF00-|r Fixed an issue with damage taken by spell where some spells wasn't shown.\n\n|cFFFFFF00-|r Few improvements on tooltips.\n\n|cFFFFFF00-|r Fixed a accuracy problem with shaman's spirit link toten where its life exchange was considered healing done.\n\n|cFFFFFF00-|r Boss segments now need to have at least 30 seconds to be added on the overall data.\n\n|cFFFFFF00-|r When the segment limit is reach, segments with less combat time will be erased instead of the olders.\n\n|cFFFFFF00-|r Added item level tracker.\n\n|cFFFFFF00-|r Fixed window positioning when changing from Solo mode to Group mode.\n\n|cFFFFFF00-|r Added an option for change the amount of lines on death log.\n\n|cFFFFFF00-|r Added custom display for CC done.\n\n|cFFFFFF00v3.10.10 (|cFFFFCC00Mar 10, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): done a calibration on endurance calculation.\n\n|cFFFFFF00-|r Raid Check (plugin): now also show information for 50+ stats runes.\n\n|cFFFFFF00-|r Fixed cooldowns spell targets on overall data.\n\n|cFFFFFF00-|r Fixed report custom displays where sometimes it didn't report spell links.\n\n|cFFFFFF00-|r Replaced old report line saying 'for the last X segments' with 'overall data'.\n\n|cFFFFFF00-|r Mini-displays on statusbar are now more responsible to right button click.\n\n|cFFFFFF00-|r Added Mage's Greater Invisibility as cooldown.\n\n|cFFFFFF00v3.10.8 (|cFFFFCC00Mar 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improved aura creation.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show your pets.\n\n|cFFFFFF00-|r Fixed 'Raid Check' plugin food detection.\n\n|cFFFFFF00v3.10.6 (|cFFFFCC00Feb 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): several bug fixes and improvements.\n\n|cFFFFFF00-|r Encounter Details (plugin): added new tab showing enemy spells from the encounter with an aura creation panel.\n\n|cFFFFFF00-|r Encounter Details (plugin): added phase indicators on graphic tab, hovering over shows the damage and heal for that specific phase.\n\n|cFFFFFF00-|r Segments menu now also show the encounter try number plus the elapsed combat time.\n\n|cFFFFFF00-|r Several improvements on Overall Data, also, now it has an option to not save it when the character logoff.\n\n|cFFFFFF00-|r Player Details window now closes with right click on any bar." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.15.3 (|cFFFFCC00Jun 05, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show amount of casts and uptime.\n\n|cFFFFFF00-|r Added an extra tooltip for the class icon at the player's bar.\n\n|cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n|cFFFFFF00-|r Effective time will automatically be used when inside a battleground and using sync from the score board.\n\n|cFFFFFF00-|r Added 'hide all' option on the minimap menu.\n\n|cFFFFFF00-|r Added support for battlegrounds.\n\n|cFFFFFF00-|r Added option for disable showing battleground enemies when the window is in group mode.\n\n|cFFFFFF00-|r Added option to disable the sync from battleground score board.\n\n|cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n|cFFFFFF00v3.14.4 (|cFFFFCC00May 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r TimeLine (plugin): now also shows marks symbolizing the player death.\n\n|cFFFFFF00-|r Added raid history panel. Open it through bookmark or /details history.\n\n|cFFFFFF00-|r Added support for skins for Player Detail Window.\n\n|cFFFFFF00-|r Added report history on report button.\n\n|cFFFFFF00-|r Added key bindings settings for report what is shown on window #1 or #2.\n\n|cFFFFFF00v3.14.0b (|cFFFFCC00May 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Several texture changes for a smaller download size.\n\n|cFFFFFF00v3.13.4a (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created 'Details! Forge' but is still under development: /details forge.\n\n|cFFFFFF00-|r Several improvements on combatlog reader and custom displays.\n\n|cFFFFFF00-|r Improvements on enemies damage taken tooltip.\n\n|cFFFFFF00v3.13.1 (|cFFFFCC00April 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window and Comparison Panel.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel.\n\n|cFFFFFF00-|r Wallpaper for menus on title bar got a customization option under tooltips bracket on Options Panel.\n\n|cFFFFFF00-|r Updated spell list for Crowd Control and class detection.\n\n|cFFFFFF00-|r Improved Weakaura creation tool under Encounter Details Plugin.\n\n|cFFFFFF00v3.12.10 (|cFFFFCC00April 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the spell uptime on damage player detail window.\n\n|cFFFFFF00-|r Added Rune Tap as cooldown.\n\n|cFFFFFF00-|r Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.\n\n|cFFFFFF00-|r Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.\n\n|cFFFFFF00v3.12.7 (|cFFFFCC00April 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash command /details profile .\n\n|cFFFFFF00v3.12.6 (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): added a report button on Emotes tab.\n\n|cFFFFFF00-|r Encounter Details (plugin): improved Weakauras creation.\n\n|cFFFFFF00-|r Encounter Details (plugin): fixed the report text for interrupts and dispells.\n\n|cFFFFFF00-|r Crowd control by Pets now is merged with its owner.\n\n|cFFFFFF00-|r Truncated left text on bars now shows the entire text when hover over the bar.\n\n|cFFFFFF00-|r Added an extra option on minimap menu to disable the minimap icon.\n\n|cFFFFFF00-|r Fixed a problem when disabling the minimap icon through options panel.\n\n|cFFFFFF00-|r Fixed an issue with item level tracker feature.\n\n|cFFFFFF00v3.12.2 (|cFFFFCC00Mar 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Raid Check (plugin): added item level.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): bug fixes, it's important to update it.\n\n|cFFFFFF00-|r Time Line (plugin): bug fixes.\n\n|cFFFFFF00-|r Added option to disabled th eitem level tracker.\n\n|cFFFFFF00-|r Added item level on Raid Check plugin panel.\n\n|cFFFFFF00-|r Added Spirit Link Totem damage and healing on death log.\n\n|cFFFFFF00-|r Added the total of life exchanged by the Spirit Link Totem on player detail window.\n\n|cFFFFFF00-|r Added more spells for crowd control.\n\n|cFFFFFF00-|r Added scroll on bookmark panel.\n\n|cFFFFFF00-|r Fixed issue with Dps/Hps data broker which wasn't respecting the type of time (effective/activity) selected.\n\n|cFFFFFF00-|r Fixed few bugs when using the key bind to toggle windows.\n\n|cFFFFFF00v3.11.5 (|cFFFFCC00Mar 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data where max/min amount for spells was being calculated wrong.\n\n|cFFFFFF00-|r Fixed a problem while reporting enemy damage taken.\n\n|cFFFFFF00-|r Fixed an issue with damage taken by spell where some spells wasn't shown.\n\n|cFFFFFF00-|r Few improvements on tooltips.\n\n|cFFFFFF00-|r Fixed a accuracy problem with shaman's spirit link toten where its life exchange was considered healing done.\n\n|cFFFFFF00-|r Boss segments now need to have at least 30 seconds to be added on the overall data.\n\n|cFFFFFF00-|r When the segment limit is reach, segments with less combat time will be erased instead of the olders.\n\n|cFFFFFF00-|r Added item level tracker.\n\n|cFFFFFF00-|r Fixed window positioning when changing from Solo mode to Group mode.\n\n|cFFFFFF00-|r Added an option for change the amount of lines on death log.\n\n|cFFFFFF00-|r Added custom display for CC done.\n\n|cFFFFFF00v3.10.10 (|cFFFFCC00Mar 10, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): done a calibration on endurance calculation.\n\n|cFFFFFF00-|r Raid Check (plugin): now also show information for 50+ stats runes.\n\n|cFFFFFF00-|r Fixed cooldowns spell targets on overall data.\n\n|cFFFFFF00-|r Fixed report custom displays where sometimes it didn't report spell links.\n\n|cFFFFFF00-|r Replaced old report line saying 'for the last X segments' with 'overall data'.\n\n|cFFFFFF00-|r Mini-displays on statusbar are now more responsible to right button click.\n\n|cFFFFFF00-|r Added Mage's Greater Invisibility as cooldown.\n\n|cFFFFFF00v3.10.8 (|cFFFFCC00Mar 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improved aura creation.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show your pets.\n\n|cFFFFFF00-|r Fixed 'Raid Check' plugin food detection." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_custom.lua b/classes/classe_custom.lua index 12cea810..8df7f815 100644 --- a/classes/classe_custom.lua +++ b/classes/classe_custom.lua @@ -927,7 +927,8 @@ GameCooltip:AddIcon (custom_object:GetIcon(), 1, 1, 14, 14, 0.90625, 0.109375, 0.15625, 0.875) end - GameCooltip:AddStatusBar (100, 1, r, g, b, 1) + --GameCooltip:AddStatusBar (100, 1, r, g, b, 1) + _detalhes:AddTooltipHeaderStatusbar (1, 1, 1, 0.6) if (custom_object:IsScripted()) then if (custom_object.tooltip) then @@ -1565,7 +1566,7 @@ desc = Loc ["STRING_CUSTOM_DTBS_DESC"], source = false, target = false, - script_version = 29, + script_version = 30, on_shift_click = [[ local row, object, instance = ... local spellname, _, spellicon = _detalhes.GetSpellInfo (object.id) @@ -1832,7 +1833,12 @@ GameCooltip:SetOption ("StatusBarTexture", "Interface\\AddOns\\Details\\images\\bar_serenity") --local bar_background = {value = 100, color = {0.1, 0.1, 0.1, 0.9}, texture = "Interface\\AddOns\\Details\\images\\bar_background"} - local bar_background = {value = 100, color = {0.1, 0.1, 0.15, 1}, texture = "Interface\\AddOns\\Details\\images\\bar_background2"} + local bar_background = DETAILS_DTBS_BACKGROUND + if (not bar_background) then + local color = {0.1960, 0.1960, 0.1960, 0.9097} + DETAILS_DTBS_BACKGROUND = {value = 100, color = color, texture = "Interface\\AddOns\\Details\\images\\bar_background2"} + bar_background = DETAILS_DTBS_BACKGROUND + end for index, t in ipairs (Targets) do GameCooltip:AddLine (_detalhes:GetOnlyName(t[1]), _detalhes:ToK (t[2])) @@ -1855,8 +1861,9 @@ GameCooltip:AddLine (" ") GameCooltip:AddLine ("|cFFffa200Click|r: Report Results", aura, 1, "white", "white") - GameCooltip:AddStatusBar (100, 1, 0, 0, 0, 0.7, false, bar_background) -]], + GameCooltip:AddStatusBar (100, 1, 0, 0, 0, 0.2, false, bar_background) + GameCooltip:SetOption ("YSpacingMod", -1) + ]], } local have = false @@ -1999,7 +2006,7 @@ desc = Loc ["STRING_CUSTOM_MYSPELLS_DESC"], source = false, target = false, - script_version = 4, + script_version = 5, script = [[ --get the parameters passed local combat, instance_container, instance = ... @@ -2054,155 +2061,187 @@ ]], tooltip = [[ - --config: - --Background RBG and Alpha: - local R, G, B, A = 0, 0, 0, 0.75 + --config: + --Background RBG and Alpha: + local R, G, B, A = 0, 0, 0, 0.75 + local R, G, B, A = 0.1960, 0.1960, 0.1960, 0.8697 - --get the parameters passed - local spell, combat, instance = ... + --get the parameters passed + local spell, combat, instance = ... - --get the cooltip object (we dont use the convencional GameTooltip here) - local GC = GameCooltip - GC:SetOption ("YSpacingMod", 1) + --get the cooltip object (we dont use the convencional GameTooltip here) + local GC = GameCooltip + GC:SetOption ("YSpacingMod", 0) - local role = UnitGroupRolesAssigned ("player") + local role = UnitGroupRolesAssigned ("player") - if (spell.n_dmg) then - - local spellschool, schooltext = spell.spellschool, "" - if (spellschool) then - local t = _detalhes.spells_school [spellschool] - if (t and t.name) then - schooltext = t.formated - end - end - - local total_hits = spell.counter - local combat_time = instance.showing:GetCombatTime() - - --Cooltip code - GC:AddLine ("Hits:", spell.counter) - GC:AddStatusBar (100, 1, R, G, B, A) - - local average = spell.total / total_hits - GC:AddLine ("Average:", _detalhes:ToK (average)) - GC:AddStatusBar (100, 1, R, G, B, A) - - GC:AddLine ("E-Dps:", _detalhes:ToK (spell.total / combat_time)) - GC:AddStatusBar (100, 1, R, G, B, A) - - GC:AddLine ("School:", schooltext) - GC:AddStatusBar (100, 1, R, G, B, A) - - --GC:AddLine (" ") - - GC:AddLine ("Normal Hits: ", spell.n_amt .. " (" ..floor ( spell.n_amt/total_hits*100) .. "%)") - GC:AddStatusBar (100, 1, R, G, B, A) - - local n_average = spell.n_dmg / spell.n_amt - local T = (combat_time*spell.n_dmg)/spell.total - local P = average/n_average*100 - T = P*T/100 - - GC:AddLine ("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format ("%.1f",spell.n_dmg / T )) - GC:AddStatusBar (100, 1, R, G, B, A) - - --GC:AddLine (" ") - - GC:AddLine ("Critical Hits: ", spell.c_amt .. " (" ..floor ( spell.c_amt/total_hits*100) .. "%)") - GC:AddStatusBar (100, 1, R, G, B, A) - - if (spell.c_amt > 0) then - local c_average = spell.c_dmg/spell.c_amt - local T = (combat_time*spell.c_dmg)/spell.total - local P = average/c_average*100 - T = P*T/100 - local crit_dps = spell.c_dmg / T - - GC:AddLine ("Average / E-Dps: ", _detalhes:ToK (c_average) .. " / " .. _detalhes:comma_value (crit_dps)) - else - GC:AddLine ("Average / E-Dps: ", "0 / 0") - end - - GC:AddStatusBar (100, 1, R, G, B, A) - - --GC:AddLine (" ") - - GC:AddLine ("Multistrike: ", spell.m_amt .. " (" ..floor ( spell.m_amt/total_hits*100) .. "%)") - GC:AddStatusBar (100, 1, R, G, B, A) - - GC:AddLine ("On Normal / On Critical:", spell.m_amt - spell.m_crit .. " / " .. spell.m_crit) - GC:AddStatusBar (100, 1, R, G, B, A) - - elseif (spell.n_curado) then - - local spellschool, schooltext = spell.spellschool, "" - if (spellschool) then - local t = _detalhes.spells_school [spellschool] - if (t and t.name) then - schooltext = t.formated - end - end - - local total_hits = spell.counter - local combat_time = instance.showing:GetCombatTime() - - --Cooltip code - GC:AddLine ("Hits:", spell.counter) - GC:AddStatusBar (100, 1, R, G, B, A) - - local average = spell.total / total_hits - GC:AddLine ("Average:", _detalhes:ToK (average)) - GC:AddStatusBar (100, 1, R, G, B, A) - - GC:AddLine ("E-Hps:", _detalhes:ToK (spell.total / combat_time)) - GC:AddStatusBar (100, 1, R, G, B, A) - - GC:AddLine ("School:", schooltext) - GC:AddStatusBar (100, 1, R, G, B, A) - - --GC:AddLine (" ") - - GC:AddLine ("Normal Hits: ", spell.n_amt .. " (" ..floor ( spell.n_amt/total_hits*100) .. "%)") - GC:AddStatusBar (100, 1, R, G, B, A) - - local n_average = spell.n_curado / spell.n_amt - local T = (combat_time*spell.n_curado)/spell.total - local P = average/n_average*100 - T = P*T/100 - - GC:AddLine ("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format ("%.1f",spell.n_curado / T )) - GC:AddStatusBar (100, 1, R, G, B, A) - - --GC:AddLine (" ") - - GC:AddLine ("Critical Hits: ", spell.c_amt .. " (" ..floor ( spell.c_amt/total_hits*100) .. "%)") - GC:AddStatusBar (100, 1, R, G, B, A) - - if (spell.c_amt > 0) then - local c_average = spell.c_curado/spell.c_amt - local T = (combat_time*spell.c_curado)/spell.total - local P = average/c_average*100 - T = P*T/100 - local crit_dps = spell.c_curado / T - - GC:AddLine ("Average / E-Hps: ", _detalhes:ToK (c_average) .. " / " .. _detalhes:comma_value (crit_dps)) - else - GC:AddLine ("Average / E-Hps: ", "0 / 0") - end - - GC:AddStatusBar (100, 1, R, G, B, A) - - --GC:AddLine (" ") - - GC:AddLine ("Multistrike: ", spell.m_amt .. " (" ..floor ( spell.m_amt/total_hits*100) .. "%)") - GC:AddStatusBar (100, 1, R, G, B, A) - - GC:AddLine ("On Normal / On Critical:", spell.m_amt - spell.m_crit .. " / " .. spell.m_crit) - GC:AddStatusBar (100, 1, R, G, B, A) - - + if (spell.n_dmg) then + + local spellschool, schooltext = spell.spellschool, "" + if (spellschool) then + local t = _detalhes.spells_school [spellschool] + if (t and t.name) then + schooltext = t.formated end + end + + local total_hits = spell.counter + local combat_time = instance.showing:GetCombatTime() + + local debuff_uptime_total, cast_string = "", "" + local misc_actor = instance.showing (4, _detalhes.playername) + if (misc_actor) then + local debuff_uptime = misc_actor.debuff_uptime_spells and misc_actor.debuff_uptime_spells._ActorTable [spell.id] and misc_actor.debuff_uptime_spells._ActorTable [spell.id].uptime + if (debuff_uptime) then + debuff_uptime_total = floor (debuff_uptime / instance.showing:GetCombatTime() * 100) + end + + local spell_cast = misc_actor.spell_cast and misc_actor.spell_cast [spell.id] + + if (not spell_cast and misc_actor.spell_cast) then + local spellname = GetSpellInfo (spell.id) + for casted_spellid, amount in pairs (misc_actor.spell_cast) do + local casted_spellname = GetSpellInfo (casted_spellid) + if (casted_spellname == spellname) then + spell_cast = amount .. " (|cFFFFFF00?|r)" + end + end + end + if (not spell_cast) then + spell_cast = "(|cFFFFFF00?|r)" + end + cast_string = cast_string .. spell_cast + end + + --Cooltip code + GC:AddLine ("Casts:", cast_string or "?") + GC:AddStatusBar (100, 1, R, G, B, A) + + if (debuff_uptime_total ~= "") then + GC:AddLine ("Uptime:", (debuff_uptime_total or "?") .. "%") + GC:AddStatusBar (100, 1, R, G, B, A) + end + + GC:AddLine ("Hits:", spell.counter) + GC:AddStatusBar (100, 1, R, G, B, A) + + local average = spell.total / total_hits + GC:AddLine ("Average:", _detalhes:ToK (average)) + GC:AddStatusBar (100, 1, R, G, B, A) + + GC:AddLine ("E-Dps:", _detalhes:ToK (spell.total / combat_time)) + GC:AddStatusBar (100, 1, R, G, B, A) + + GC:AddLine ("School:", schooltext) + GC:AddStatusBar (100, 1, R, G, B, A) + + --GC:AddLine (" ") + + GC:AddLine ("Normal Hits: ", spell.n_amt .. " (" ..floor ( spell.n_amt/total_hits*100) .. "%)") + GC:AddStatusBar (100, 1, R, G, B, A) + + local n_average = spell.n_dmg / spell.n_amt + local T = (combat_time*spell.n_dmg)/spell.total + local P = average/n_average*100 + T = P*T/100 + + GC:AddLine ("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format ("%.1f",spell.n_dmg / T )) + GC:AddStatusBar (100, 1, R, G, B, A) + + --GC:AddLine (" ") + + GC:AddLine ("Critical Hits: ", spell.c_amt .. " (" ..floor ( spell.c_amt/total_hits*100) .. "%)") + GC:AddStatusBar (100, 1, R, G, B, A) + + if (spell.c_amt > 0) then + local c_average = spell.c_dmg/spell.c_amt + local T = (combat_time*spell.c_dmg)/spell.total + local P = average/c_average*100 + T = P*T/100 + local crit_dps = spell.c_dmg / T + + GC:AddLine ("Average / E-Dps: ", _detalhes:ToK (c_average) .. " / " .. _detalhes:comma_value (crit_dps)) + else + GC:AddLine ("Average / E-Dps: ", "0 / 0") + end + + GC:AddStatusBar (100, 1, R, G, B, A) + + --GC:AddLine (" ") + + GC:AddLine ("Multistrike: ", spell.m_amt .. " (" ..floor ( spell.m_amt/total_hits*100) .. "%)") + GC:AddStatusBar (100, 1, R, G, B, A) + + GC:AddLine ("On Normal / On Critical:", spell.m_amt - spell.m_crit .. " / " .. spell.m_crit) + GC:AddStatusBar (100, 1, R, G, B, A) + + elseif (spell.n_curado) then + + local spellschool, schooltext = spell.spellschool, "" + if (spellschool) then + local t = _detalhes.spells_school [spellschool] + if (t and t.name) then + schooltext = t.formated + end + end + + local total_hits = spell.counter + local combat_time = instance.showing:GetCombatTime() + + --Cooltip code + GC:AddLine ("Hits:", spell.counter) + GC:AddStatusBar (100, 1, R, G, B, A) + + local average = spell.total / total_hits + GC:AddLine ("Average:", _detalhes:ToK (average)) + GC:AddStatusBar (100, 1, R, G, B, A) + + GC:AddLine ("E-Hps:", _detalhes:ToK (spell.total / combat_time)) + GC:AddStatusBar (100, 1, R, G, B, A) + + GC:AddLine ("School:", schooltext) + GC:AddStatusBar (100, 1, R, G, B, A) + + --GC:AddLine (" ") + + GC:AddLine ("Normal Hits: ", spell.n_amt .. " (" ..floor ( spell.n_amt/total_hits*100) .. "%)") + GC:AddStatusBar (100, 1, R, G, B, A) + + local n_average = spell.n_curado / spell.n_amt + local T = (combat_time*spell.n_curado)/spell.total + local P = average/n_average*100 + T = P*T/100 + + GC:AddLine ("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format ("%.1f",spell.n_curado / T )) + GC:AddStatusBar (100, 1, R, G, B, A) + + --GC:AddLine (" ") + + GC:AddLine ("Critical Hits: ", spell.c_amt .. " (" ..floor ( spell.c_amt/total_hits*100) .. "%)") + GC:AddStatusBar (100, 1, R, G, B, A) + + if (spell.c_amt > 0) then + local c_average = spell.c_curado/spell.c_amt + local T = (combat_time*spell.c_curado)/spell.total + local P = average/c_average*100 + T = P*T/100 + local crit_dps = spell.c_curado / T + + GC:AddLine ("Average / E-Hps: ", _detalhes:ToK (c_average) .. " / " .. _detalhes:comma_value (crit_dps)) + else + GC:AddLine ("Average / E-Hps: ", "0 / 0") + end + + GC:AddStatusBar (100, 1, R, G, B, A) + + --GC:AddLine (" ") + + GC:AddLine ("Multistrike: ", spell.m_amt .. " (" ..floor ( spell.m_amt/total_hits*100) .. "%)") + GC:AddStatusBar (100, 1, R, G, B, A) + + GC:AddLine ("On Normal / On Critical:", spell.m_amt - spell.m_crit .. " / " .. spell.m_crit) + GC:AddStatusBar (100, 1, R, G, B, A) + end ]], percent_script = [[ diff --git a/framework/cooltip.lua b/framework/cooltip.lua index 97dc3f5b..ac13361a 100644 --- a/framework/cooltip.lua +++ b/framework/cooltip.lua @@ -1355,7 +1355,7 @@ function DetailsCreateCoolTip() elseif (CoolTip.OptionsTable.IgnoreButtonAutoHeight) then frame1:SetHeight ( (temp+spacing) * -1) else - frame1:SetHeight ( _math_max ( (frame1.hHeight * CoolTip.Indexes) + 12, 22 )) + frame1:SetHeight ( _math_max ( (frame1.hHeight * CoolTip.Indexes) + 12 + (spacing*-1), 22 )) end end diff --git a/functions/profiles.lua b/functions/profiles.lua index 144702fe..20601254 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -953,7 +953,7 @@ local default_profile = { fontcolor = {1, 1, 1, 1}, fontcolor_right = {1, 0.7, 0, 1}, --{1, 0.9254, 0.6078, 1} fontshadow = false, - background = {0.1960, 0.1960, 0.1960, 0.8697}, + background = {0.1960, 0.1960, 0.1960, 0.8697}, abbreviation = 2, -- 2 = ToK I Upper 5 = ToK I Lower -- was 8 maximize_method = 1, show_amount = false, @@ -967,8 +967,7 @@ local default_profile = { anchor_offset = {0, 0}, border_texture = "Details BarBorder 3", - --border_color = {0.76, 0.76, 0.76, 1}, - border_color = {1, 1, 1, 1}, + border_color = {1, 1, 1, 0}, border_size = 14, tooltip_max_abilities = 5, @@ -978,7 +977,6 @@ local default_profile = { menus_bg_coords = {331/512, 63/512, 109/512, 143/512}, menus_bg_color = {.8, .8, .8, 0.2}, menus_bg_texture = [[Interface\SPELLBOOK\Spellbook-Page-1]], - }, } diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index dae6622b..51befc1e 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -2127,6 +2127,8 @@ local icon_frame_on_enter = function (self) GameCooltip:AddLine ("Talents:", talent_string) _detalhes:AddTooltipBackgroundStatusbar() got_info = true + elseif (got_info) then + GameCooltip:AddLine ("Talents:", Loc ["STRING_QUERY_INSPECT_TALENTS"]) end GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar_skyline]]) diff --git a/startup.lua b/startup.lua index 5b8aab66..27f85619 100644 --- a/startup.lua +++ b/startup.lua @@ -339,6 +339,24 @@ function _G._detalhes:Start() _detalhes:FillUserCustomSpells() _detalhes:AddDefaultCustomDisplays() + --> tooltip background color update + if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 70 and enable_reset_warning) then + local bg = _detalhes.tooltip.background + bg [1] = 0.1960 + bg [2] = 0.1960 + bg [3] = 0.1960 + bg [4] = 0.8697 + + local border = _detalhes.tooltip.border_color + border [1] = 1 + border [2] = 1 + border [3] = 1 + border [4] = 0 + + --> refresh + _detalhes:SetTooltipBackdrop() + end + --> check elvui for the new player detail skin if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 69 and enable_reset_warning) then function _detalhes:PDWElvuiCheck()