diff --git a/boot.lua b/boot.lua index 6b756b46..5d26e801 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 = 509 --it's 509 for release - _detalhes.userversion = "v3.9.6" + _detalhes.userversion = "v3.9.7" _detalhes.realversion = 58 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -20,7 +20,10 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v3.9.6 (|cFFFFCC00Feb 04, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00v3.9.7 (|cFFFFCC00Feb 05, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Enemies display now shows damage taken instead of damage done.\n\n +|cFFFFFF00-|r Tooltip for enemies display now also show damage and healing done by the enemy.\n\n +|cFFFFFF00-|r Added an option under miscellaneous to show neutral and hostile creatures on damage taken display.\n\n |cFFFFFF00-|r Added an option to ignore nicknames and always use character names.\n\n |cFFFFFF00-|r Enabling the display icon on title bar now makes the title text automatically move slightly to right.\n\n |cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n @@ -41,9 +44,10 @@ do |cFFFFFF00-|r Fixed yet another bug with avoidance tab on player detail window.\n\n |cFFFFFF00-|r Fixed the window ungroup button (above the resize one).\n\n --]] --- |cFFFFFF00v3.9.6 (|cFFFFCC00Feb 04, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option to ignore nicknames and always use character names.\n\n|cFFFFFF00-|r Enabling the display icon on title bar now makes the title text automatically move slightly to right.\n\n|cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n + +-- |cFFFFFF00v3.9.7 (|cFFFFCC00Feb 05, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Enemies display now shows damage taken instead of damage done.\n\n|cFFFFFF00-|r Tooltip for enemies display now also show damage and healing done by the enemy.\n\n|cFFFFFF00-|r Added an option under miscellaneous to show neutral and hostile creatures on damage taken display.\n\n|cFFFFFF00-|r Added an option to ignore nicknames and always use character names.\n\n|cFFFFFF00-|r Enabling the display icon on title bar now makes the title text automatically move slightly to right.\n\n|cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.9.6 (|cFFFFCC00Feb 04, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option to ignore nicknames and always use character names.\n\n|cFFFFFF00-|r Enabling the display icon on title bar now makes the title text automatically move slightly to right.\n\n|cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n|cFFFFFF00v3.9.4 (|cFFFFCC00Feb 03, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option 'Ignore Mass Toggle', when enabled the window won't be affected when hiding, showing or toggling all windows.\n\n|cFFFFFF00-|r Added window number for slash commands 'hide', 'show' and 'toggle'. Usage: '/details hide 1' to hide window 1.\n\n|cFFFFFF00-|r Removed keybinds for Open and Close, added toggle instead.\n\n|cFFFFFF00-|r Added slash command 'toggle'.\n\n|cFFFFFF00-|r Added display icons for all skins which still didn't have they.\n\n|cFFFFFF00-|r Improved 'Align with right chat' tool, now it also supports Forced Square skin.\n\n|cFFFFFF00-|r Improvements on Bookmark panel.\n\n|cFFFFFF00-|r Improvements on spec icons with transparency.\n\n|cFFFFFF00-|r Created custom spell for Living Bomb explosion.\n\n|cFFFFFF00-|r Fixed statusbar textures and mini displays.\n\n|cFFFFFF00-|r Fixed an issue with title bar buttons when toggling the titlebar anchor from bottom to top position.\n\n|cFFFFFF00-|r Fixed an issue with title bar text when toggling the statusbar position from bottom to top.\n\n|cFFFFFF00-|r Fixed yet another bug with avoidance tab on player detail window.\n\n|cFFFFFF00-|r Fixed the window ungroup button (above the resize one).\n\n|cFFFFFF00v3.8.13 (|cFFFFCC00Jan 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r RaidCheck (plugin): added an option to be able to use the report panel.\n\n|cFFFFFF00-|r You Are Not Prepared (plugin): added Auto Close the window, can be disabled through its options panel.\n\n|cFFFFFF00-|r Vanguard (plugin): Added Options Panel.\n\n|cFFFFFF00-|r Details! is now using 'LibWindow-1.1' to save and restore the positioning of the windows, bug might appear, please report if something weird happen.\n\n|cFFFFFF00-|r Improved specialization detection in order to try detect spec changes.\n\n|cFFFFFF00-|r Added options to change the brackets and the separator for dps/percent block.\n\n|cFFFFFF00-|r Added options for show (or hide) totals, dps and percent amount.\n\n|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click.\n\n|cFFFFFF00-|r Fixed positioning after reopen a window previously closed on last logon.\n\n|cFFFFFF00-|r Fixed enemies display where sometimes the bars were black instead of red.\n\n|cFFFFFF00-|r Fixed few places where spec icons wasn't being used on.\n\n|cFFFFFF00-|r Fixed avoidance panel on Player Details Window where sometimes was giving errors.\n\n|cFFFFFF00-|r Fixed priest shadow and holy detection.\n\n|cFFFFFF00-|r Fixed blood and unholy spec icons.\n\n|cFFFFFF00-|r Fixed an issue with 'Always Show me' feature where it was showing the player on Enemies display.\n\n|cFFFFFF00v3.8.1 (|cFFFFCC00Jan 17, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin Vanguard: got full rewrite and now it is more easy to use.\n\n|cFFFFFF00-|r Plugin TimeAttack: fixed problem where sometimes required a reload to start a new time.\n\n|cFFFFFF00-|r Plugin Damage the Game!: fixed a problem where sometimes the time didn't started after level 2.\n\n|cFFFFFF00-|r Added specialization icons.\n\n|cFFFFFF00-|r Fixed Auto-Hide where it wasn't hiding the wallpaper of the window.\n\n|cFFFFFF00-|r Added 'Editing Group' check box on option panel, when enabled, settings changed also are modified on all windows in the group.\n\n|cFFFFFF00-|r Changing window's skin, doesn't change any more settings not related with appearance, for example, Auto-Hide, Switches.\n\n|cFFFFFF00-|r Custom display 'Health Potion & Stone' now also track Healing Tonic.\n\n|cFFFFFF00-|r Custom display 'Damage Taken by Spell' now tracks more spells and also melee hits.\n\n|cFFFFFF00-|r Menus now uses 'Friz Quadrata TT' font as default, also added an option to change it on options panel -> miscellaneous.\n\n|cFFFFFF00-|r 'Switch to Current' feature now switches all windows which have this option enabled.\n\n|cFFFFFF00-|r The message telling to use '/details reinstall' now only shows if a problem happen during the addon load process.\n\n|cFFFFFF00-|r Segments Saved option now can be set to 25, up from 5.\n\n|cFFFFFF00-|r Attempt to fix the bug with the monk spell 'Storm, Earth, and Fire'.\n\n|cFFFFFF00-|r Fixed 'Icon Pick' panel.\n\n|cFFFFFF00-|r Fixed bug when reporting friendly fire through player detail window.\n\n|cFFFFFF00-|r Fixed bug with report window where sometimes it was reporting on a wrong channel.\n\n|cFFFFFF00v3.7.1 (|cFFFFCC00Jan 08, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin 'Damage Rank': is now called 'Damage, the Game!' and had its levels adjusted for WoD.\n\n|cFFFFFF00-|r Plugin 'Tiny Threat': fixed player name where it was showing the realm name too.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed frame details (clicking on a bar) shown behind the Vanguard panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed a problem when clicking with right button wasn't opening the bookmark panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': incoming heals now count shield amount on the player too.\n\n|cFFFFFF00-|r Plugin 'Vanguard' Known Bug: incoming damage and melee vs avoidance seems to be inaccurate by now, we need more time to study and fix it.\n\n|cFFFFFF00-|r Added Twins Ogron's Charge as custom spells, one for the charge by him self and other for the copies (mythic only).\n\n|cFFFFFF00-|r Added option panel for Raid Check plugin.\n\n|cFFFFFF00-|r Added key bindings for open a window, close a window and select a bookmark.\n\n|cFFFFFF00-|r Added 'CTRL + RightClick' closes a window.\n\n|cFFFFFF00-|r Fixed wallpaper transparency after releasing the window from a stretch.|cFFFFFF00-|r Fixed few issues when using class text colors.\n\n|cFFFFFF00-|r Fixed characters name outside instances, now it replaces the realm name with a * and show the complete name on tooltip.\n\n|cFFFFFF00-|r Fixed damage mitigation on damage taken, this affects only specific classes like monk tank.\n\n|cFFFFFF00-|r Fixed auto erase poping up when the player enters on its garrison.\n\n|cFFFFFF00-|r Fixed combat on garrison training dummies which was being marked as Trash Segment.\n\n|cFFFFFF00-|r Fixed command /details disable, wasn't disabling the capture of cooldowns.\n\n|cFFFFFF00-|r Fixed a problem with fast dps/hps when the window is in a empty segment.\n\n|cFFFFFF00-|r Fixed an issue using bookmark panel where it wasn't changing the display when the window is in a plugin mode.\n\n|cFFFFFF00-|r Fixed a bug when bars isn't using class colors on Frags, Auras & Void Zones, Resources and Deaths.\n\n|cFFFFFF00-|r Fixed bar animations when 'Sort Direction' is set to bottom.\n\n|cFFFFFF00-|r Fixed the spam 'you are not in a guild' when checking for new versions.\n\n|cFFFFFF00-|r Fixed translations for Auto Hide Settings bracket under options panel.\n\n|cFFFFFF00-|r Fixed Auto Hide -> Mouse Interaction tool where wans't able to work okey during combat.\n\n|cFFFFFF00v3.6.14b (|cFFFFCC00Jan 01, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added custom display 'My Spells' which shows your spells in the window.\n\n|cFFFFFF00-|r Added new custom display: Health Potion & Stone.\n\n|cFFFFFF00-|r Added overkill on death's tooltip.\n\n|cFFFFFF00-|r Created custom spells for Twin Ogron's Pulverize. Now it has 3 spells one for each wave.\n\n|cFFFFFF00-|r Created custom spells for Ko'ragh Overflowing Energy. Now it has 2 spells one for when the ball is catched and other when it reaches the ground and explodes.\n\n|cFFFFFF00-|r Changed healing multistrike to use the same format as damage done.\n\n|cFFFFFF00-|r Few improvements on Tiny Threat plugin: color gradient green-red is fixed, texts and bar texture now correctly uses the window settings.\n\n|cFFFFFF00-|r Damage Taken by Spell won't show pets in its tooltip any more.\n\n|cFFFFFF00-|r Enemies display won't show any more mirror images and spirit link totems.\n\n|cFFFFFF00-|r Enemies's tooltip now only show players and show all players instead of only 6.\n\n|cFFFFFF00-|r Few cooldowns shown as raid wide now shows as personal cooldowns.\n\n|cFFFFFF00-|r Fixed dispell tagets on dispell's tooltip.\n\n|cFFFFFF00-|r Fixed 'First Hit' raid tool.\n\n|cFFFFFF00-|r Fixed 'Open Options Panel' from interface panel.\n\n|cFFFFFF00v3.6.8 (|cFFFFCC00Dec 24, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Fast (i mean, really fast) Dps/Hps update rate, its option is under Rows: Advanced -> Fast Updates.\n\n|cFFFFFF00-|r Created a custom spell for Mirror Image's Fireball and Frostbolt, with that Player Detail window distinguishes spells from the player and images.\n\n|cFFFFFF00-|r Added new skin: 'ElvUI Style II'." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.9.7 (|cFFFFCC00Feb 05, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Enemies display now shows damage taken instead of damage done.\n\n|cFFFFFF00-|r Tooltip for enemies display now also show damage and healing done by the enemy.\n\n|cFFFFFF00-|r Added an option under miscellaneous to show neutral and hostile creatures on damage taken display.\n\n|cFFFFFF00-|r Added an option to ignore nicknames and always use character names.\n\n|cFFFFFF00-|r Enabling the display icon on title bar now makes the title text automatically move slightly to right.\n\n|cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n|cFFFFFF00v3.9.4 (|cFFFFCC00Feb 03, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option 'Ignore Mass Toggle', when enabled the window won't be affected when hiding, showing or toggling all windows.\n\n|cFFFFFF00-|r Added window number for slash commands 'hide', 'show' and 'toggle'. Usage: '/details hide 1' to hide window 1.\n\n|cFFFFFF00-|r Removed keybinds for Open and Close, added toggle instead.\n\n|cFFFFFF00-|r Added slash command 'toggle'.\n\n|cFFFFFF00-|r Added display icons for all skins which still didn't have they.\n\n|cFFFFFF00-|r Improved 'Align with right chat' tool, now it also supports Forced Square skin.\n\n|cFFFFFF00-|r Improvements on Bookmark panel.\n\n|cFFFFFF00-|r Improvements on spec icons with transparency.\n\n|cFFFFFF00-|r Created custom spell for Living Bomb explosion.\n\n|cFFFFFF00-|r Fixed statusbar textures and mini displays.\n\n|cFFFFFF00-|r Fixed an issue with title bar buttons when toggling the titlebar anchor from bottom to top position.\n\n|cFFFFFF00-|r Fixed an issue with title bar text when toggling the statusbar position from bottom to top.\n\n|cFFFFFF00-|r Fixed yet another bug with avoidance tab on player detail window.\n\n|cFFFFFF00-|r Fixed the window ungroup button (above the resize one).\n\n|cFFFFFF00v3.8.13 (|cFFFFCC00Jan 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r RaidCheck (plugin): added an option to be able to use the report panel.\n\n|cFFFFFF00-|r You Are Not Prepared (plugin): added Auto Close the window, can be disabled through its options panel.\n\n|cFFFFFF00-|r Vanguard (plugin): Added Options Panel.\n\n|cFFFFFF00-|r Details! is now using 'LibWindow-1.1' to save and restore the positioning of the windows, bug might appear, please report if something weird happen.\n\n|cFFFFFF00-|r Improved specialization detection in order to try detect spec changes.\n\n|cFFFFFF00-|r Added options to change the brackets and the separator for dps/percent block.\n\n|cFFFFFF00-|r Added options for show (or hide) totals, dps and percent amount.\n\n|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click.\n\n|cFFFFFF00-|r Fixed positioning after reopen a window previously closed on last logon.\n\n|cFFFFFF00-|r Fixed enemies display where sometimes the bars were black instead of red.\n\n|cFFFFFF00-|r Fixed few places where spec icons wasn't being used on.\n\n|cFFFFFF00-|r Fixed avoidance panel on Player Details Window where sometimes was giving errors.\n\n|cFFFFFF00-|r Fixed priest shadow and holy detection.\n\n|cFFFFFF00-|r Fixed blood and unholy spec icons.\n\n|cFFFFFF00-|r Fixed an issue with 'Always Show me' feature where it was showing the player on Enemies display.\n\n|cFFFFFF00v3.8.1 (|cFFFFCC00Jan 17, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin Vanguard: got full rewrite and now it is more easy to use.\n\n|cFFFFFF00-|r Plugin TimeAttack: fixed problem where sometimes required a reload to start a new time.\n\n|cFFFFFF00-|r Plugin Damage the Game!: fixed a problem where sometimes the time didn't started after level 2.\n\n|cFFFFFF00-|r Added specialization icons.\n\n|cFFFFFF00-|r Fixed Auto-Hide where it wasn't hiding the wallpaper of the window.\n\n|cFFFFFF00-|r Added 'Editing Group' check box on option panel, when enabled, settings changed also are modified on all windows in the group.\n\n|cFFFFFF00-|r Changing window's skin, doesn't change any more settings not related with appearance, for example, Auto-Hide, Switches.\n\n|cFFFFFF00-|r Custom display 'Health Potion & Stone' now also track Healing Tonic.\n\n|cFFFFFF00-|r Custom display 'Damage Taken by Spell' now tracks more spells and also melee hits.\n\n|cFFFFFF00-|r Menus now uses 'Friz Quadrata TT' font as default, also added an option to change it on options panel -> miscellaneous.\n\n|cFFFFFF00-|r 'Switch to Current' feature now switches all windows which have this option enabled.\n\n|cFFFFFF00-|r The message telling to use '/details reinstall' now only shows if a problem happen during the addon load process.\n\n|cFFFFFF00-|r Segments Saved option now can be set to 25, up from 5.\n\n|cFFFFFF00-|r Attempt to fix the bug with the monk spell 'Storm, Earth, and Fire'.\n\n|cFFFFFF00-|r Fixed 'Icon Pick' panel.\n\n|cFFFFFF00-|r Fixed bug when reporting friendly fire through player detail window.\n\n|cFFFFFF00-|r Fixed bug with report window where sometimes it was reporting on a wrong channel.\n\n|cFFFFFF00v3.7.1 (|cFFFFCC00Jan 08, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin 'Damage Rank': is now called 'Damage, the Game!' and had its levels adjusted for WoD.\n\n|cFFFFFF00-|r Plugin 'Tiny Threat': fixed player name where it was showing the realm name too.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed frame details (clicking on a bar) shown behind the Vanguard panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed a problem when clicking with right button wasn't opening the bookmark panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': incoming heals now count shield amount on the player too.\n\n|cFFFFFF00-|r Plugin 'Vanguard' Known Bug: incoming damage and melee vs avoidance seems to be inaccurate by now, we need more time to study and fix it.\n\n|cFFFFFF00-|r Added Twins Ogron's Charge as custom spells, one for the charge by him self and other for the copies (mythic only).\n\n|cFFFFFF00-|r Added option panel for Raid Check plugin.\n\n|cFFFFFF00-|r Added key bindings for open a window, close a window and select a bookmark.\n\n|cFFFFFF00-|r Added 'CTRL + RightClick' closes a window.\n\n|cFFFFFF00-|r Fixed wallpaper transparency after releasing the window from a stretch.|cFFFFFF00-|r Fixed few issues when using class text colors.\n\n|cFFFFFF00-|r Fixed characters name outside instances, now it replaces the realm name with a * and show the complete name on tooltip.\n\n|cFFFFFF00-|r Fixed damage mitigation on damage taken, this affects only specific classes like monk tank.\n\n|cFFFFFF00-|r Fixed auto erase poping up when the player enters on its garrison.\n\n|cFFFFFF00-|r Fixed combat on garrison training dummies which was being marked as Trash Segment.\n\n|cFFFFFF00-|r Fixed command /details disable, wasn't disabling the capture of cooldowns.\n\n|cFFFFFF00-|r Fixed a problem with fast dps/hps when the window is in a empty segment.\n\n|cFFFFFF00-|r Fixed an issue using bookmark panel where it wasn't changing the display when the window is in a plugin mode.\n\n|cFFFFFF00-|r Fixed a bug when bars isn't using class colors on Frags, Auras & Void Zones, Resources and Deaths.\n\n|cFFFFFF00-|r Fixed bar animations when 'Sort Direction' is set to bottom.\n\n|cFFFFFF00-|r Fixed the spam 'you are not in a guild' when checking for new versions.\n\n|cFFFFFF00-|r Fixed translations for Auto Hide Settings bracket under options panel.\n\n|cFFFFFF00-|r Fixed Auto Hide -> Mouse Interaction tool where wans't able to work okey during combat.\n\n|cFFFFFF00v3.6.14b (|cFFFFCC00Jan 01, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added custom display 'My Spells' which shows your spells in the window.\n\n|cFFFFFF00-|r Added new custom display: Health Potion & Stone.\n\n|cFFFFFF00-|r Added overkill on death's tooltip.\n\n|cFFFFFF00-|r Created custom spells for Twin Ogron's Pulverize. Now it has 3 spells one for each wave.\n\n|cFFFFFF00-|r Created custom spells for Ko'ragh Overflowing Energy. Now it has 2 spells one for when the ball is catched and other when it reaches the ground and explodes.\n\n|cFFFFFF00-|r Changed healing multistrike to use the same format as damage done.\n\n|cFFFFFF00-|r Few improvements on Tiny Threat plugin: color gradient green-red is fixed, texts and bar texture now correctly uses the window settings.\n\n|cFFFFFF00-|r Damage Taken by Spell won't show pets in its tooltip any more.\n\n|cFFFFFF00-|r Enemies display won't show any more mirror images and spirit link totems.\n\n|cFFFFFF00-|r Enemies's tooltip now only show players and show all players instead of only 6.\n\n|cFFFFFF00-|r Few cooldowns shown as raid wide now shows as personal cooldowns.\n\n|cFFFFFF00-|r Fixed dispell tagets on dispell's tooltip.\n\n|cFFFFFF00-|r Fixed 'First Hit' raid tool.\n\n|cFFFFFF00-|r Fixed 'Open Options Panel' from interface panel." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index baf70375..03e4c787 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -201,13 +201,13 @@ local npcid2 = _detalhes:GetNpcIdFromGuid (t2.serial) if (not ignored_enemy_npcs [npcid1] and not ignored_enemy_npcs [npcid2]) then - return t1.total > t2.total + return t1.damage_taken > t2.damage_taken elseif (ignored_enemy_npcs [npcid1] and not ignored_enemy_npcs [npcid2]) then return false elseif (not ignored_enemy_npcs [npcid1] and ignored_enemy_npcs [npcid2]) then return true else - return t1.total > t2.total + return t1.damage_taken > t2.damage_taken end elseif (a ~= 0 and b == 0) then @@ -853,6 +853,9 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex keyName = "last_dps" elseif (sub_atributo == 3) then --> TAMAGE TAKEN keyName = "damage_taken" + if (_detalhes.damage_taken_everything) then + modo = modo_ALL + end elseif (sub_atributo == 4) then --> FRIENDLY FIRE keyName = "friendlyfire_total" elseif (sub_atributo == 5) then --> FRAGS @@ -1050,7 +1053,8 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex if (keyName == "enemies") then - amount, total = _detalhes:ContainerSortEnemies (conteudo, amount, "total") + --amount, total = _detalhes:ContainerSortEnemies (conteudo, amount, "total") + amount, total = _detalhes:ContainerSortEnemies (conteudo, amount, "damage_taken") --keyName = "enemies" --> grava o total instancia.top = conteudo[1][keyName] @@ -1549,6 +1553,32 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra, elseif (sub_atributo == 6) then --> mostrando enemies + local dtps = self.damage_taken / combat_time + + local formated_damage_taken = SelectedToKFunction (_, self.damage_taken) + local formated_dtps = SelectedToKFunction (_, dtps) + esta_barra.ps_text = formated_dtps + + if (UsingCustomRightText) then + esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage_taken, formated_dtps, porcentagem, self, instancia.showing)) + else + if (not bars_show_data [1]) then + formated_damage_taken = "" + end + if (not bars_show_data [2]) then + formated_dtps = "" + end + if (not bars_show_data [3]) then + porcentagem = "" + else + porcentagem = porcentagem .. "%" + end + esta_barra.texto_direita:SetText (formated_damage_taken .. bars_brackets[1] .. formated_dtps .. bars_separator .. porcentagem .. bars_brackets[2]) + end + + esta_porcentagem = _math_floor ((self.damage_taken/instancia.top) * 100) + + --[[ dps = _math_floor (dps) local formated_damage = SelectedToKFunction (_, damage_total) local formated_dps = SelectedToKFunction (_, dps) @@ -1573,7 +1603,7 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra, end esta_porcentagem = _math_floor ((damage_total/instancia.top) * 100) - + --]] end if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --> precisa atualizar o tooltip @@ -2068,49 +2098,15 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown) local meus_agressores = {} - if (instancia.sub_atributo == 6) then - for nome, _ in _pairs (agressores) do --> agressores seria a lista de nomes - local este_agressor = showing._ActorTable [showing._NameIndexTable [nome]] - if (este_agressor) then --> checagem por causa do total e do garbage collector que não limpa os nomes que deram dano + for nome, _ in _pairs (agressores) do --> lista de nomes + local este_agressor = showing._ActorTable [showing._NameIndexTable [nome]] + if (este_agressor) then --> checagem por causa do total e do garbage collector que não limpa os nomes que deram dano + local name = nome + local damage_amount = este_agressor.targets [self.nome] - local name = nome - local damage_amount = este_agressor.targets [self.nome] - - if (damage_amount) then - - if (este_agressor:IsPlayer()) then - meus_agressores [#meus_agressores+1] = {name, damage_amount, este_agressor.classe} - end - --[[ - if (not este_agressor:IsPlayer()) then - name = Loc ["STRING_TARGETS_OTHER1"] - local got - for i, t in _ipairs (meus_agressores) do - if (t[1] == name) then - t[2] = t[2] + damage_amount - got = true - break - end - end - if (not got) then - meus_agressores [#meus_agressores+1] = {name, damage_amount, este_agressor.classe} - end - else - meus_agressores [#meus_agressores+1] = {name, damage_amount, este_agressor.classe} - end - --]] - end - - end - end - else - for nome, _ in _pairs (agressores) do --> agressores seria a lista de nomes - local este_agressor = showing._ActorTable [showing._NameIndexTable [nome]] - if (este_agressor) then --> checagem por causa do total e do garbage collector que não limpa os nomes que deram dano - local alvos = este_agressor.targets - local este_alvo = alvos [self.nome] - if (este_alvo) then - meus_agressores [#meus_agressores+1] = {nome, este_alvo, este_agressor.classe} + if (damage_amount) then + if (este_agressor:IsPlayer() or este_agressor:IsNeutralOrEnemy()) then + meus_agressores [#meus_agressores+1] = {name, damage_amount, este_agressor.classe, este_agressor} end end end @@ -2119,12 +2115,12 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown) _table_sort (meus_agressores, _detalhes.Sort2) local max = #meus_agressores - if (max > 6) then - max = 6 + if (max > 10) then + max = 10 end local ismaximized = false - if (keydown == "shift" or TooltipMaximizedMethod == 2 or TooltipMaximizedMethod == 3 or instancia.sub_atributo == 6) then + if (keydown == "shift" or TooltipMaximizedMethod == 2 or TooltipMaximizedMethod == 3 or instancia.sub_atributo == 6 or _detalhes.damage_taken_everything) then max = #meus_agressores ismaximized = true end @@ -2155,23 +2151,64 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown) end for i = 1, max do - if (ismaximized and meus_agressores[i][1]:find (_detalhes.playername)) then - GameCooltip:AddLine (meus_agressores[i][1]..": ", FormatTooltipNumber (_, meus_agressores[i][2]).." (".._cstr("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)", nil, "yellow") - else - GameCooltip:AddLine (meus_agressores[i][1]..": ", FormatTooltipNumber (_, meus_agressores[i][2]).." (".._cstr("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)") - end - local classe = meus_agressores[i][3] + + local aggressor = meus_agressores[i][4] + if (aggressor:IsNeutralOrEnemy()) then - if (not classe) then - classe = "UNKNOW" - end + local all_spells = {} - if (classe == "UNKNOW") then - GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1) + for spellid, spell in _pairs (aggressor.spells._ActorTable) do + local on_target = spell.targets [self.nome] + if (on_target) then + tinsert (all_spells, {spellid, on_target, aggressor.nome}) + end + end + + for _, spell in _ipairs (all_spells) do + local spellname, _, spellicon = _GetSpellInfo (spell [1]) + GameCooltip:AddLine (spellname .. " (|cFFFFFF00" .. spell [3] .. "|r): ", FormatTooltipNumber (_, spell [2]).." (" .. _cstr ("%.1f", (spell [2] / damage_taken) * 100).."%)") + GameCooltip:AddIcon (spellicon, 1, 1, 14, 14) + _detalhes:AddTooltipBackgroundStatusbar() + end + else - GameCooltip:AddIcon (instancia.row_info.icon_file, nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe])) + if (ismaximized and meus_agressores[i][1]:find (_detalhes.playername)) then + GameCooltip:AddLine (meus_agressores[i][1]..": ", FormatTooltipNumber (_, meus_agressores[i][2]).." (".._cstr("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)", nil, "yellow") + else + GameCooltip:AddLine (meus_agressores[i][1]..": ", FormatTooltipNumber (_, meus_agressores[i][2]).." (".._cstr("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)") + end + local classe = meus_agressores[i][3] + + if (not classe) then + classe = "UNKNOW" + end + + if (classe == "UNKNOW") then + GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1) + else + GameCooltip:AddIcon (instancia.row_info.icon_file, nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe])) + end + _detalhes:AddTooltipBackgroundStatusbar() end + end + + if (instancia.sub_atributo == 6) then + + GameCooltip:AddLine (" ") + GameCooltip:AddLine (Loc ["STRING_ATTRIBUTE_DAMAGE_DONE"], FormatTooltipNumber (_, _math_floor (self.total))) + local half = 0.00048828125 + GameCooltip:AddIcon (instancia:GetSkinTexture(), 1, 1, 14, 14, 0.005859375 + half, 0.025390625 - half, 0.3623046875, 0.3818359375) _detalhes:AddTooltipBackgroundStatusbar() + + local heal_actor = instancia.showing (2, self.nome) + if (heal_actor) then + GameCooltip:AddLine (Loc ["STRING_ATTRIBUTE_HEAL_DONE"], FormatTooltipNumber (_, _math_floor (heal_actor.heal_enemy_amt))) + else + GameCooltip:AddLine (Loc ["STRING_ATTRIBUTE_HEAL_DONE"], 0) + end + GameCooltip:AddIcon (instancia:GetSkinTexture(), 1, 1, 14, 14, 0.037109375 + half, 0.056640625 - half, 0.3623046875, 0.3818359375) + _detalhes:AddTooltipBackgroundStatusbar() + end --> enemies diff --git a/classes/classe_instancia.lua b/classes/classe_instancia.lua index 3f3a70f4..534c8aec 100644 --- a/classes/classe_instancia.lua +++ b/classes/classe_instancia.lua @@ -259,6 +259,14 @@ function _detalhes:GetRow (index) return self.barras [index] end +function _detalhes:GetSkin() + return _detalhes.skins [self.skin] +end + +function _detalhes:GetSkinTexture() + return _detalhes.skins [self.skin] and _detalhes.skins [self.skin].file +end + ------------------------------------------------------------------------------------------------------------------------ --> retorna se a instância esta ou não ativa diff --git a/functions/profiles.lua b/functions/profiles.lua index fad38ec9..6a260364 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -835,12 +835,13 @@ local default_profile = { --> PvP only_pvp_frags = false, - --> window size + --> window settings max_window_size = {width = 480, height = 450}, new_window_size = {width = 320, height = 130}, window_clamp = {-8, 0, 21, -14}, disable_window_groups = false, disable_reset_button = false, + damage_taken_everything = false, --> segments segments_amount = 12, diff --git a/gumps/janela_info.lua b/gumps/janela_info.lua index d492d538..72cd8b0e 100644 --- a/gumps/janela_info.lua +++ b/gumps/janela_info.lua @@ -200,6 +200,20 @@ function _detalhes:AbreJanelaInfo (jogador, from_att_change) info.classe_iconePlus:SetTexture() end + if (jogador.grupo and IsInRaid() and not avatar) then + for i = 1, GetNumGroupMembers() do + local playerName, realmName = UnitName ("raid" .. i) + if (realmName and realmName ~= "") then + playerName = playerName .. "-" .. realmName + end + if (playerName == jogador.nome) then + SetPortraitTexture (info.classe_icone, "raid" .. i) + info.classe_icone:SetTexCoord (0, 1, 0, 1) + break + end + end + end + info:ShowTabs() gump:Fade (info, 0) diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index 0e15e953..c23ad659 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -2201,6 +2201,18 @@ function window:CreateFrame18() end window:CreateLineBackground2 (frame18, "DisableResetSlider", "DisableResetLabel", Loc ["STRING_OPTIONS_DISABLE_RESET_DESC"]) + + --> damage taken always on everything + g:NewLabel (frame18, _, "$parentDamageTakenEverythingLabel", "DamageTakenEverythingLabel", Loc ["STRING_OPTIONS_DTAKEN_EVERYTHING"], "GameFontHighlightLeft") + g:NewSwitch (frame18, _, "$parentDamageTakenEverythingSlider", "DamageTakenEverythingSlider", 60, 20, _, _, _detalhes.damage_taken_everything) + + frame18.DamageTakenEverythingSlider:SetPoint ("left", frame18.DamageTakenEverythingLabel, "right", 2) + frame18.DamageTakenEverythingSlider.OnSwitch = function (_, _, value) + _detalhes.damage_taken_everything = value + _detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance) + end + + window:CreateLineBackground2 (frame18, "DamageTakenEverythingSlider", "DamageTakenEverythingLabel", Loc ["STRING_OPTIONS_DTAKEN_EVERYTHING_DESC"]) --> Use Scroll Bar g:NewLabel (frame18, _, "$parentUseScrollLabel", "scrollLabel", Loc ["STRING_OPTIONS_SCROLLBAR"], "GameFontHighlightLeft") @@ -2313,7 +2325,8 @@ function window:CreateFrame18() {"fontLabel", 4}, {"DisableGroupsLabel", 5, true}, {"DisableResetLabel", 6}, - {"scrollLabel", 7}, + {"DamageTakenEverythingLabel", 7}, + {"scrollLabel", 8, true}, } @@ -4121,22 +4134,31 @@ function window:CreateFrame2() g:NewSwitch (frame2, _, "$parentOverallDataAllSlider", "OverallDataAllSlider", 60, 20, _, _, false) frame2.OverallDataAllSlider:SetPoint ("left", frame2.OverallDataAllLabel, "right", 2, 0) -- + + function frame2:OverallSliderEnabled() + frame2.OverallDataRaidBossSlider:Disable() + frame2.OverallDataRaidCleaupSlider:Disable() + frame2.OverallDataDungeonBossSlider:Disable() + frame2.OverallDataDungeonCleaupSlider:Disable() + end + + function frame2:OverallSliderDisabled() + frame2.OverallDataRaidBossSlider:Enable() + frame2.OverallDataRaidCleaupSlider:Enable() + frame2.OverallDataDungeonBossSlider:Enable() + frame2.OverallDataDungeonCleaupSlider:Enable() + end + frame2.OverallDataAllSlider.OnSwitch = function (self, _, value) + if (value and bit.band (_detalhes.overall_flag, 0x10) == 0) then _detalhes.overall_flag = _detalhes.overall_flag + 0x10 - - frame2.OverallDataRaidBossSlider:Disable() - frame2.OverallDataRaidCleaupSlider:Disable() - frame2.OverallDataDungeonBossSlider:Disable() - frame2.OverallDataDungeonCleaupSlider:Disable() + frame2:OverallSliderEnabled() elseif (not value and bit.band (_detalhes.overall_flag, 0x10) ~= 0) then _detalhes.overall_flag = _detalhes.overall_flag - 0x10 - - frame2.OverallDataRaidBossSlider:Enable() - frame2.OverallDataRaidCleaupSlider:Enable() - frame2.OverallDataDungeonBossSlider:Enable() - frame2.OverallDataDungeonCleaupSlider:Enable() + frame2:OverallSliderDisabled() + end _detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance) @@ -9917,7 +9939,14 @@ end --> if not window _G.DetailsOptionsWindow2OverallDataRaidCleaupSlider.MyObject:SetValue (bit.band (_detalhes.overall_flag, 0x2) ~= 0) _G.DetailsOptionsWindow2OverallDataDungeonBossSlider.MyObject:SetValue (bit.band (_detalhes.overall_flag, 0x4) ~= 0) _G.DetailsOptionsWindow2OverallDataDungeonCleaupSlider.MyObject:SetValue (bit.band (_detalhes.overall_flag, 0x8) ~= 0) - _G.DetailsOptionsWindow2OverallDataAllSlider.MyObject:SetValue (bit.band (_detalhes.overall_flag, 0x10) ~= 0) + + local overall_state = bit.band (_detalhes.overall_flag, 0x10) ~= 0 + _G.DetailsOptionsWindow2OverallDataAllSlider.MyObject:SetValue (overall_state) + if (overall_state) then + _G.DetailsOptionsWindow2:OverallSliderEnabled() + else + _G.DetailsOptionsWindow2:OverallSliderDisabled() + end _G.DetailsOptionsWindow2OverallNewBossSlider.MyObject:SetValue (_detalhes.overall_clear_newboss) _G.DetailsOptionsWindow2OverallNewChallengeSlider.MyObject:SetValue (_detalhes.overall_clear_newchallenge) @@ -10187,6 +10216,7 @@ end --> if not window --disable reset _G.DetailsOptionsWindow18DisableResetSlider.MyObject:SetValue (_detalhes.disable_reset_button) _G.DetailsOptionsWindow18UseScrollSlider.MyObject:SetValue (_detalhes.use_scroll) + _G.DetailsOptionsWindow18DamageTakenEverythingSlider.MyObject:SetValue (_detalhes.damage_taken_everything) --auto switch local switch_tank_in_combat = editing_instance.switch_tank_in_combat