diff --git a/boot.lua b/boot.lua index eed8d2a8..acbe3165 100644 --- a/boot.lua +++ b/boot.lua @@ -4,7 +4,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") _detalhes.build_counter = 1601 --it's 1601 for release - _detalhes.userversion = "v3.19.0b" + _detalhes.userversion = "v3.19.1" _detalhes.realversion = 74 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes @@ -25,13 +25,16 @@ do |cFFFFFF00-|r Updated Details! Framework.\n\n |cFFFFFF00-|r Added an option to make the menus on title bar work with clicks instead of hovering over them.\n\n |cFFFFFF00-|r Fixed death display tooltip, wasn't respecting the font and size set on options panel.\n\n + +|cFFFFFF00-|r Improvements on our support for Arena battles.\n\n +|cFFFFFF00-|r Fixed some issues on the Player Detail Window.\n\n |cFFFFFF00-|r .\n\n --]] -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.19.0b (|cFFFFCC00Aug 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Updated Details! Framework.\n\n|cFFFFFF00-|r Added an option to make the menus on title bar work with clicks instead of hovering over them.\n\n|cFFFFFF00-|r Fixed death display tooltip, wasn't respecting the font and size set on options panel.\n\n|cFFFFFF00v3.18.5 (|cFFFFCC00Aug 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improvements on Weakauras creation from Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements on 'Auto Switch to Current' feature. Details! windows are now more responsible about auto changing a segment while the player, for instance, has the report window opened.\n\n|cFFFFFF00-|r Added slash command '/de wipe'. It ends the raid encounter segment and stop capturing data.\nIf you are the raid leader, all other users of Details! will also stop.\nWorks great for players not make damage padding after a wipe call.\n\n|cFFFFFF00-|r Added the overheal made by pets on tooltip and player details window.\n\n|cFFFFFF00-|r Added an option to disable stretch button and bar highlight.\n\n|cFFFFFF00-|r Disabling nicknames now also disable avatars.\n\n|cFFFFFF00-|r Added 'spinal healing injector' on custom display 'Health Potion & Stone' used.\n\n|cFFFFFF00-|r Fixed title text width when auto-hide menu buttons is enabled.\n\n|cFFFFFF00-|r Fixed item level of timewarped items.\n\n|cFFFFFF00-|r Fixed report for custom display Crowd Control.\n\n|cFFFFFF00-|r Fixed role icons on custom displays.\n\n|cFFFFFF00-|r Fixed an issue with dropdown boxes where wasn't showing all options.\n\n|cFFFFFF00-|r Fixed Ticket #53: background alpha after stretching which wasn't correctly coming back to original color.\n\n|cFFFFFF00-|r Fixed ticket #51: API Call 'GetCombat('overall')' wasn't returning the overall combat object.\n\n|cFFFFFF00-|r Fixed ticket #50: issue opening icon selection frame.\n\n|cFFFFFF00v3.17.12 (|cFFFFCC00Aug 05, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for lock micro displays. When locked they don't interact with mouse or stay on top of menus.\n\n|cFFFFFF00-|r Fixed ticket #49: death display not working correctly with sort direction bottom-to-top.\n\n|cFFFFFF00-|r Fixed an issue with death display where the text wasn't updating their width correctly.\n\n|cFFFFFF00-|r Fixed an issue with energy and miscellaneous displays type not working correctly with bar animations.\n\n|cFFFFFF00-|r Fixed an issue while loading old profiles wans't updating their values for newer versions of the addon.\n\n|cFFFFFF00-|r Fixed an issue with bookmarks panel not opening correctly.\n\n|cFFFFFF00v3.17.10 (|cFFFFCC00Aug 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed ticket #47: Title bar font resets with UI reload / relog.\n\n|cFFFFFF00-|r Fixed ticket #46: Icon select panel wasn't opening.\n\n|cFFFFFF00-|r Fixed ticket #45: Windwalker icon for Mistweaver monks.\n\n|cFFFFFF00-|r Fixed issue with vehicles exchanging ownership, e.g. Soulbound Constructor on HFC raid.\n\n|cFFFFFF00v3.17.6 (|cFFFFCC00Jul 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Major improvements on the aura tool creation for WeakAuras.\n\n|cFFFFFF00-|r Fixed some issues with spec icons where sometimes it shows four small icons.\n\n|cFFFFFF00-|r Added an option to show a stopwatch on the title text showing the elapsed time of an encounter.\n\n|cFFFFFF00-|r Window title text now shrinks correctly when isn't enough space for it.\n\n|cFFFFFF00-|r For some special cases, left click now open the report window and shift+click shows the tooltip content in the window.\n\n|cFFFFFF00-|r Damage Taken by Spells now are a part of Damage bracket (no more on custom).\n\n|cFFFFFF00-|r Fixed custom functions for the customized bar left text.\n\n|cFFFFFF00-|r Improvements on report text format and also reverse option now works as intended.\n\n|cFFFFFF00-|r Removed the option for report only what is shown in the window.\n\n|cFFFFFF00-|r Added skins for report panel, the skin follow the skin selected for Player Detail Window.\n\n|cFFFFFF00v3.16.0c (|cFFFFCC00Jul 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with Encounter Details graphic for Archimonde encounter.\n\n|cFFFFFF00-|r Numbers format on Player Detail Window now respect the format chosen on options panel.\n\n|cFFFFFF00-|r Removed pet icons on Player Detail Window.\n\n|cFFFFFF00-|r Fixed some wrong textures on spec icons.\n\n|cFFFFFF00-|r Improvements on all skins for the Player Detail Window.\n\n|cFFFFFF00v3.15.8b (|cFFFFCC00Jul 01, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Soul Capacitor trinket fix.\n\n|cFFFFFF00-|r Fixed several small bugs from 6.2 patch.\n\n|cFFFFFF00-|r Disabled the special behavior for Tyrant Velhari encounter.\n\n|cFFFFFF00v3.15.7 (|cFFFFCC00Jun 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added support for Hellfire Citadel raid.\n\n|cFFFFFF00-|r Added support for custom CLEU parser functions.\n\n|cFFFFFF00-|r Tyrant Velhari encounter now has a custom CLEU parser function for healing where the heal absorbed by Aura of Contempt will count towards overheal and not healing done.\n\n|cFFFFFF00-|r Added support for embed on Chat Tabs.\n\n|cFFFFFF00-|r |cFFAAFFAAPS: We've made an addon for Shadow-Lord Iskar encounter called 'Iskar Assist' check it out|r.\n\n|cFFFFFF00v3.15.5a (|cFFFFCC00Jun 12, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue where sometimes tooltips wasn't being shown.\n\n|cFFFFFF00-|r Fixed a problem with overall data where it was using, even on dungoens, the raid-only 30 delay rule.\n\n|cFFFFFF00-|r Fixed an issue with spec detection (now it may detect even faster).\n\n|cFFFFFF00v3.15.5 (|cFFFFCC00Jun 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a problem with auto hide feature not hiding plugins hosted by the window.\n\n|cFFFFFF00-|r Fixed an issue with stretch feature when the anchor button was anchored at the bottom side of the window.\n\n|cFFFFFF00-|r Small interface tweaks on tooltips, bookmark and player detail window.\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." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.19.1 (|cFFFFCC00Aug 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Updated Details! Framework.\n\n|cFFFFFF00-|r Added an option to make the menus on title bar work with clicks instead of hovering over them.\n\n|cFFFFFF00-|r Improvements on our support for Arena battles.\n\n|cFFFFFF00-|r Fixed some issues on the Player Detail Window.\n\n|cFFFFFF00-|r Fixed death display tooltip, wasn't respecting the font and size set on options panel.\n\n|cFFFFFF00v3.18.5 (|cFFFFCC00Aug 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improvements on Weakauras creation from Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements on 'Auto Switch to Current' feature. Details! windows are now more responsible about auto changing a segment while the player, for instance, has the report window opened.\n\n|cFFFFFF00-|r Added slash command '/de wipe'. It ends the raid encounter segment and stop capturing data.\nIf you are the raid leader, all other users of Details! will also stop.\nWorks great for players not make damage padding after a wipe call.\n\n|cFFFFFF00-|r Added the overheal made by pets on tooltip and player details window.\n\n|cFFFFFF00-|r Added an option to disable stretch button and bar highlight.\n\n|cFFFFFF00-|r Disabling nicknames now also disable avatars.\n\n|cFFFFFF00-|r Added 'spinal healing injector' on custom display 'Health Potion & Stone' used.\n\n|cFFFFFF00-|r Fixed title text width when auto-hide menu buttons is enabled.\n\n|cFFFFFF00-|r Fixed item level of timewarped items.\n\n|cFFFFFF00-|r Fixed report for custom display Crowd Control.\n\n|cFFFFFF00-|r Fixed role icons on custom displays.\n\n|cFFFFFF00-|r Fixed an issue with dropdown boxes where wasn't showing all options.\n\n|cFFFFFF00-|r Fixed Ticket #53: background alpha after stretching which wasn't correctly coming back to original color.\n\n|cFFFFFF00-|r Fixed ticket #51: API Call 'GetCombat('overall')' wasn't returning the overall combat object.\n\n|cFFFFFF00-|r Fixed ticket #50: issue opening icon selection frame.\n\n|cFFFFFF00v3.17.12 (|cFFFFCC00Aug 05, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for lock micro displays. When locked they don't interact with mouse or stay on top of menus.\n\n|cFFFFFF00-|r Fixed ticket #49: death display not working correctly with sort direction bottom-to-top.\n\n|cFFFFFF00-|r Fixed an issue with death display where the text wasn't updating their width correctly.\n\n|cFFFFFF00-|r Fixed an issue with energy and miscellaneous displays type not working correctly with bar animations.\n\n|cFFFFFF00-|r Fixed an issue while loading old profiles wans't updating their values for newer versions of the addon.\n\n|cFFFFFF00-|r Fixed an issue with bookmarks panel not opening correctly.\n\n|cFFFFFF00v3.17.10 (|cFFFFCC00Aug 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed ticket #47: Title bar font resets with UI reload / relog.\n\n|cFFFFFF00-|r Fixed ticket #46: Icon select panel wasn't opening.\n\n|cFFFFFF00-|r Fixed ticket #45: Windwalker icon for Mistweaver monks.\n\n|cFFFFFF00-|r Fixed issue with vehicles exchanging ownership, e.g. Soulbound Constructor on HFC raid.\n\n|cFFFFFF00v3.17.6 (|cFFFFCC00Jul 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Major improvements on the aura tool creation for WeakAuras.\n\n|cFFFFFF00-|r Fixed some issues with spec icons where sometimes it shows four small icons.\n\n|cFFFFFF00-|r Added an option to show a stopwatch on the title text showing the elapsed time of an encounter.\n\n|cFFFFFF00-|r Window title text now shrinks correctly when isn't enough space for it.\n\n|cFFFFFF00-|r For some special cases, left click now open the report window and shift+click shows the tooltip content in the window.\n\n|cFFFFFF00-|r Damage Taken by Spells now are a part of Damage bracket (no more on custom).\n\n|cFFFFFF00-|r Fixed custom functions for the customized bar left text.\n\n|cFFFFFF00-|r Improvements on report text format and also reverse option now works as intended.\n\n|cFFFFFF00-|r Removed the option for report only what is shown in the window.\n\n|cFFFFFF00-|r Added skins for report panel, the skin follow the skin selected for Player Detail Window.\n\n|cFFFFFF00v3.16.0c (|cFFFFCC00Jul 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with Encounter Details graphic for Archimonde encounter.\n\n|cFFFFFF00-|r Numbers format on Player Detail Window now respect the format chosen on options panel.\n\n|cFFFFFF00-|r Removed pet icons on Player Detail Window.\n\n|cFFFFFF00-|r Fixed some wrong textures on spec icons.\n\n|cFFFFFF00-|r Improvements on all skins for the Player Detail Window.\n\n|cFFFFFF00v3.15.8b (|cFFFFCC00Jul 01, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Soul Capacitor trinket fix.\n\n|cFFFFFF00-|r Fixed several small bugs from 6.2 patch.\n\n|cFFFFFF00-|r Disabled the special behavior for Tyrant Velhari encounter.\n\n|cFFFFFF00v3.15.7 (|cFFFFCC00Jun 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added support for Hellfire Citadel raid.\n\n|cFFFFFF00-|r Added support for custom CLEU parser functions.\n\n|cFFFFFF00-|r Tyrant Velhari encounter now has a custom CLEU parser function for healing where the heal absorbed by Aura of Contempt will count towards overheal and not healing done.\n\n|cFFFFFF00-|r Added support for embed on Chat Tabs.\n\n|cFFFFFF00-|r |cFFAAFFAAPS: We've made an addon for Shadow-Lord Iskar encounter called 'Iskar Assist' check it out|r.\n\n|cFFFFFF00v3.15.5a (|cFFFFCC00Jun 12, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue where sometimes tooltips wasn't being shown.\n\n|cFFFFFF00-|r Fixed a problem with overall data where it was using, even on dungoens, the raid-only 30 delay rule.\n\n|cFFFFFF00-|r Fixed an issue with spec detection (now it may detect even faster).\n\n|cFFFFFF00v3.15.5 (|cFFFFCC00Jun 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a problem with auto hide feature not hiding plugins hosted by the window.\n\n|cFFFFFF00-|r Fixed an issue with stretch feature when the anchor button was anchored at the bottom side of the window.\n\n|cFFFFFF00-|r Small interface tweaks on tooltips, bookmark and player detail window.\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." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index fc8a887b..809e41d7 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -2596,6 +2596,62 @@ end end end + +--[[ exported]] function _detalhes:SetClassIcon (texture, instance) + + if (self.spellicon) then + texture:SetTexture (self.spellicon) + texture:SetTexCoord (0.078125, 0.921875, 0.078125, 0.921875) + texture:SetVertexColor (1, 1, 1) + + elseif (self.classe == "UNKNOW") then + texture:SetTexture ([[Interface\AddOns\Details\images\classes_plus]]) + texture:SetTexCoord (0.50390625, 0.62890625, 0, 0.125) + + texture:SetVertexColor (1, 1, 1) + + elseif (self.classe == "UNGROUPPLAYER") then + if (self.enemy) then + if (_detalhes.faction_against == "Horde") then + texture:SetTexture ("Interface\\ICONS\\Achievement_Character_Orc_Male") + texture:SetTexCoord (0, 1, 0, 1) + else + texture:SetTexture ("Interface\\ICONS\\Achievement_Character_Human_Male") + texture:SetTexCoord (0, 1, 0, 1) + end + else + if (_detalhes.faction_against == "Horde") then + texture:SetTexture ("Interface\\ICONS\\Achievement_Character_Human_Male") + texture:SetTexCoord (0, 1, 0, 1) + else + texture:SetTexture ("Interface\\ICONS\\Achievement_Character_Orc_Male") + texture:SetTexCoord (0, 1, 0, 1) + end + end + texture:SetVertexColor (1, 1, 1) + + elseif (self.classe == "PET") then + texture:SetTexture (instance and instance.row_info.icon_file or [[Interface\AddOns\Details\images\classes_small]]) + texture:SetTexCoord (0.25, 0.49609375, 0.75, 1) + texture:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) + else + if (instance and instance.row_info.use_spec_icons) then + if (self.spec) then + texture:SetTexture (instance.row_info.spec_file) + texture:SetTexCoord (_unpack (_detalhes.class_specs_coords [self.spec])) + texture:SetVertexColor (1, 1, 1) + else + texture:SetTexture ([[Interface\AddOns\Details\images\classes_small]]) + texture:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) + texture:SetVertexColor (1, 1, 1) + end + else + texture:SetTexture (instance and instance.row_info.icon_file or [[Interface\AddOns\Details\images\classes_small]]) + texture:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) + texture:SetVertexColor (1, 1, 1) + end + end +end --[[ exported]] function _detalhes:RefreshBarra (esta_barra, instancia, from_resize) @@ -2611,59 +2667,7 @@ end end --icon - if (self.spellicon) then - esta_barra.icone_classe:SetTexture (self.spellicon) - esta_barra.icone_classe:SetTexCoord (0.078125, 0.921875, 0.078125, 0.921875) - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - - elseif (self.classe == "UNKNOW") then - esta_barra.icone_classe:SetTexture ([[Interface\AddOns\Details\images\classes_plus]]) - esta_barra.icone_classe:SetTexCoord (0.50390625, 0.62890625, 0, 0.125) - - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - - elseif (self.classe == "UNGROUPPLAYER") then - if (self.enemy) then - if (_detalhes.faction_against == "Horde") then - esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Orc_Male") - esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1) - else - esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Human_Male") - esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1) - end - else - if (_detalhes.faction_against == "Horde") then - esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Human_Male") - esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1) - else - esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Orc_Male") - esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1) - end - end - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - - elseif (self.classe == "PET") then - esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) - esta_barra.icone_classe:SetTexCoord (0.25, 0.49609375, 0.75, 1) - esta_barra.icone_classe:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) - - else - if (instancia.row_info.use_spec_icons) then - if (self.spec) then - esta_barra.icone_classe:SetTexture (instancia.row_info.spec_file) - esta_barra.icone_classe:SetTexCoord (_unpack (_detalhes.class_specs_coords [self.spec])) - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - else - esta_barra.icone_classe:SetTexture ([[Interface\AddOns\Details\images\classes_small]]) - esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - end - else - esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) - esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - end - end + self:SetClassIcon (esta_barra.icone_classe, instancia) --texture and text local bar_number = "" @@ -3922,18 +3926,24 @@ function atributo_damage:MontaInfoDamageDone() barra.textura:SetValue (tabela[2]/max_inimigos*100) end - barra.textura:SetStatusBarColor (1, 0.8, 0.8) - - barra.icone:SetTexture ([[Interface\AddOns\Details\images\classes_small_alpha]]) --CLASSE - - local texCoords = _detalhes.class_coords ["ENEMY"] - barra.icone:SetTexCoord (_unpack (texCoords)) - - barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda - if (info.sub_atributo == 2) then - barra.texto_direita:SetText (_detalhes:comma_value ( _math_floor (tabela[2]/meu_tempo)) .." ".. instancia.divisores.abre .._cstr("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita + local target_actor = instancia.showing (1, tabela[1]) + if (target_actor) then + target_actor:SetClassIcon (barra.icone, instancia) else - barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .._cstr("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita + barra.icone:SetTexture ([[Interface\AddOns\Details\images\classes_small_alpha]]) --CLASSE + local texCoords = _detalhes.class_coords ["ENEMY"] + barra.icone:SetTexCoord (_unpack (texCoords)) + end + + barra.textura:SetStatusBarColor (1, 0.8, 0.8) + barra.textura:SetStatusBarColor (1, 1, 1, 1) + + barra.texto_esquerdo:SetText (index .. ". " .. _detalhes:GetOnlyName (tabela[1])) + + if (info.sub_atributo == 2) then + barra.texto_direita:SetText (_detalhes:comma_value ( _math_floor (tabela[2]/meu_tempo)) .. " (" .. _cstr ("%.1f", tabela[3]) .. "%)") + else + barra.texto_direita:SetText (SelectedToKFunction (_, tabela[2]) .." (" .. _cstr ("%.1f", tabela[3]) .. "%)") end if (barra.mouse_over) then --> atualizar o tooltip @@ -4424,7 +4434,7 @@ function atributo_damage:MontaTooltipDamageTaken (esta_barra, index) end _table_sort (habilidades, _detalhes.Sort2) - + GameTooltip:AddLine (index..". "..esta_barra.nome_inimigo) GameTooltip:AddLine (Loc ["STRING_DAMAGE_TAKEN_FROM2"]..":") GameTooltip:AddLine (" ") @@ -4433,7 +4443,6 @@ function atributo_damage:MontaTooltipDamageTaken (esta_barra, index) local nome, _, icone = _GetSpellInfo (tabela[1]) if (index < 8) then GameTooltip:AddDoubleLine (index..". |T"..icone..":0|t "..nome, _detalhes:comma_value (tabela[2]).." (".._cstr("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1) - --GameTooltip:AddTexture (icone) else GameTooltip:AddDoubleLine (index..". "..nome, _detalhes:comma_value (tabela[2]).." (".._cstr("%.1f", tabela[2]/total*100).."%)", .65, .65, .65, .65, .65, .65) end @@ -4535,13 +4544,13 @@ function atributo_damage:MontaTooltipAlvos (esta_barra, index, instancia) if (is_dps) then GameTooltip:AddDoubleLine (index..". |T"..tabela[3]..":0|t "..tabela[1], _detalhes:comma_value ( _math_floor (tabela[2] / meu_tempo) ).." (".._cstr("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1) else - GameTooltip:AddDoubleLine (index..". |T"..tabela[3]..":0|t "..tabela[1], _detalhes:comma_value (tabela[2]).." (".._cstr("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1) + GameTooltip:AddDoubleLine (index..". |T"..tabela[3]..":0|t " .. tabela[1], SelectedToKFunction (_, tabela[2]) .. " (".._cstr("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1) end else if (is_dps) then GameTooltip:AddDoubleLine (index..". "..tabela[1], _detalhes:comma_value ( _math_floor (tabela[2] / meu_tempo) ).." (".._cstr("%.1f", tabela[2]/total*100).."%)", .65, .65, .65, .65, .65, .65) else - GameTooltip:AddDoubleLine (index..". "..tabela[1], _detalhes:comma_value (tabela[2]).." (".._cstr("%.1f", tabela[2]/total*100).."%)", .65, .65, .65, .65, .65, .65) + GameTooltip:AddDoubleLine (index..". "..tabela[1], SelectedToKFunction (_, tabela[2]).." (".._cstr("%.1f", tabela[2]/total*100).."%)", .65, .65, .65, .65, .65, .65) end end end diff --git a/classes/classe_energy.lua b/classes/classe_energy.lua index 12a26db0..b72379d1 100644 --- a/classes/classe_energy.lua +++ b/classes/classe_energy.lua @@ -770,53 +770,8 @@ function atributo_energy:RefreshBarra (esta_barra, instancia, from_resize) esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end - if (self.classe == "UNKNOW") then - esta_barra.icone_classe:SetTexture ("Interface\\LFGFRAME\\LFGROLE_BW") - esta_barra.icone_classe:SetTexCoord (.25, .5, 0, 1) - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - - elseif (self.classe == "UNGROUPPLAYER") then - if (self.enemy) then - if (_detalhes.faction_against == "Horde") then - esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Orc_Male") - esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1) - else - esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Human_Male") - esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1) - end - else - if (_detalhes.faction_against == "Horde") then - esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Human_Male") - esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1) - else - esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Orc_Male") - esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1) - end - end - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - - elseif (self.classe == "PET") then - esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) - esta_barra.icone_classe:SetTexCoord (0.25, 0.49609375, 0.75, 1) - esta_barra.icone_classe:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) - - else - if (instancia.row_info.use_spec_icons) then - if (self.spec) then - esta_barra.icone_classe:SetTexture (instancia.row_info.spec_file) - esta_barra.icone_classe:SetTexCoord (_unpack (_detalhes.class_specs_coords [self.spec])) - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - else - esta_barra.icone_classe:SetTexture ([[Interface\AddOns\Details\images\classes_small]]) - esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - end - else - esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) - esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - end - end + --icon + self:SetClassIcon (esta_barra.icone_classe, instancia) --texture and text diff --git a/classes/classe_heal.lua b/classes/classe_heal.lua index 7af75546..821acef5 100644 --- a/classes/classe_heal.lua +++ b/classes/classe_heal.lua @@ -863,66 +863,7 @@ function atributo_heal:RefreshBarra (esta_barra, instancia, from_resize) end --icon - - if (self.spellicon) then - esta_barra.icone_classe:SetTexture (self.spellicon) - esta_barra.icone_classe:SetTexCoord (0.078125, 0.921875, 0.078125, 0.921875) - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - - elseif (self.classe == "UNKNOW") then - --esta_barra.icone_classe:SetTexture ("Interface\\LFGFRAME\\LFGROLE") - --esta_barra.icone_classe:SetTexCoord (.25, .5, 0, 1) - - --esta_barra.icone_classe:SetTexture ([[Interface\TARGETINGFRAME\PetBadge-Undead]]) - --esta_barra.icone_classe:SetTexCoord (0.09375, 0.90625, 0.09375, 0.90625) - - esta_barra.icone_classe:SetTexture ([[Interface\AddOns\Details\images\classes_plus]]) - esta_barra.icone_classe:SetTexCoord (0.50390625, 0.62890625, 0, 0.125) - - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - - elseif (self.classe == "UNGROUPPLAYER") then - if (self.enemy) then - if (_detalhes.faction_against == "Horde") then - esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Orc_Male") - esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1) - else - esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Human_Male") - esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1) - end - else - if (_detalhes.faction_against == "Horde") then - esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Human_Male") - esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1) - else - esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Orc_Male") - esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1) - end - end - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - - elseif (self.classe == "PET") then - esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) - esta_barra.icone_classe:SetTexCoord (0.25, 0.49609375, 0.75, 1) - esta_barra.icone_classe:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) - - else - if (instancia.row_info.use_spec_icons) then - if (self.spec) then - esta_barra.icone_classe:SetTexture (instancia.row_info.spec_file) - esta_barra.icone_classe:SetTexCoord (_unpack (_detalhes.class_specs_coords [self.spec])) - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - else - esta_barra.icone_classe:SetTexture ([[Interface\AddOns\Details\images\classes_small]]) - esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - end - else - esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) - esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - end - end + self:SetClassIcon (esta_barra.icone_classe, instancia) --texture and text @@ -1698,15 +1639,25 @@ function atributo_heal:MontaInfoHealingDone() if (index == 1) then barra.textura:SetValue (100) else - barra.textura:SetValue (tabela[2]/max_*100) --> muito mais rapido... + barra.textura:SetValue (tabela[2]/max_*100) end - barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda + local target_actor = instancia.showing (2, tabela[1]) + if (target_actor) then + target_actor:SetClassIcon (barra.icone, instancia) + else + barra.icone:SetTexture ([[Interface\AddOns\Details\images\classes_small_alpha]]) --CLASSE + local texCoords = _detalhes.class_coords ["ENEMY"] + barra.icone:SetTexCoord (_unpack (texCoords)) + end + + barra.texto_esquerdo:SetText (index .. ". " .. _detalhes:GetOnlyName (tabela[1])) + barra.textura:SetStatusBarColor (1, 1, 1, 1) if (info.sub_atributo == 2) then - barra.texto_direita:SetText (_detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha) + barra.texto_direita:SetText (_detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)) .." (" .. _cstr ("%.1f", tabela[3]) .. "%)") else - barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha) + barra.texto_direita:SetText (SelectedToKFunction (_, tabela[2]) .. " (" .. _cstr ("%.1f", tabela[3]) .. "%)") end barra.minha_tabela = self @@ -1793,13 +1744,13 @@ function atributo_heal:MontaTooltipAlvos (esta_barra, index, instancia) if (is_hps) then GameTooltip:AddDoubleLine (index..". |T"..icone..":0|t "..nome, _detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1) else - GameTooltip:AddDoubleLine (index..". |T"..icone..":0|t "..nome, _detalhes:comma_value (tabela[2]).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1) + GameTooltip:AddDoubleLine (index..". |T"..icone..":0|t "..nome, SelectedToKFunction (_, tabela[2]).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1) end else if (is_hps) then GameTooltip:AddDoubleLine (index..". "..nome, _detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)", .65, .65, .65, .65, .65, .65) else - GameTooltip:AddDoubleLine (index..". "..nome, _detalhes:comma_value (tabela[2]).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)", .65, .65, .65, .65, .65, .65) + GameTooltip:AddDoubleLine (index..". "..nome, SelectedToKFunction (_, tabela[2]).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)", .65, .65, .65, .65, .65, .65) end end end diff --git a/classes/classe_others.lua b/classes/classe_others.lua index 8ed7f0fa..8468fd05 100644 --- a/classes/classe_others.lua +++ b/classes/classe_others.lua @@ -947,53 +947,8 @@ function atributo_misc:RefreshBarra (esta_barra, instancia, from_resize) esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end - if (self.classe == "UNKNOW") then - esta_barra.icone_classe:SetTexture ("Interface\\LFGFRAME\\LFGROLE_BW") - esta_barra.icone_classe:SetTexCoord (.25, .5, 0, 1) - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - - elseif (self.classe == "UNGROUPPLAYER") then - if (self.enemy) then - if (_detalhes.faction_against == "Horde") then - esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Orc_Male") - esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1) - else - esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Human_Male") - esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1) - end - else - if (_detalhes.faction_against == "Horde") then - esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Human_Male") - esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1) - else - esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Orc_Male") - esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1) - end - end - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - - elseif (self.classe == "PET") then - esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) - esta_barra.icone_classe:SetTexCoord (0.25, 0.49609375, 0.75, 1) - esta_barra.icone_classe:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) - - else - if (instancia.row_info.use_spec_icons) then - if (self.spec) then - esta_barra.icone_classe:SetTexture (instancia.row_info.spec_file) - esta_barra.icone_classe:SetTexCoord (_unpack (_detalhes.class_specs_coords [self.spec])) - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - else - esta_barra.icone_classe:SetTexture ([[Interface\AddOns\Details\images\classes_small]]) - esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - end - else - esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) - esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) - esta_barra.icone_classe:SetVertexColor (1, 1, 1) - end - end + --icon + self:SetClassIcon (esta_barra.icone_classe, instancia) --texture and text diff --git a/core/control.lua b/core/control.lua index 69b945ee..08233c7a 100644 --- a/core/control.lua +++ b/core/control.lua @@ -750,6 +750,58 @@ end end + local string_arena_enemyteam_damage = [[ + local combat = _detalhes:GetCombat ("current") + local total = 0 + + for _, actor in combat[1]:ListActors() do + if (actor.arena_enemy) then + total = total + actor.total + end + end + + return total + ]] + + local string_arena_myteam_damage = [[ + local combat = _detalhes:GetCombat ("current") + local total = 0 + + for _, actor in combat[1]:ListActors() do + if (actor.arena_ally) then + total = total + actor.total + end + end + + return total + ]] + + local string_arena_enemyteam_heal = [[ + local combat = _detalhes:GetCombat ("current") + local total = 0 + + for _, actor in combat[2]:ListActors() do + if (actor.arena_enemy) then + total = total + actor.total + end + end + + return total + ]] + + local string_arena_myteam_heal = [[ + local combat = _detalhes:GetCombat ("current") + local total = 0 + + for _, actor in combat[2]:ListActors() do + if (actor.arena_ally) then + total = total + actor.total + end + end + + return total + ]] + function _detalhes:CreateArenaSegment() _detalhes:GetPlayersInArena() @@ -761,12 +813,20 @@ _detalhes:SairDoCombate() end + --> registra os gráficos + _detalhes:TimeDataRegister ("Your Team Damage", string_arena_myteam_damage, nil, "Details!", "v1.0", [[Interface\ICONS\Ability_DualWield]], true, true) + _detalhes:TimeDataRegister ("Enemy Team Damage", string_arena_enemyteam_damage, nil, "Details!", "v1.0", [[Interface\ICONS\Ability_DualWield]], true, true) + + _detalhes:TimeDataRegister ("Your Team Healing", string_arena_myteam_heal, nil, "Details!", "v1.0", [[Interface\ICONS\Ability_DualWield]], true, true) + _detalhes:TimeDataRegister ("Enemy Team Healing", string_arena_enemyteam_heal, nil, "Details!", "v1.0", [[Interface\ICONS\Ability_DualWield]], true, true) + --> inicia um novo combate _detalhes:EntrarEmCombate() --> sinaliza que esse combate é arena _detalhes.tabela_vigente.arena = true _detalhes.tabela_vigente.is_arena = {name = _detalhes.zone_name, zone = _detalhes.zone_name, mapid = _detalhes.zone_id} + end function _detalhes:StartArenaSegment (...) @@ -802,6 +862,13 @@ if (_detalhes.start_arena) then _detalhes:CancelTimer (_detalhes.start_arena, true) end + + _detalhes:TimeDataUnregister ("Your Team Damage") + _detalhes:TimeDataUnregister ("Enemy Team Damage") + + _detalhes:TimeDataUnregister ("Your Team Healing") + _detalhes:TimeDataUnregister ("Enemy Team Healing") + end function _detalhes:MakeEqualizeOnActor (player, realm, receivedActor) diff --git a/core/parser.lua b/core/parser.lua index e850c817..e441e53c 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -144,6 +144,8 @@ --spellid, spellname, spelltype end +-- /run local f=CreateFrame("frame");f:RegisterAllEvents();f:SetScript("OnEvent", function(self, ...)print (...);end) + -- /run local f=CreateFrame("frame");f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");f:SetScript("OnEvent", function(self, ...)print (...);end) -- /run local f=CreateFrame("frame");f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");f:SetScript("OnEvent",function(self, ...) local a = select(6, ...);if (a=="")then print (...) end end) diff --git a/functions/timedata.lua b/functions/timedata.lua index 8a6106f1..d0ad9275 100644 --- a/functions/timedata.lua +++ b/functions/timedata.lua @@ -79,6 +79,7 @@ end + --matrix = table containing {max_value = 0, last_value = 0} function _detalhes:TimeDataRegister (name, func, matrix, author, version, icon, is_enabled, force_no_save) --> check name diff --git a/gumps/janela_info.lua b/gumps/janela_info.lua index fed42fad..4324fb83 100644 --- a/gumps/janela_info.lua +++ b/gumps/janela_info.lua @@ -4332,6 +4332,8 @@ local target_on_enter = function (self) meu_tempo = info.instancia.showing:GetCombatTime() end + local SelectedToKFunction = _detalhes.ToKFunctions [_detalhes.ps_abbreviation] + for index, target in ipairs (ActorTargetsSortTable) do if (target [2] > 0) then local class = _detalhes:GetClass (target [1]) @@ -4340,13 +4342,13 @@ local target_on_enter = function (self) if (info.target_persecond) then GameTooltip:AddDoubleLine (index .. ". |TInterface\\AddOns\\Details\\images\\classes_small_alpha:14:14:0:0:128:128:"..cords[1]*128 ..":"..cords[2]*128 ..":"..cords[3]*128 ..":"..cords[4]*128 .."|t " .. target [1], _detalhes:comma_value ( _math_floor (target [2] / meu_tempo) ), 1, 1, 1, 1, 1, 1) else - GameTooltip:AddDoubleLine (index .. ". |TInterface\\AddOns\\Details\\images\\classes_small_alpha:14:14:0:0:128:128:"..cords[1]*128 ..":"..cords[2]*128 ..":"..cords[3]*128 ..":"..cords[4]*128 .."|t " .. target [1], _detalhes:comma_value (target [2]), 1, 1, 1, 1, 1, 1) + GameTooltip:AddDoubleLine (index .. ". |TInterface\\AddOns\\Details\\images\\classes_small_alpha:14:14:0:0:128:128:"..cords[1]*128 ..":"..cords[2]*128 ..":"..cords[3]*128 ..":"..cords[4]*128 .."|t " .. target [1], SelectedToKFunction (_, target [2]), 1, 1, 1, 1, 1, 1) end else if (info.target_persecond) then GameTooltip:AddDoubleLine (index .. ". " .. target [1], _detalhes:comma_value ( _math_floor (target [2] / meu_tempo)), 1, 1, 1, 1, 1, 1) else - GameTooltip:AddDoubleLine (index .. ". " .. target [1], _detalhes:comma_value (target [2]), 1, 1, 1, 1, 1, 1) + GameTooltip:AddDoubleLine (index .. ". " .. target [1], SelectedToKFunction (_, target [2]), 1, 1, 1, 1, 1, 1) end end end