diff --git a/boot.lua b/boot.lua index 1e77a190..a072dd71 100644 --- a/boot.lua +++ b/boot.lua @@ -3,8 +3,8 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 559 --it's 559 for release - _detalhes.userversion = "v3.9.9" + _detalhes.build_counter = 565 --it's 565 for release + _detalhes.userversion = "v3.9.10" _detalhes.realversion = 59 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -34,9 +34,9 @@ do |cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n --]] ---|cFFFFFF00v3.9.9 (|cFFFFCC00Feb 11, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Chart Viewer (plugin): has been revamped and now it's less complicated to use (i'd say, now it is usable :).\n\n|cFFFFFF00-|r Time Line (plugin): added options to change the background color and scale.\n\n|cFFFFFF00-|r Raid Check (plugin): its window is now 'always on top'.\n\n|cFFFFFF00-|r Accuracy adjustments on overheal of Divine Aegis and Illuminated Healing.\n\n|cFFFFFF00-|r Removed healthstone from cooldown list, added Nature's Vigil.\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.10 (|cFFFFCC00Feb 11, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Chart Viewer (plugin): has been revamped and now it's less complicated to use (i'd say, now it is usable :).\n\n|cFFFFFF00-|r Time Line (plugin): added options to change the background color and scale.\n\n|cFFFFFF00-|r Raid Check (plugin): its window is now 'always on top'.\n\n|cFFFFFF00-|r Accuracy adjustments on overheal of Divine Aegis and Illuminated Healing.\n\n|cFFFFFF00-|r Removed healthstone from cooldown list, added Nature's Vigil.\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.9 (|cFFFFCC00Feb 11, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Chart Viewer (plugin): has been revamped and now it's less complicated to use (i'd say, now it is usable :).\n\n|cFFFFFF00-|r Time Line (plugin): added options to change the background color and scale.\n\n|cFFFFFF00-|r Raid Check (plugin): its window is now 'always on top'.\n\n|cFFFFFF00-|r Accuracy adjustments on overheal of Divine Aegis and Illuminated Healing.\n\n|cFFFFFF00-|r Removed healthstone from cooldown list, added Nature's Vigil.\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." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.9.10 (|cFFFFCC00Feb 12, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Chart Viewer (plugin): has been revamped and now it's less complicated to use (i'd say, now it is usable :).\n\n|cFFFFFF00-|r Time Line (plugin): added options to change the background color and scale.\n\n|cFFFFFF00-|r Raid Check (plugin): its window is now 'always on top'.\n\n|cFFFFFF00-|r Accuracy adjustments on overheal of Divine Aegis and Illuminated Healing.\n\n|cFFFFFF00-|r Removed healthstone from cooldown list, added Nature's Vigil.\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." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_custom.lua b/classes/classe_custom.lua index 96717531..d38d3bf0 100644 --- a/classes/classe_custom.lua +++ b/classes/classe_custom.lua @@ -498,11 +498,17 @@ -- update tooltip function-- if (self.id) then + + --if (self.id == 1) then + -- self.classe = 1 + --end + local school_color = _detalhes.school_colors [self.classe] if (not school_color) then school_color = _detalhes.school_colors ["unknown"] end actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (school_color) + else actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor() end @@ -1501,7 +1507,12 @@ desc = Loc ["STRING_CUSTOM_DTBS_DESC"], source = false, target = false, - script_version = 13, + script_version = 20, + on_shift_click = [[ + local row, object, instance = ... + local spellname, _, spellicon = _detalhes.GetSpellInfo (object.id) + _detalhes:OpenAuraPanel (object.id, spellname, spellicon) + ]], script = [[ --> get the parameters passed local combat, instance_container, instance = ... @@ -1527,52 +1538,29 @@ if (source) then - local AllSpells = source:GetSpellList() - for spellid, spell in pairs (AllSpells) do - local on_player = spell.targets [character.nome] + if (not source:IsPlayer()) then + + local AllSpells = source:GetSpellList() + for spellid, spell in pairs (AllSpells) do + local on_player = spell.targets [character.nome] + + if (on_player and on_player >= 1) then + instance_container:AddValue (spell, on_player) + total = total + on_player + local value = instance_container:GetValue (spell) + if (value > top) then + top = value + end + if (not NoRepeat [spellid]) then + amount = amount + 1 + NoRepeat [spellid] = true + end + end + end + + else ------------- - if (on_player and on_player >= 1) then - instance_container:AddValue (spell, on_player) - total = total + on_player - local value = instance_container:GetValue (spell) - if (value > top) then - top = value - end - if (not NoRepeat [spellid]) then - amount = amount + 1 - NoRepeat [spellid] = true - end - end - end - - ------------- - - local friendlyfire = source.friendlyfire [character.nome] - if (friendlyfire and friendlyfire.total >= 1) then - for _spellid, _on_player in pairs (friendlyfire.spells) do - local _spellname = GetSpellInfo (_spellid) - local _object - local _index = instance_container._NameIndexTable [_spellname] - if (_index) then - _object = instance_container._ActorTable [_index] - else - _object = {id = _spellid, spellschool = 1} - end - - instance_container:AddValue (_object, _on_player) - total = total + _on_player - local _value = instance_container:GetValue (_object) - if (_value > top) then - top = _value - end - if (not NoRepeat [_spellid]) then - amount = amount + 1 - NoRepeat [_spellid] = true - end - end - end - - ------------ + end ----------- end end end @@ -1660,6 +1648,12 @@ GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small_alpha", 1, 1, 14, 14, 0.25, 0.49609375, 0.75, 1) end end + + if (WeakAuras) then + GameCooltip:AddLine (" ") + GameCooltip:AddLine ("Shift Click: Create WeakAura") + GameCooltip:AddStatusBar (100, 1, 0, 0, 0, 0.6, true, bar_background) + end ]], } diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index 33faac68..02b81f5d 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -157,6 +157,7 @@ [31216] = true, --mirror image [53006] = true, --spirit link totem [63508] = true, --xuen + [73967] = true, --xuen } -- Night-Twisted Brute - Creature-0-3024-1228-19402-85241-00001E2097 @@ -473,12 +474,13 @@ function atributo_damage:ReportSingleFragsLine (frag, instancia) local barra = instancia.barras [frag.minha_barra] - local reportar = {"Details! " .. Loc ["STRING_ATTRIBUTE_DAMAGE_TAKEN"].. ": " .. frag [1]} --> localize-me - for i = 1, GameCooltip:GetNumLines() do + local reportar = {"Details!: " .. frag [1] .. " - " .. Loc ["STRING_ATTRIBUTE_DAMAGE_TAKEN"]} + + for i = 2, GameCooltip:GetNumLines()-2 do local texto_left, texto_right = GameCooltip:GetText (i) if (texto_left and texto_right) then texto_left = texto_left:gsub (("|T(.*)|t "), "") - reportar [#reportar+1] = ""..texto_left.." "..texto_right.."" + reportar [#reportar+1] = "" .. texto_left .. " ....... " .. texto_right end end @@ -575,12 +577,12 @@ function atributo_damage:ReportSingleVoidZoneLine (actor, instancia) local barra = instancia.barras [actor.minha_barra] - local reportar = {"Details! " .. Loc ["STRING_ATTRIBUTE_DAMAGE_DEBUFFS_REPORT"] .. ": " .. actor.nome} --> localize-me - for i = 1, GameCooltip:GetNumLines() do + local reportar = {"Details!: " .. actor.nome .. " - " .. Loc ["STRING_ATTRIBUTE_DAMAGE_DEBUFFS_REPORT"]} + for i = 2, GameCooltip:GetNumLines()-2 do local texto_left, texto_right = GameCooltip:GetText (i) if (texto_left and texto_right) then texto_left = texto_left:gsub (("|T(.*)|t "), "") - reportar [#reportar+1] = ""..texto_left.." "..texto_right.."" + reportar [#reportar+1] = "" .. texto_left .. " ..... " .. texto_right end end @@ -830,6 +832,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 @@ -1027,7 +1032,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex total = index if (exportar) then - return vtable + return voidzone_damage_total, "damage", instancia.top, total, vtable end if (total < 1) then @@ -2350,6 +2355,7 @@ function atributo_damage:MontaDetalhes (spellid, barra) return self:MontaDetalhesDamageDone (spellid, barra) end return self:MontaDetalhesEnemy (spellid, barra) + --return self:MontaDetalhesDamageDone (spellid, barra) end end @@ -2557,11 +2563,13 @@ end row.textura:SetValue (value/max*100) end - --end row.texto_esquerdo:SetText (index .. ". " .. name) - --> seta o texto da direita + row.texto_esquerdo.text = row.texto_esquerdo:GetText() + row.texto_direita:SetText (value_formated .. " (" .. _cstr ("%.1f", percent) .."%)") + row.texto_esquerdo:SetSize (row:GetWidth() - row.texto_direita:GetStringWidth() - 40, 15) + --> seta o icone if (icon) then row.icone:SetTexture (icon) @@ -2691,7 +2699,7 @@ function atributo_damage:MontaInfoDamageDone() end self:FocusLock (barra, tabela[1]) - + end --> TOP INIMIGOS @@ -2927,6 +2935,20 @@ function atributo_damage:MontaDetalhesEnemy (spellid, barra) local container = info.instancia.showing[1] local barras = info.barras3 local instancia = info.instancia + + local other_actor = barra.other_actor + if (other_actor) then + self = other_actor + end + + if (barra.texto_esquerdo:IsTruncated()) then + _detalhes:CooltipPreset (2) + GameCooltip:SetOption ("FixedWidth", nil) + GameCooltip:AddLine (barra.texto_esquerdo.text) + GameCooltip:SetOwner (barra, "bottomleft", "topleft", 5, -10) + GameCooltip:ShowCooltip() + end + local spell = self.spells:PegaHabilidade (spellid) local targets = spell.targets diff --git a/classes/classe_heal.lua b/classes/classe_heal.lua index 995c9856..3bc9d014 100644 --- a/classes/classe_heal.lua +++ b/classes/classe_heal.lua @@ -182,8 +182,8 @@ end function atributo_heal:ReportSingleDamagePreventedLine (actor, instancia) local barra = instancia.barras [actor.minha_barra] - local reportar = {"Details! " .. Loc ["STRING_ATTRIBUTE_HEAL_PREVENT"].. ": " .. actor.nome} --> localize-me - for i = 1, GameCooltip:GetNumLines() do + local reportar = {"Details!: " .. actor.nome .. " - " .. Loc ["STRING_ATTRIBUTE_HEAL_PREVENT"]} + for i = 2, GameCooltip:GetNumLines()-2 do local texto_left, texto_right = GameCooltip:GetText (i) if (texto_left and texto_right) then texto_left = texto_left:gsub (("|T(.*)|t "), "") diff --git a/classes/classe_instancia.lua b/classes/classe_instancia.lua index 534c8aec..436d3cf8 100644 --- a/classes/classe_instancia.lua +++ b/classes/classe_instancia.lua @@ -2705,9 +2705,8 @@ function _detalhes:monta_relatorio (este_relatorio, custom) local atributo = self.atributo local container = self.showing [atributo]._ActorTable - --print ("amt: ",#container) - if (atributo == 1) then --> damage + if (self.sub_atributo == 5) then --> frags local frags = self.showing.frags local reportarFrags = {} @@ -2716,7 +2715,14 @@ function _detalhes:monta_relatorio (este_relatorio, custom) reportarFrags [#reportarFrags+1] = {frag = tostring (amount), nome = name} end container = reportarFrags + container_amount = #reportarFrags keyName = "frag" + + elseif (self.sub_atributo == 7) then --> auras e voidzones + + total, keyName, first, container_amount, container = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true) + + else total, keyName, first, container_amount = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true) if (self.sub_atributo == 1) then diff --git a/classes/classe_others.lua b/classes/classe_others.lua index a507da55..7677a906 100644 --- a/classes/classe_others.lua +++ b/classes/classe_others.lua @@ -207,11 +207,12 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown) if (overkill > 0) then amount = amount - overkill overkill = " (" .. _detalhes:ToK (overkill) .. " |cFFFF8800overkill|r)" + GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s |cFFFFFF00" .. spellname .. "|r (|cFFC6B0D9" .. source .. "|r)", "-" .. _detalhes:ToK (amount) .. overkill .. " (" .. hp .. "%)", 1, "white", "white") else overkill = "" + GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (|cFFC6B0D9" .. source .. "|r)", "-" .. _detalhes:ToK (amount) .. overkill .. " (" .. hp .. "%)", 1, "white", "white") end - GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "-" .. _detalhes:ToK (amount) .. overkill .. " (" .. hp .. "%)", 1, "white", "white") GameCooltip:AddIcon (spellicon) if (event [9]) then @@ -223,7 +224,7 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown) end else --> heal - GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white") + GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white") GameCooltip:AddIcon (spellicon) GameCooltip:AddStatusBar (hp, 1, "green", true) @@ -381,41 +382,50 @@ end function atributo_misc:ReportSingleCooldownLine (misc_actor, instancia) - local barra = misc_actor.minha_barra - - local reportar = {"Details! " .. Loc ["STRING_REPORT_SINGLE_COOLDOWN"] .. " " .. barra.texto_esquerdo:GetText()} --> localize-me - reportar [#reportar+1] = "> " .. Loc ["STRING_SPELLS"] .. ":" + local reportar = {"Details!: " .. misc_actor.nome .. " - " .. Loc ["STRING_ATTRIBUTE_MISC_DEFENSIVE_COOLDOWNS"]} - for i = 1, GameCooltip:GetNumLines() do - local texto_left, texto_right = GameCooltip:GetText (i) + local meu_total = _math_floor (misc_actor.cooldowns_defensive) + local cooldowns = misc_actor.cooldowns_defensive_spells._ActorTable + local cooldowns_used = {} + + for spellid, spell in _pairs (cooldowns) do + cooldowns_used [#cooldowns_used+1] = {spellid, spell.counter, spell} + end + _table_sort (cooldowns_used, _detalhes.Sort2) + + for i, spell in _ipairs (cooldowns_used) do - if (texto_left and texto_right) then - texto_left = texto_left:gsub (("|T(.*)|t "), "") - reportar [#reportar+1] = " "..texto_left.." "..texto_right.."" - elseif (i ~= 1) then - reportar [#reportar+1] = "> " .. Loc ["STRING_TARGETS"] .. ":" + local spelllink = GetSpellLink (spell [1]) + reportar [#reportar+1] = spelllink .. ": " .. spell [2] + + for target_name, amount in _pairs (spell[3].targets) do + if (target_name ~= misc_actor.nome and target_name ~= Loc ["STRING_RAID_WIDE"] and amount > 0) then + reportar [#reportar+1] = " -" .. target_name .. ": " .. amount + end end + end return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true}) end function atributo_misc:ReportSingleBuffUptimeLine (misc_actor, instancia) - - local barra = misc_actor.minha_barra - - local reportar = {"Details! " .. Loc ["STRING_REPORT_SINGLE_BUFFUPTIME"] .. " " .. barra.texto_esquerdo:GetText()} --> localize-me - reportar [#reportar+1] = "> " .. Loc ["STRING_SPELLS"] .. ":" + local reportar = {"Details!: " .. misc_actor.nome .. " - " .. Loc ["STRING_ATTRIBUTE_MISC_BUFF_UPTIME"]} - for i = 1, GameCooltip:GetNumLines() do - local texto_left, texto_right = GameCooltip:GetText (i) + local buffs = {} + local combat_time = instancia.showing:GetCombatTime() + + for spellid, spell in _pairs (misc_actor.buff_uptime_spells._ActorTable) do + buffs [#buffs+1] = {spellid, spell.uptime, spell} + end + + _table_sort (buffs, _detalhes.Sort2) + + for i, spell in _ipairs (buffs) do + local spelllink = GetSpellLink (spell [1]) + local m, s = _math_floor (spell [2] / 60), _math_floor (spell [2] % 60) - if (texto_left and texto_right) then - texto_left = texto_left:gsub (("|T(.*)|t "), "") - reportar [#reportar+1] = " "..texto_left.." "..texto_right.."" - elseif (i ~= 1) then - reportar [#reportar+1] = "> " .. Loc ["STRING_TARGETS"] .. ":" - end + reportar [#reportar+1] = spelllink .. ": " .. m .. "m " .. s .. "s (" .. _cstr ("%.1f", spell [2] / combat_time * 100) .. "%)" end return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true}) @@ -423,23 +433,26 @@ end function atributo_misc:ReportSingleDebuffUptimeLine (misc_actor, instancia) - local barra = misc_actor.minha_barra + local reportar = {"Details!: " .. misc_actor.nome .. " - " .. Loc ["STRING_ATTRIBUTE_MISC_DEBUFF_UPTIME"]} - local reportar = {"Details! " .. Loc ["STRING_REPORT_SINGLE_DEBUFFUPTIME"] .. " " .. barra.texto_esquerdo:GetText()} --> localize-me - reportar [#reportar+1] = "> " .. Loc ["STRING_SPELLS"] .. ":" + local debuffs = {} + local combat_time = instancia.showing:GetCombatTime() - for i = 1, GameCooltip:GetNumLines() do - local texto_left, texto_right = GameCooltip:GetText (i) - - if (texto_left and texto_right) then - texto_left = texto_left:gsub (("|T(.*)|t "), "") - reportar [#reportar+1] = " "..texto_left.." "..texto_right.."" - elseif (i ~= 1) then - reportar [#reportar+1] = "> " .. Loc ["STRING_TARGETS"] .. ":" - end + for spellid, spell in _pairs (misc_actor.debuff_uptime_spells._ActorTable) do + debuffs [#debuffs+1] = {spellid, spell.uptime, spell} end - return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true}) + _table_sort (debuffs, _detalhes.Sort2) + + for i, spell in _ipairs (debuffs) do + local spelllink = GetSpellLink (spell [1]) + local m, s = _math_floor (spell [2] / 60), _math_floor (spell [2] % 60) + + reportar [#reportar+1] = spelllink .. ": " .. m .. "m " .. s .. "s (" .. _cstr ("%.1f", spell [2] / combat_time * 100) .. "%)" + end + + return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true}) + end function atributo_misc:DeadAtualizarBarra (morte, qual_barra, colocacao, instancia) diff --git a/core/parser.lua b/core/parser.lua index 5c3289f7..3fc8a554 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -421,32 +421,34 @@ ) then --> record death log - local t = last_events_cache [alvo_name] - - if (not t) then - t = _current_combat:CreateLastEventsTable (alvo_name) - end - - local i = t.n + if (este_jogador.grupo) then --> se tiver ele não adiciona o evento lá em cima + local t = last_events_cache [alvo_name] + + if (not t) then + t = _current_combat:CreateLastEventsTable (alvo_name) + end + + local i = t.n - local this_event = t [i] - - this_event [1] = true --> true if this is a damage || false for healing - this_event [2] = spellid --> spellid || false if this is a battle ress line - this_event [3] = amount --> amount of damage or healing - this_event [4] = time --> parser time - this_event [5] = _UnitHealth (alvo_name) --> current unit heal - this_event [6] = who_name --> source name - this_event [7] = absorbed - this_event [8] = school - this_event [9] = true - this_event [10] = overkill - i = i + 1 - - if (i == 17) then - t.n = 1 - else - t.n = i + local this_event = t [i] + + this_event [1] = true --> true if this is a damage || false for healing + this_event [2] = spellid --> spellid || false if this is a battle ress line + this_event [3] = amount --> amount of damage or healing + this_event [4] = time --> parser time + this_event [5] = _UnitHealth (alvo_name) --> current unit heal + this_event [6] = who_name --> source name + this_event [7] = absorbed + this_event [8] = school + this_event [9] = true + this_event [10] = overkill + i = i + 1 + + if (i == 17) then + t.n = 1 + else + t.n = i + end end --> faz a adição do friendly fire diff --git a/functions/link.lua b/functions/link.lua index bab24abc..db146b00 100644 --- a/functions/link.lua +++ b/functions/link.lua @@ -1,45 +1,314 @@ ---[[ Link actor with his twin shadow ]] - do local _detalhes = _G._detalhes - local _rawget = rawget - local _setmetatable = setmetatable - local _ipairs = ipairs - --> default weaktable _detalhes.weaktable = {__mode = "v"} - --> create link between two tables - function _detalhes:FazLinkagem (objeto) - local meus_links = _rawget (self, "links") - if (not meus_links) then - meus_links = _setmetatable ({}, _detalhes.weaktable) - self.links = meus_links - end - meus_links [#meus_links+1] = objeto - end - --> check if there is a link between tables - function _detalhes:EstaoLinkados (objeto) - local meus_links = _rawget (self, "links") - if (not meus_links) then - return false - end - for index, actor in _ipairs (meus_links) do - if (actor == objeto) then - return true - end + --weak auras + local group_prototype = { + ["xOffset"] = -678.999450683594, + ["yOffset"] = 212.765991210938, + ["id"] = "Details! Aura Group", + ["grow"] = "RIGHT", + ["controlledChildren"] = {}, + ["animate"] = true, + ["border"] = "None", + ["anchorPoint"] = "CENTER", + ["regionType"] = "dynamicgroup", + ["sort"] = "none", + ["actions"] = {}, + ["space"] = 0, + ["background"] = "None", + ["expanded"] = true, + ["constantFactor"] = "RADIUS", + ["trigger"] = { + ["type"] = "aura", + ["spellIds"] = {}, + ["unit"] = "player", + ["debuffType"] = "HELPFUL", + ["names"] = {}, + }, + ["borderOffset"] = 16, + + ["animation"] = { + ["start"] = { + ["type"] = "none", + ["duration_type"] = "seconds", + }, + ["main"] = { + ["type"] = "none", + ["duration_type"] = "seconds", + }, + ["finish"] = { + ["type"] = "none", + ["duration_type"] = "seconds", + }, + }, + ["align"] = "CENTER", + ["rotation"] = 0, + ["frameStrata"] = 1, + ["width"] = 199.999969482422, + ["height"] = 20, + ["stagger"] = 0, + ["radius"] = 200, + ["numTriggers"] = 1, + ["backgroundInset"] = 0, + ["selfPoint"] = "LEFT", + ["load"] = { + ["use_combat"] = true, + ["race"] = { + ["multi"] = {}, + }, + ["talent"] = { + ["multi"] = {}, + }, + ["role"] = { + ["multi"] = {}, + }, + ["spec"] = { + ["multi"] = {}, + }, + ["class"] = { + ["multi"] = {}, + }, + ["size"] = { + ["multi"] = {}, + }, + }, + ["untrigger"] = {}, + } + + local icon_prototype = { + ["yOffset"] = -10.08984375, + ["xOffset"] = -3.2294921875, + ["fontSize"] = 14, + ["displayStacks"] = "%s", + ["parent"] = "Details! Aura Group", + ["color"] = {1, 1, 1, 1}, + ["stacksPoint"] = "BOTTOMRIGHT", + ["regionType"] = "icon", + ["untrigger"] = {}, + ["anchorPoint"] = "CENTER", + ["icon"] = true, + ["numTriggers"] = 1, + ["customTextUpdate"] = "update", + ["id"] = "UNNAMED", + ["actions"] = {}, + ["fontFlags"] = "OUTLINE", + ["stacksContainment"] = "INSIDE", + ["zoom"] = 0, + ["auto"] = false, + ["animation"] = { + ["start"] = { + ["duration_type"] = "seconds", + ["type"] = "preset", + ["preset"] = "grow", + }, + ["main"] = { + ["duration_type"] = "seconds", + ["type"] = "preset", + ["preset"] = "pulse", + }, + ["finish"] = { + ["duration_type"] = "seconds", + ["type"] = "none", + }, + }, + ["trigger"] = { + ["type"] = "aura", + ["spellId"] = "0", + ["subeventSuffix"] = "_CAST_START", + ["custom_hide"] = "timed", + ["event"] = "Health", + ["subeventPrefix"] = "SPELL", + ["debuffClass"] = "magic", + ["use_spellId"] = true, + ["spellIds"] = {}, + ["name_operator"] = "==", + ["fullscan"] = true, + ["unit"] = "player", + ["names"] = { + "", -- [1] + }, + ["debuffType"] = "HARMFUL", + }, + ["desaturate"] = false, + ["frameStrata"] = 1, + ["stickyDuration"] = false, + ["width"] = 192, + ["font"] = "Friz Quadrata TT", + ["inverse"] = false, + ["selfPoint"] = "CENTER", + ["height"] = 192, + ["displayIcon"] = "Interface\\Icons\\Spell_Holiday_ToW_SpiceCloud", + ["load"] = { + ["use_combat"] = true, + ["race"] = { + ["multi"] = { + }, + }, + ["talent"] = { + ["multi"] = { + }, + }, + ["role"] = { + ["multi"] = { + }, + }, + ["spec"] = { + ["multi"] = { + }, + }, + ["class"] = { + ["multi"] = { + }, + }, + ["size"] = { + ["multi"] = { + }, + }, + }, + ["textColor"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] + }, + } + + local actions_prototype = { + ["start"] = { + ["do_glow"] = true, + ["glow_action"] = "show", + ["do_sound"] = true, + ["glow_frame"] = "WeakAuras:Crystalline Barrage Step", + ["sound"] = "Interface\\AddOns\\WeakAuras\\Media\\Sounds\\WaterDrop.ogg", + ["sound_channel"] = "Master", + }, + ["finish"] = {}, + } + + function _detalhes:CreateWeakAura (spellid, name, icon_texture, glow, sound) + if (not WeakAuras or not WeakAurasSaved) then + return end - return false + if (not WeakAurasSaved.displays ["Details! Aura Group"]) then + local group = _detalhes.table.copy ({}, group_prototype) + WeakAuras.Add (group) + end + + local icon = _detalhes.table.copy ({}, icon_prototype) + + icon.id = name + icon.displayIcon = icon_texture + icon.trigger.spellId = spellid + + tinsert (icon.trigger.spellIds, spellid) + + WeakAuras.Add (icon) + + tinsert (WeakAurasSaved.displays ["Details! Aura Group"].controlledChildren, name) + + local options_frame = WeakAuras.OptionsFrame and WeakAuras.OptionsFrame() + if (options_frame and options_frame:IsShown()) then + WeakAuras.ToggleOptions() + WeakAuras.ToggleOptions() + else + WeakAuras.OpenOptions() + end end + + function _detalhes:OpenAuraPanel (spellid, spellname, spellicon) + + if (not DetailsAuraPanel) then + + local f = CreateFrame ("frame", "DetailsAuraPanel", UIParent, "ButtonFrameTemplate") + f:SetSize (300, 250) + f:SetPoint ("center", UIParent, "center") + f:SetFrameStrata ("HIGH") + f:SetToplevel (true) + f:SetMovable (true) + + tinsert (UISpecialFrames, "DetailsAuraPanel") + + f:SetScript ("OnMouseDown", function(self, button) + if (self.isMoving) then + return + end + if (button == "RightButton") then + self:Hide() + else + self:StartMoving() + self.isMoving = true + end + end) + f:SetScript ("OnMouseUp", function(self, button) + if (self.isMoving and button == "LeftButton") then + self:StopMovingOrSizing() + self.isMoving = nil + end + end) + + f.TitleText:SetText ("Create Aura") + f.portrait:SetTexture ([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-BLOODELF]]) + + local fw = _detalhes:GetFramework() + + --aura name + local name_label = fw:CreateLabel (f, "Name: ", nil, nil, "GameFontNormal") + local name_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20) + name_textentry:SetPoint ("left", name_label, "right", 2, 0) + f.name = name_textentry + + --aura icon + local icon_label = fw:CreateLabel (f, "Icon: ", nil, nil, "GameFontNormal") + local icon_button_func = function (texture) + f.IconButton.icon.texture = texture + end + local icon_pick_button = fw:NewButton (f, nil, "$parentIconButton", "IconButton", 20, 20, function() fw:IconPick (icon_button_func, true) end) + local icon_button_icon = fw:NewImage (icon_pick_button, [[Interface\ICONS\TEMP]], 19, 19, "background", nil, "icon", "$parentIcon") + icon_pick_button:InstallCustomTexture() + + icon_pick_button:SetPoint ("left", icon_label, "right", 2, 0) + icon_button_icon:SetPoint ("left", icon_label, "right", 2, 0) + + f.icon = icon_button_icon + + --create + local create_func = function() + + _detalhes:CreateWeakAura (f.spellid, f.name.text, DetailsAuraPanel.icon.texture, nil, nil) + + f:Hide() + end + local create_button = fw:CreateButton (f, create_func, 106, 16, "Create Aura") + create_button:InstallCustomTexture() + + local cancel_button = fw:CreateButton (f, function() name_textentry:ClearFocus(); f:Hide() end, 106, 16, "Cancel") + cancel_button:InstallCustomTexture() + + create_button:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]], nil, nil, nil, {0.125, 0.875, 0.125, 0.875}, nil, 4, 2) + cancel_button:SetIcon ([[Interface\Buttons\UI-GroupLoot-Pass-Down]], nil, nil, nil, {0.125, 0.875, 0.125, 0.875}, nil, 4, 2) + + local x_start = 20 + local y_start = 20 + + name_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*1) + (50)) * -1) + icon_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*2) + (50)) * -1) - --> create the link - function _detalhes:CriaLink (link) - --> se tiver a tabela no overall - --if (link) then - -- link:FazLinkagem (self) - --end + create_button:SetPoint ("topleft", f, "topleft", x_start, ((y_start*4) + (50)) * -1) + cancel_button:SetPoint ("left", create_button, "right", 20, 0) + + end + + DetailsAuraPanel.spellid = spellid + + DetailsAuraPanel.name.text = spellname + DetailsAuraPanel.icon.texture = spellicon + + DetailsAuraPanel:Show() end + end \ No newline at end of file diff --git a/functions/slash.lua b/functions/slash.lua index a502f0c5..73ec5288 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -891,7 +891,7 @@ function SlashCmdList.DETAILS (msg, editbox) local _, _, flags = barra.texto_esquerdo:GetFont() print ("outline:",flags) end - + else --if (_detalhes.opened_windows < 1) then diff --git a/gumps/janela_info.lua b/gumps/janela_info.lua index 8c094a52..5b6b7696 100644 --- a/gumps/janela_info.lua +++ b/gumps/janela_info.lua @@ -3064,14 +3064,27 @@ function _detalhes.janela_info:monta_relatorio (botao) local report_lines if (botao == 1) then --> botão da esquerda - report_lines = {"Details! " .. Loc ["STRING_ACTORFRAME_SPELLSOF"] .. " " .. player.nome .. " (" .. _detalhes.sub_atributos [atributo].lista [sub_atributo] .. ")"} + + + if (atributo == 1 and sub_atributo == 4) then --> friendly fire + report_lines = {"Details!: " .. player.nome .. " " .. Loc ["STRING_ATTRIBUTE_DAMAGE_FRIENDLYFIRE"] .. ":"} + + elseif (atributo == 1 and sub_atributo == 3) then --> damage taken + report_lines = {"Details!: " .. player.nome .. " " .. Loc ["STRING_ATTRIBUTE_DAMAGE_TAKEN"] .. ":"} + + else + -- report_lines = {"Details! " .. Loc ["STRING_ACTORFRAME_SPELLSOF"] .. " " .. player.nome .. " (" .. _detalhes.sub_atributos [atributo].lista [sub_atributo] .. ")"} + report_lines = {"Details!: " .. player.nome .. " - " .. _detalhes.sub_atributos [atributo].lista [sub_atributo] .. ""} + + end + for index, barra in _ipairs (info.barras1) do if (barra:IsShown()) then local spellid = barra.show if (atributo == 1 and sub_atributo == 4) then --> friendly fire report_lines [#report_lines+1] = barra.texto_esquerdo:GetText() .. ": " .. barra.texto_direita:GetText() - elseif (spellid > 10) then + elseif (type (spellid) == "number" and spellid > 10) then local link = GetSpellLink (spellid) report_lines [#report_lines+1] = index .. ". " .. link .. ": " .. barra.texto_direita:GetText() else @@ -3329,6 +3342,8 @@ local row_on_leave = function (self) GameTooltip:Hide() + GameCooltip:Hide() + if (self.isMain) then --> retira o zoom no icone self.icone:SetWidth (14) diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 9832c0c0..9213f3e6 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -1899,6 +1899,26 @@ local barra_scripts_onmouseup = function (self, button) if (self.button == "LeftButton" or self.button == "MiddleButton") then if (self._instance.atributo == 5 or _IsShiftKeyDown()) then --> report + if (self._instance.atributo == 5 and _IsShiftKeyDown()) then + local custom = self._instance:GetCustomObject() + if (custom and custom.on_shift_click) then + local func = loadstring (custom.on_shift_click) + if (func) then + + local successful, errortext = pcall (func, self, self.minha_tabela, self._instance) + if (not successful) then + _detalhes:Msg ("error occurred custom script shift+click:", errortext) + end + + --local spellname, _, spellicon = _detalhes.getspellinfo (self.minha_tabela.id) + --_detalhes:OpenAuraPanel (self.minha_tabela.id, spellname, spellicon) + + --func (object.id, spellname, spellicon) + + return + end + end + end return _detalhes:ReportSingleLine (self._instance, self) end self._instance:AbreJanelaInfo (self.minha_tabela) diff --git a/gumps/janela_report.lua b/gumps/janela_report.lua index 9210f99b..fe83482f 100644 --- a/gumps/janela_report.lua +++ b/gumps/janela_report.lua @@ -529,7 +529,7 @@ General/Trade: 255 189 192 local este_gump = _CreateFrame ("Frame", "DetailsReportWindow", _UIParent) este_gump:SetPoint ("CENTER", UIParent, "CENTER") - este_gump:SetFrameStrata ("HIGH") + este_gump:SetFrameStrata ("DIALOG") este_gump:SetScript ("OnShow", function (self) local dropdown = este_gump.select.MyObject