diff --git a/boot.lua b/boot.lua index ecedf4e5..0091d9e3 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 = 439 --it's 439 for release - _detalhes.userversion = "v3.8.5" + _detalhes.userversion = "v3.8.6" _detalhes.realversion = 58 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -20,8 +20,9 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v3.8.5 (|cFFFFCC00Jan 21, 2015|r|cFFFFFF00)|r:\n\n -|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click .\n\n +|cFFFFFF00v3.8.6 (|cFFFFCC00Jan 23, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Added Options Panel for Vanguard Plugin.\n\n +|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click.\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 @@ -31,7 +32,7 @@ do --]] -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.8.5 (|cFFFFCC00Jan 22, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click .\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 Improved specialization detection in order to try detect spec changes.\n\n|cFFFFFF00-|r Fixed an issue with 'Always Show Me' feature where it was showing the player on Enemies display.\n\n|cFFFFFF00-|r Testing LibWindow-1.1.\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'.\n\n|cFFFFFF00-|r Added Observer mode for Raid Tools: report cooldown/interrupt/death of entire raid only to you in your chat window.\n\n|cFFFFFF00-|r Added new plugin 'Raid Check': tracks raid members checking food, flask and pre-potions usage.\n\n|cFFFFFF00-|r Changed DPS display, now it shows onyl the player's Dps and the Dps difference between him and the top ranked.\n\n|cFFFFFF00-|r Changed Overheal display, now its percentage shows the player's overheal percent.\n\n|cFFFFFF00-|r Player Detail Window now shows the amount of multistrike on normal and critical hits.\n\n|cFFFFFF00-|r Removed skin: 'ElvUI Frame Style BW'.\n\n|cFFFFFF00-|r The tooltip for Scale option under options panel, now shows the real value for the scale.\n\n|cFFFFFF00-|r Fixed Imperator Mar'gok's adds damage taken.\n\n|cFFFFFF00-|r Fixed a problem where multistrike was counting towards critical strike amount.\n\n|cFFFFFF00-|r Fixed death display's report where it was't showing any death.\n\n|cFFFFFF00-|r Fixed a small issue with Encounter Details plugin where sometimes gets a error right after a boss encounter.\n\n|cFFFFFF00-|r Fixed bugs on sending messages to chat for Raid Tools.\n\n\n\n|cFFFFFF00v3.5.1 (|cFFFFCC00Dec 16, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed few accuracy on miss spells.\n\n|cFFFFFF00v3.5.0 (|cFFFFCC00Dec 14, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed tooltip for Auras and Voidzones, now shows sorted by damage and time.\n\n|cFFFFFF00-|r More fixes for Korgath encounter on Highmaul.\n\n|cFFFFFF00-|r Added slash commands: 'reset' 'config'.\n\n|cFFFFFF00-|r Spell bars on Player Details Window now is painted with the spell spellschool color." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.8.6 (|cFFFFCC00Jan 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Options Panel for Vanguard Plugin.\n\n|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click .\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 Improved specialization detection in order to try detect spec changes.\n\n|cFFFFFF00-|r Fixed an issue with 'Always Show Me' feature where it was showing the player on Enemies display.\n\n|cFFFFFF00-|r Testing LibWindow-1.1.\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'.\n\n|cFFFFFF00-|r Added Observer mode for Raid Tools: report cooldown/interrupt/death of entire raid only to you in your chat window.\n\n|cFFFFFF00-|r Added new plugin 'Raid Check': tracks raid members checking food, flask and pre-potions usage.\n\n|cFFFFFF00-|r Changed DPS display, now it shows onyl the player's Dps and the Dps difference between him and the top ranked.\n\n|cFFFFFF00-|r Changed Overheal display, now its percentage shows the player's overheal percent.\n\n|cFFFFFF00-|r Player Detail Window now shows the amount of multistrike on normal and critical hits.\n\n|cFFFFFF00-|r Removed skin: 'ElvUI Frame Style BW'.\n\n|cFFFFFF00-|r The tooltip for Scale option under options panel, now shows the real value for the scale.\n\n|cFFFFFF00-|r Fixed Imperator Mar'gok's adds damage taken.\n\n|cFFFFFF00-|r Fixed a problem where multistrike was counting towards critical strike amount.\n\n|cFFFFFF00-|r Fixed death display's report where it was't showing any death.\n\n|cFFFFFF00-|r Fixed a small issue with Encounter Details plugin where sometimes gets a error right after a boss encounter.\n\n|cFFFFFF00-|r Fixed bugs on sending messages to chat for Raid Tools.\n\n\n\n|cFFFFFF00v3.5.1 (|cFFFFCC00Dec 16, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed few accuracy on miss spells.\n\n|cFFFFFF00v3.5.0 (|cFFFFCC00Dec 14, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed tooltip for Auras and Voidzones, now shows sorted by damage and time.\n\n|cFFFFFF00-|r More fixes for Korgath encounter on Highmaul.\n\n|cFFFFFF00-|r Added slash commands: 'reset' 'config'.\n\n|cFFFFFF00-|r Spell bars on Player Details Window now is painted with the spell spellschool color." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/images/spec_icons_normal_alpha.tga b/images/spec_icons_normal_alpha.tga index 5b08a8b0..97d0f379 100644 Binary files a/images/spec_icons_normal_alpha.tga and b/images/spec_icons_normal_alpha.tga differ diff --git a/plugins/Details_Vanguard/Details_Vanguard.lua b/plugins/Details_Vanguard/Details_Vanguard.lua index 470faabf..157fdf2d 100644 --- a/plugins/Details_Vanguard/Details_Vanguard.lua +++ b/plugins/Details_Vanguard/Details_Vanguard.lua @@ -1,8 +1,13 @@ local AceLocale = LibStub ("AceLocale-3.0") local Loc = AceLocale:GetLocale ("Details") +local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0") --------------------------------------------------------------------------------------------- +--varios debuffs tao doido com monk +--ignorar bloodlust, shield d priest +--reler os tanks ao sair de um grupo + local _GetTime = GetTime --> wow api local local _UFC = UnitAffectingCombat --> wow api local local _IsInRaid = IsInRaid --> wow api local @@ -144,8 +149,11 @@ local function CreatePluginFrames (data) if (realm) then name = name .. "-" .. realm end - Vanguard.TankList [#Vanguard.TankList+1] = name - Vanguard.TankHashNames [name] = #Vanguard.TankList + + if (not Vanguard.TankHashNames [name]) then + Vanguard.TankList [#Vanguard.TankList+1] = name + Vanguard.TankHashNames [name] = #Vanguard.TankList + end end end @@ -158,8 +166,11 @@ local function CreatePluginFrames (data) if (realm) then name = name .. "-" .. realm end - Vanguard.TankList [#Vanguard.TankList+1] = name - Vanguard.TankHashNames [name] = #Vanguard.TankList + + if (not Vanguard.TankHashNames [name]) then + Vanguard.TankList [#Vanguard.TankList+1] = name + Vanguard.TankHashNames [name] = #Vanguard.TankList + end end end @@ -169,8 +180,11 @@ local function CreatePluginFrames (data) if (realm) then name = name .. "-" .. realm end - Vanguard.TankList [#Vanguard.TankList+1] = name - Vanguard.TankHashNames [name] = #Vanguard.TankList + + if (not Vanguard.TankHashNames [name]) then + Vanguard.TankList [#Vanguard.TankList+1] = name + Vanguard.TankHashNames [name] = #Vanguard.TankList + end end else @@ -178,8 +192,11 @@ local function CreatePluginFrames (data) if (realm) then name = name .. "-" .. realm end - Vanguard.TankList [#Vanguard.TankList+1] = name - Vanguard.TankHashNames [name] = #Vanguard.TankList + + if (not Vanguard.TankHashNames [name]) then + Vanguard.TankList [#Vanguard.TankList+1] = name + Vanguard.TankHashNames [name] = #Vanguard.TankList + end end Vanguard:RefreshTanks() @@ -187,13 +204,22 @@ local function CreatePluginFrames (data) end function Vanguard:ResetBars() - for i, tankblock in ipairs (Vanguard.TankBlocks) do - local bar = tankblock.heal_inc - bar:SetSplit (50) - bar:SetLeftText (tankblock.tankname_string) - bar:SetRightText ("") - bar:SetRightColor (.25, 0, 0, 1) - bar:SetLeftColor (0, .25, 0, 1) + + if (Vanguard.db.show_inc_bars) then + for i, tankblock in ipairs (Vanguard.TankBlocks) do + local bar = tankblock.heal_inc + bar:SetSplit (50) + bar:SetLeftText (tankblock.tankname_string) + bar:SetRightText ("") + bar:SetRightColor (.25, 0, 0, 1) + bar:SetLeftColor (0, .25, 0, 1) + bar:Show() + end + else + for i, tankblock in ipairs (Vanguard.TankBlocks) do + local bar = tankblock.heal_inc + bar:Hide() + end end end @@ -241,6 +267,11 @@ local function CreatePluginFrames (data) bar.iconleft:SetTexCoord (left, right, top, bottom) bar:SetLeftText (Vanguard:GetOnlyName (name)) bar:SetLeftText (name) + + local width = Vanguard.db.tank_block_size + self:SetWidth (width) + self:SetBackdropColor (unpack (Vanguard.db.tank_block_color)) + self.texture:SetTexture (SharedMedia:Fetch ("statusbar", Vanguard.db.tank_block_texture)) end @@ -256,14 +287,36 @@ local function CreatePluginFrames (data) GameTooltip:Hide() end end + + local on_click = function (self, button) + if (button == "LeftButton") then + Vanguard.OpenOptionsPanel() + + elseif (button == "RightButton") then + local instance = Vanguard:GetPluginInstance() + if (instance) then + _detalhes.switch:ShowMe (instance) + end + end + end function Vanguard:CreateTankBlock (index) --frame + local f = CreateFrame ("button", "VanguardTankBlock" .. index, VanguardFrame) f.SetTank = SetTank - f:SetSize (150, 50) - f:SetPoint ("bottomleft", VanguardFrame, "bottomleft", 5 + ((index-1) * 155), 5) + f:SetSize (Vanguard.db.tank_block_size or 150, 50) + + f:SetScript ("OnMouseUp", on_click) + + if (index == 1) then + f:SetPoint ("bottomleft", VanguardFrame, "bottomleft", 5 + ((index-1) * 155), 5) + else + f:SetPoint ("left", Vanguard.TankBlocks [index-1], "right", 5, 0) + end + f:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], edgeSize = 10}) + f:SetBackdropColor (unpack (Vanguard.db.tank_block_color)) --statusbar f.statusbar = CreateFrame ("statusbar", nil, f) @@ -273,8 +326,8 @@ local function CreatePluginFrames (data) f.statusbar:SetStatusBarTexture (f.texture) f.statusbar:SetMinMaxValues (0, 100) f.statusbar:SetValue (100) - - f.texture:SetTexture ([[Interface\AddOns\Details\images\bar_serenity]]) + + f.texture:SetTexture (SharedMedia:Fetch ("statusbar", Vanguard.db.tank_block_texture)) --spec icon f.specicon = f.statusbar:CreateTexture (nil, "overlay") @@ -296,26 +349,53 @@ local function CreatePluginFrames (data) f.heal_inc.fontsize = 10 f.heal_inc.righticon = "Interface\\ICONS\\misc_arrowleft" f.heal_inc.iconright:SetVertexColor (1, .5, .5, 1) + + f.heal_inc:SetScript ("OnMouseUp", on_click) --debuffs blocks f.debuffs_blocks = {} f.debuffs_using = 0 f.debuffs_next_index = 1 + for i = 1, 3 do local support_frame = CreateFrame ("frame", nil, f) support_frame:SetFrameLevel (f:GetFrameLevel()+1) support_frame:SetSize (24, 24) - support_frame:SetPoint ("bottomleft", f, "bottomleft", 5 + ((i-1) * 35), 5) + support_frame:SetScript ("OnMouseUp", on_click) + support_frame:SetScript ("OnEnter", debuff_on_enter) support_frame:SetScript ("OnLeave", debuff_on_leave) local texture = support_frame:CreateTexture (nil, "overlay") texture:SetSize (24, 24) - texture:SetPoint ("bottomleft", f, "bottomleft", 5 + ((i-1) * 35), 5) + if (i == 1) then --> left + support_frame:SetPoint ("left", f, "left", 5, 0) + support_frame:SetPoint ("bottom", f, "bottom", 0, 5) + + texture:SetPoint ("left", f, "left", 5, 0) + texture:SetPoint ("bottom", f, "bottom", 0, 5) + + elseif (i == 2) then --> center + support_frame:SetPoint ("center", f, "center", 0, 0) + support_frame:SetPoint ("bottom", f, "bottom", 0, 5) + + texture:SetPoint ("center", f, "center", 0, 0) + texture:SetPoint ("bottom", f, "bottom", 0, 5) + + elseif (i == 3) then --> right + support_frame:SetPoint ("right", f, "right", -5, 0) + support_frame:SetPoint ("bottom", f, "bottom", 0, 5) + + texture:SetPoint ("right", f, "right", -5, 0) + texture:SetPoint ("bottom", f, "bottom", 0, 5) + + end + local dblock = CreateFrame ("cooldown", "VanguardTankBlock" .. index.. "Cooldown" .. i, support_frame, "CooldownFrameTemplate") dblock:SetPoint ("topleft", texture, "topleft") dblock:SetPoint ("bottomright", texture, "bottomright") + dblock:SetScript ("OnMouseUp", on_click) dblock.texture = texture local stack = dblock:CreateFontString (nil, "overlay", "GameFontNormal") @@ -333,17 +413,22 @@ local function CreatePluginFrames (data) end Vanguard.TankBlocks [index] = f + + Vanguard:ResetBars() + return f end function Vanguard:RefreshTanks() + Vanguard:ResetBlocks() + for i = 1, #Vanguard.TankList do local block = Vanguard.TankBlocks [i] if (not block) then block = Vanguard:CreateTankBlock (i) end - + block:SetTank (i) end @@ -569,6 +654,79 @@ function Vanguard:TrackDebuffsAlreadyApplied() end end +local build_options_panel = function() + + local options_frame = Vanguard:CreatePluginOptionsFrame ("VanguardOptionsWindow", "Vanguard Options", 1) + + local tank_texture_set = function (_, _, value) + Vanguard.db.tank_block_texture = value; + Vanguard:RefreshTanks(); + end + + local texture_icon = [[Interface\TARGETINGFRAME\UI-PhasingIcon]] + local texture_icon = [[Interface\AddOns\Details\images\icons]] + local texture_icon_size = {14, 14} + local texture_texcoord = {469/512, 505/512, 249/512, 284/512} + + local textures = SharedMedia:HashTable ("statusbar") + local texTable = {} + for name, texturePath in pairs (textures) do + texTable[#texTable+1] = {value = name, label = name, iconsize = texture_icon_size, statusbar = texturePath, onclick = tank_texture_set, icon = texture_icon, texcoord = texture_texcoord} + end + table.sort (texTable, function (t1, t2) return t1.label < t2.label end) + + local tank_texture_menu = texTable + + local menu = { + { + type = "toggle", + get = function() return Vanguard.db.show_inc_bars end, + set = function (self, fixedparam, value) Vanguard.db.show_inc_bars = value; Vanguard:ResetBars() end, + desc = "When enabled, shows the incoming heal and damage bars.", + name = "Show Incoming Bars" + }, + { + type = "range", + get = function() return Vanguard.db.tank_block_size end, + set = function (self, fixedparam, value) Vanguard.db.tank_block_size = value; Vanguard:RefreshTanks() end, + min = 70, + max = 250, + step = 1, + desc = "Set the width of the blocks showing the tanks.", + name = "Tank Block Size", + }, + { + type = "color", + get = function() return Vanguard.db.tank_block_color end, + set = function (self, r, g, b, a) + local current = Vanguard.db.tank_block_color; + current[1], current[2], current[3], current[4] = r, g, b, a; + Vanguard:RefreshTanks(); + end, + desc = "Select the color of the tank block background.", + name = "Tank Block Background Color" + }, + { + type = "select", + get = function() return Vanguard.db.tank_block_texture end, + values = function() return tank_texture_menu end, + desc = "Choose the texture used on tank blocks.", + name = "Tank Block Texture" + }, + + } + + Vanguard:GetFramework():BuildMenu (options_frame, menu, 15, -75, 260) + +end + +Vanguard.OpenOptionsPanel = function() + if (not VanguardOptionsWindow) then + build_options_panel() + end + VanguardOptionsWindow:Show() +end + function Vanguard:OnEvent (_, event, arg1, token, time, who_serial, who_name, who_flags, _, alvo_serial, alvo_name, alvo_flags, _, spellid, spellname, spellschool, tipo) if (event == "COMBAT_LOG_EVENT_UNFILTERED") then @@ -610,18 +768,25 @@ function Vanguard:OnEvent (_, event, arg1, token, time, who_serial, who_name, wh if (_G._detalhes) then - --> create widgets - CreatePluginFrames() - local MINIMAL_DETAILS_VERSION_REQUIRED = 1 - local default_saved_table = {} + local default_saved_table = { + show_inc_bars = true, + tank_block_size = 150, + tank_block_color = {0, 0, 0, 0.8}, + tank_block_texture = "Details Serenity", + } --> Install + function Vanguard:OnDetailsEvent() end --> dummy func to stop warnings. + local install, saveddata = _G._detalhes:InstallPlugin ("TANK", "Vanguard", "Interface\\Icons\\INV_Shield_77", Vanguard, "DETAILS_PLUGIN_VANGUARD", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v2.0", default_saved_table) if (type (install) == "table" and install.error) then print (install.error) end --- DETAILS_PLUGIN_VANGUARD.TankHashNames + + --> create widgets + CreatePluginFrames() + --> Register needed events _G._detalhes:RegisterEvent (Vanguard, "COMBAT_PLAYER_ENTER") _G._detalhes:RegisterEvent (Vanguard, "COMBAT_PLAYER_LEAVE") @@ -646,17 +811,3 @@ function Vanguard:OnEvent (_, event, arg1, token, time, who_serial, who_name, wh end end - - - - - - - - - - - - - - diff --git a/plugins/Details_YouAreNotPrepared/Details_YouAreNotPrepared.lua b/plugins/Details_YouAreNotPrepared/Details_YouAreNotPrepared.lua index 05610d7f..35bd39c9 100644 --- a/plugins/Details_YouAreNotPrepared/Details_YouAreNotPrepared.lua +++ b/plugins/Details_YouAreNotPrepared/Details_YouAreNotPrepared.lua @@ -529,7 +529,7 @@ type = "toggle", get = function() return YouAreNotPrepared.db.auto_open end, set = function (self, fixedparam, value) YouAreNotPrepared.db.auto_open = value end, - desc = "Ope the window after leave the combat.", + desc = "Open the window after leave the combat.", name = "Auto Open" }, }