diff --git a/boot.lua b/boot.lua index d9722a08..f5c6c592 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 = 1959 --it's 1989 for release - _detalhes.userversion = "v4.0.1" + _detalhes.build_counter = 1989 --it's 1989 for release + _detalhes.userversion = "v4.0.2" _detalhes.realversion = 75 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes @@ -21,16 +21,18 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v4.0.1 (|cFFFFCC00Set 21, 2015|r|cFFFFFF00)|r:\n\n -|cFFFFFF00-|r Added an options to use a customized skin file.\n\n -|cFFFFFF00-|r Added an options to use a customized bar texture file.\n\n -|cFFFFFF00-|r A Package with photoshop files with examples and the skin file for Minimalistic skin are available at WoW Interface.\n\n -|cFFFFFF00-|r Added 'API Custom Displays.txt' on Details! folder, this file explain how to create scripts for custom displays.\n\n +|cFFFFFF00v4.0.2 (|cFFFFCC00Set 26, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Added 'ShielTronic Shield' on HealthPotion & Stone display.\n\n +|cFFFFFF00-|r Improvements done on Vanguard Plugin.\n\n +|cFFFFFF00-|r Fixed an alignment issue which was happening with few tooltips.\n\n +|cFFFFFF00-|r Fixed a problem where sometimes the addon crashes while doing a /reload during raid.\n\n +|cFFFFFF00-|r Fixed the creation of auras for weakauras from the Forge (/details forge).\n\n + --]] -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v4.0.1 (|cFFFFCC00Set 21, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an options to use a customized skin file.\n\n|cFFFFFF00-|r Added an options to use a customized bar texture file.\n\n|cFFFFFF00-|r A Package with photoshop files with examples and the skin file for Minimalistic skin are available at WoW Interface.\n\n|cFFFFFF00-|r Added 'API Custom Displays.txt' on Details! folder, this file explain how to create scripts for custom displays.\n\n|cFFFFFF00v4.0h (|cFFFFCC00Set 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created new plugin 'Target Caller' for RBGs, it's available at Curse.com.\n\n|cFFFFFF00-|r Fixed death display color when not using colored by the player class.\n\n|cFFFFFF00-|r Fixed a rare bug where the window for Encounter Details Plugin won't open when clicking on its icon.\n\n|cFFFFFF00-|r Added officer channel to 'Announce Death' feature.\n\n|cFFFFFF00v4.0f (|cFFFFCC00Set 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the title bar encounter timer.\n\n|cFFFFFF00v4.0e (|cFFFFCC00Set 14, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a custom display for Crowd Control Received.\n\n|cFFFFFF00-|r Weak Aura Creator Tool, now has full support for BigWigs and Dbm time bars.\n\n|cFFFFFF00-|r Auras for interrupt and dispelling has been added on the Weak Aura Creator Tool.\n\n|cFFFFFF00-|r Details! Forge now has support for DBM and BigWigs time bars.\n\n|cFFFFFF00-|r Solo Plugins now has a close button on their panels.\n\n|cFFFFFF00-|r Fixed damage/healing score message after a boss kill.\n\n|cFFFFFF00-|r Now, an alert to open the history panel is shown after killing a boss.\n\n|cFFFFFF00-|r Added a 'all-displays' menu when right clicking title bar.\n\n|cFFFFFF00-|r Removed few texture from bookmarks panel, now it has a more clean appearance.\n\n|cFFFFFF00-|r Updated Details! Framework.\n\n|cFFFFFF00-|r Added option in order to change the bar orientation.\n\n|cFFFFFF00-|r Added an option to make the menus on title bar work with clicks instead of hovering over them.\n\n|cFFFFFF00-|r Healing for battleground enemies is now placed on healing done instead of enemy healing done.\n\n|cFFFFFF00-|r Improvements on our support for Arena battles.\n\n|cFFFFFF00-|r Fixed some issues on the Player Detail Window.\n\n|cFFFFFF00-|r Fixed encounter time on title bar text.\n\n|cFFFFFF00-|r Fixed death display tooltip, wasn't respecting the font and size set on options panel.\n\n|cFFFFFF00v3.18.5 (|cFFFFCC00Aug 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improvements on Weakauras creation from Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements on 'Auto Switch to Current' feature. Details! windows are now more responsible about auto changing a segment while the player, for instance, has the report window opened.\n\n|cFFFFFF00-|r Added slash command '/de wipe'. It ends the raid encounter segment and stop capturing data.\nIf you are the raid leader, all other users of Details! will also stop.\nWorks great for players not make damage padding after a wipe call.\n\n|cFFFFFF00-|r Added the overheal made by pets on tooltip and player details window.\n\n|cFFFFFF00-|r Added an option to disable stretch button and bar highlight.\n\n|cFFFFFF00-|r Disabling nicknames now also disable avatars.\n\n|cFFFFFF00-|r Added 'spinal healing injector' on custom display 'Health Potion & Stone' used.\n\n|cFFFFFF00-|r Fixed title text width when auto-hide menu buttons is enabled.\n\n|cFFFFFF00-|r Fixed item level of timewarped items.\n\n|cFFFFFF00-|r Fixed report for custom display Crowd Control.\n\n|cFFFFFF00-|r Fixed role icons on custom displays.\n\n|cFFFFFF00-|r Fixed an issue with dropdown boxes where wasn't showing all options.\n\n|cFFFFFF00-|r Fixed Ticket #53: background alpha after stretching which wasn't correctly coming back to original color.\n\n|cFFFFFF00-|r Fixed ticket #51: API Call 'GetCombat('overall')' wasn't returning the overall combat object.\n\n|cFFFFFF00-|r Fixed ticket #50: issue opening icon selection frame.\n\n|cFFFFFF00v3.17.12 (|cFFFFCC00Aug 05, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for lock micro displays. When locked they don't interact with mouse or stay on top of menus.\n\n|cFFFFFF00-|r Fixed ticket #49: death display not working correctly with sort direction bottom-to-top.\n\n|cFFFFFF00-|r Fixed an issue with death display where the text wasn't updating their width correctly.\n\n|cFFFFFF00-|r Fixed an issue with energy and miscellaneous displays type not working correctly with bar animations.\n\n|cFFFFFF00-|r Fixed an issue while loading old profiles wans't updating their values for newer versions of the addon.\n\n|cFFFFFF00-|r Fixed an issue with bookmarks panel not opening correctly.\n\n|cFFFFFF00v3.17.10 (|cFFFFCC00Aug 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed ticket #47: Title bar font resets with UI reload / relog.\n\n|cFFFFFF00-|r Fixed ticket #46: Icon select panel wasn't opening.\n\n|cFFFFFF00-|r Fixed ticket #45: Windwalker icon for Mistweaver monks.\n\n|cFFFFFF00-|r Fixed issue with vehicles exchanging ownership, e.g. Soulbound Constructor on HFC raid.\n\n|cFFFFFF00v3.17.6 (|cFFFFCC00Jul 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Major improvements on the aura tool creation for WeakAuras.\n\n|cFFFFFF00-|r Fixed some issues with spec icons where sometimes it shows four small icons.\n\n|cFFFFFF00-|r Added an option to show a stopwatch on the title text showing the elapsed time of an encounter.\n\n|cFFFFFF00-|r Window title text now shrinks correctly when isn't enough space for it.\n\n|cFFFFFF00-|r For some special cases, left click now open the report window and shift+click shows the tooltip content in the window.\n\n|cFFFFFF00-|r Damage Taken by Spells now are a part of Damage bracket (no more on custom).\n\n|cFFFFFF00-|r Fixed custom functions for the customized bar left text.\n\n|cFFFFFF00-|r Improvements on report text format and also reverse option now works as intended.\n\n|cFFFFFF00-|r Removed the option for report only what is shown in the window.\n\n|cFFFFFF00-|r Added skins for report panel, the skin follow the skin selected for Player Detail Window.\n\n|cFFFFFF00v3.16.0c (|cFFFFCC00Jul 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with Encounter Details graphic for Archimonde encounter.\n\n|cFFFFFF00-|r Numbers format on Player Detail Window now respect the format chosen on options panel.\n\n|cFFFFFF00-|r Removed pet icons on Player Detail Window.\n\n|cFFFFFF00-|r Fixed some wrong textures on spec icons.\n\n|cFFFFFF00-|r Improvements on all skins for the Player Detail Window.\n\n|cFFFFFF00v3.15.8b (|cFFFFCC00Jul 01, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Soul Capacitor trinket fix.\n\n|cFFFFFF00-|r Fixed several small bugs from 6.2 patch.\n\n|cFFFFFF00-|r Disabled the special behavior for Tyrant Velhari encounter.\n\n|cFFFFFF00v3.15.7 (|cFFFFCC00Jun 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added support for Hellfire Citadel raid.\n\n|cFFFFFF00-|r Added support for custom CLEU parser functions.\n\n|cFFFFFF00-|r Tyrant Velhari encounter now has a custom CLEU parser function for healing where the heal absorbed by Aura of Contempt will count towards overheal and not healing done.\n\n|cFFFFFF00-|r Added support for embed on Chat Tabs.\n\n|cFFFFFF00-|r |cFFAAFFAAPS: We've made an addon for Shadow-Lord Iskar encounter called 'Iskar Assist' check it out|r." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v4.0.2 (|cFFFFCC00Set 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 'ShielTronic Shield' on HealthPotion & Stone display.\n\n|cFFFFFF00-|r Improvements done on Vanguard Plugin.\n\n|cFFFFFF00-|r Fixed an alignment issue which was happening with few tooltips.\n\n|cFFFFFF00-|r Fixed a problem where sometimes the addon crashes while doing a /reload during raid.\n\n|cFFFFFF00-|r Fixed the creation of auras for weakauras from the Forge (/details forge).\n\n|cFFFFFF00v4.0.1 (|cFFFFCC00Set 21, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an options to use a customized skin file.\n\n|cFFFFFF00-|r Added an options to use a customized bar texture file.\n\n|cFFFFFF00-|r A Package with photoshop files with examples and the skin file for Minimalistic skin are available at WoW Interface.\n\n|cFFFFFF00-|r Added 'API Custom Displays.txt' on Details! folder, this file explain how to create scripts for custom displays.\n\n|cFFFFFF00v4.0h (|cFFFFCC00Set 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created new plugin 'Target Caller' for RBGs, it's available at Curse.com.\n\n|cFFFFFF00-|r Fixed death display color when not using colored by the player class.\n\n|cFFFFFF00-|r Fixed a rare bug where the window for Encounter Details Plugin won't open when clicking on its icon.\n\n|cFFFFFF00-|r Added officer channel to 'Announce Death' feature.\n\n|cFFFFFF00v4.0f (|cFFFFCC00Set 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the title bar encounter timer.\n\n|cFFFFFF00v4.0e (|cFFFFCC00Set 14, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a custom display for Crowd Control Received.\n\n|cFFFFFF00-|r Weak Aura Creator Tool, now has full support for BigWigs and Dbm time bars.\n\n|cFFFFFF00-|r Auras for interrupt and dispelling has been added on the Weak Aura Creator Tool.\n\n|cFFFFFF00-|r Details! Forge now has support for DBM and BigWigs time bars.\n\n|cFFFFFF00-|r Solo Plugins now has a close button on their panels.\n\n|cFFFFFF00-|r Fixed damage/healing score message after a boss kill.\n\n|cFFFFFF00-|r Now, an alert to open the history panel is shown after killing a boss.\n\n|cFFFFFF00-|r Added a 'all-displays' menu when right clicking title bar.\n\n|cFFFFFF00-|r Removed few texture from bookmarks panel, now it has a more clean appearance.\n\n|cFFFFFF00-|r Updated Details! Framework.\n\n|cFFFFFF00-|r Added option in order to change the bar orientation.\n\n|cFFFFFF00-|r Added an option to make the menus on title bar work with clicks instead of hovering over them.\n\n|cFFFFFF00-|r Healing for battleground enemies is now placed on healing done instead of enemy healing done.\n\n|cFFFFFF00-|r Improvements on our support for Arena battles.\n\n|cFFFFFF00-|r Fixed some issues on the Player Detail Window.\n\n|cFFFFFF00-|r Fixed encounter time on title bar text.\n\n|cFFFFFF00-|r Fixed death display tooltip, wasn't respecting the font and size set on options panel.\n\n|cFFFFFF00v3.18.5 (|cFFFFCC00Aug 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improvements on Weakauras creation from Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements on 'Auto Switch to Current' feature. Details! windows are now more responsible about auto changing a segment while the player, for instance, has the report window opened.\n\n|cFFFFFF00-|r Added slash command '/de wipe'. It ends the raid encounter segment and stop capturing data.\nIf you are the raid leader, all other users of Details! will also stop.\nWorks great for players not make damage padding after a wipe call.\n\n|cFFFFFF00-|r Added the overheal made by pets on tooltip and player details window.\n\n|cFFFFFF00-|r Added an option to disable stretch button and bar highlight.\n\n|cFFFFFF00-|r Disabling nicknames now also disable avatars.\n\n|cFFFFFF00-|r Added 'spinal healing injector' on custom display 'Health Potion & Stone' used.\n\n|cFFFFFF00-|r Fixed title text width when auto-hide menu buttons is enabled.\n\n|cFFFFFF00-|r Fixed item level of timewarped items.\n\n|cFFFFFF00-|r Fixed report for custom display Crowd Control.\n\n|cFFFFFF00-|r Fixed role icons on custom displays.\n\n|cFFFFFF00-|r Fixed an issue with dropdown boxes where wasn't showing all options.\n\n|cFFFFFF00-|r Fixed Ticket #53: background alpha after stretching which wasn't correctly coming back to original color.\n\n|cFFFFFF00-|r Fixed ticket #51: API Call 'GetCombat('overall')' wasn't returning the overall combat object.\n\n|cFFFFFF00-|r Fixed ticket #50: issue opening icon selection frame.\n\n|cFFFFFF00v3.17.12 (|cFFFFCC00Aug 05, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for lock micro displays. When locked they don't interact with mouse or stay on top of menus.\n\n|cFFFFFF00-|r Fixed ticket #49: death display not working correctly with sort direction bottom-to-top.\n\n|cFFFFFF00-|r Fixed an issue with death display where the text wasn't updating their width correctly.\n\n|cFFFFFF00-|r Fixed an issue with energy and miscellaneous displays type not working correctly with bar animations.\n\n|cFFFFFF00-|r Fixed an issue while loading old profiles wans't updating their values for newer versions of the addon.\n\n|cFFFFFF00-|r Fixed an issue with bookmarks panel not opening correctly.\n\n|cFFFFFF00v3.17.10 (|cFFFFCC00Aug 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed ticket #47: Title bar font resets with UI reload / relog.\n\n|cFFFFFF00-|r Fixed ticket #46: Icon select panel wasn't opening.\n\n|cFFFFFF00-|r Fixed ticket #45: Windwalker icon for Mistweaver monks.\n\n|cFFFFFF00-|r Fixed issue with vehicles exchanging ownership, e.g. Soulbound Constructor on HFC raid.\n\n|cFFFFFF00v3.17.6 (|cFFFFCC00Jul 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Major improvements on the aura tool creation for WeakAuras.\n\n|cFFFFFF00-|r Fixed some issues with spec icons where sometimes it shows four small icons.\n\n|cFFFFFF00-|r Added an option to show a stopwatch on the title text showing the elapsed time of an encounter.\n\n|cFFFFFF00-|r Window title text now shrinks correctly when isn't enough space for it.\n\n|cFFFFFF00-|r For some special cases, left click now open the report window and shift+click shows the tooltip content in the window.\n\n|cFFFFFF00-|r Damage Taken by Spells now are a part of Damage bracket (no more on custom).\n\n|cFFFFFF00-|r Fixed custom functions for the customized bar left text.\n\n|cFFFFFF00-|r Improvements on report text format and also reverse option now works as intended.\n\n|cFFFFFF00-|r Removed the option for report only what is shown in the window.\n\n|cFFFFFF00-|r Added skins for report panel, the skin follow the skin selected for Player Detail Window.\n\n|cFFFFFF00v3.16.0c (|cFFFFCC00Jul 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with Encounter Details graphic for Archimonde encounter.\n\n|cFFFFFF00-|r Numbers format on Player Detail Window now respect the format chosen on options panel.\n\n|cFFFFFF00-|r Removed pet icons on Player Detail Window.\n\n|cFFFFFF00-|r Fixed some wrong textures on spec icons.\n\n|cFFFFFF00-|r Improvements on all skins for the Player Detail Window.\n\n|cFFFFFF00v3.15.8b (|cFFFFCC00Jul 01, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Soul Capacitor trinket fix.\n\n|cFFFFFF00-|r Fixed several small bugs from 6.2 patch.\n\n|cFFFFFF00-|r Disabled the special behavior for Tyrant Velhari encounter." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_custom.lua b/classes/classe_custom.lua index 574b8848..8f8b1058 100644 --- a/classes/classe_custom.lua +++ b/classes/classe_custom.lua @@ -924,8 +924,12 @@ if (custom_object:IsScripted()) then if (custom_object.tooltip) then - local func = loadstring (custom_object.tooltip) - func (actor, instance.showing, instance) + local func = _detalhes.custom_function_cache [instance.customName .. "Tooltip"] + local okey, errortext = _pcall (func, actor, instance.showing, instance) + if (not okey) then + _detalhes:Msg ("|cFFFF9900error on custom display tooltip function|r:", errortext) + return false + end end else --> get the attribute @@ -1345,7 +1349,7 @@ local AllSpells = character:GetSpellList() local found = false for spellid, spell in pairs (AllSpells) do - if (spellid == 6262 or spellid == 156445 or spellid == 156438 or spellid == 82184) then --healthstone, reju potion, health potion, spinal healing injector + if (spellid == 6262 or spellid == 156445 or spellid == 156438 or spellid == 82184 or spellid == 173260) then --healthstone, reju potion, health potion, spinal healing injector, shieldtronic shield instance_container:AddValue (character, spell.total) total = total + spell.total if (top < spell.total) then @@ -1398,12 +1402,19 @@ GameCooltip:AddIcon (select (3, GetSpellInfo (82184)), 1, 1, 16, 16) GameCooltip:AddStatusBar (100, 1, R, G, B, A) end + + local shieldtronic = actor:GetSpell (173260) + if (shieldtronic) then + GameCooltip:AddLine (select (1, GetSpellInfo(173260)), _detalhes:ToK(shieldtronic.total)) + GameCooltip:AddIcon (select (3, GetSpellInfo (173260)), 1, 1, 16, 16) + GameCooltip:AddStatusBar (100, 1, R, G, B, A) + end --Cooltip code ]], percent_script = false, total_script = false, - script_version = 10, + script_version = 12, } -- /run _detalhes:AddDefaultCustomDisplays() local have = false diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index 03219e29..8a6a2100 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -597,7 +597,6 @@ local spellname, _, spellicon = select (1, _GetSpellInfo (from_spell)) GameCooltip:AddLine (spellname .. " " .. Loc ["STRING_CUSTOM_ATTRIBUTE_DAMAGE"], nil, nil, headerColor, nil, 10) - --GameCooltip:AddIcon ([[Interface\ICONS\Spell_Mage_InfernoBlast]], 1, 1, 14, 14, 0.078125, 0.921875, 0.078125, 0.921875) GameCooltip:AddIcon (spellicon, 1, 1, 14, 14, 0.078125, 0.921875, 0.078125, 0.921875) GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, _detalhes.tooltip_key_size_width, _detalhes.tooltip_key_size_height, 0, 1, 0, 0.640625, _detalhes.tooltip_key_overlay2) _detalhes:AddTooltipHeaderStatusbar (1, 1, 1, 0.5) @@ -621,7 +620,7 @@ GameCooltip:AddLine (" ") _detalhes:AddTooltipReportLineText() - GameCooltip:SetOption ("YSpacingMod", -1) + GameCooltip:SetOption ("YSpacingMod", 0) GameCooltip:SetOwner (esta_barra) GameCooltip:Show() @@ -3178,7 +3177,7 @@ function atributo_damage:ToolTip_Enemies (instancia, numero, barra, keydown) -- t[1] = 0 --end - GameCooltip:SetOption ("YSpacingMod", -1) + GameCooltip:SetOption ("YSpacingMod", 0) return true diff --git a/core/control.lua b/core/control.lua index 765ef1c5..c40977ec 100644 --- a/core/control.lua +++ b/core/control.lua @@ -1202,7 +1202,7 @@ function _detalhes:AddTooltipReportLineText() GameCooltip:AddLine (Loc ["STRING_CLICK_REPORT_LINE1"], Loc ["STRING_CLICK_REPORT_LINE2"]) - GameCooltip:AddStatusBar (100, 1, 0, 0, 0, 0.4) + GameCooltip:AddStatusBar (100, 1, 0, 0, 0, 0.8) end function _detalhes:AddTooltipBackgroundStatusbar (side) diff --git a/core/meta.lua b/core/meta.lua index a816e0a2..883fffd3 100644 --- a/core/meta.lua +++ b/core/meta.lua @@ -180,7 +180,8 @@ end combate_overall.segments_added =combate_overall.segments_added or {} - tinsert (combate_overall.segments_added, {name = combate:GetCombatName (true), elapsed = combate:GetCombatTime(), clock = combate:GetDate()[1]}) + local date_start, date_end = combate:GetDate() + tinsert (combate_overall.segments_added, {name = combate:GetCombatName (true), elapsed = combate:GetCombatTime(), clock = date_start}) end diff --git a/functions/link.lua b/functions/link.lua index 381ff76e..0eb31c47 100644 --- a/functions/link.lua +++ b/functions/link.lua @@ -2657,7 +2657,7 @@ end end - _detalhes:OpenAuraPanel (data[2], spellname, spellicon, data.id, DETAILS_WA_TRIGGER_DBM_TIMER, DETAILS_WA_AURATYPE_TEXT, {dbm_timer_id = data[2], text = "Next " .. spellname .. " In", text_size = 72, icon = spellicon}) + _detalhes:OpenAuraPanel (data[2], spellname, spellicon, data.id, DETAILS_WA_TRIGGER_DBM_TIMER, DETAILS_WA_AURATYPE_TEXT, {dbm_timer_id = data[2], spellid = data[7], text = "Next " .. spellname .. " In", text_size = 72, icon = spellicon}) end local dbm_timers_module = { diff --git a/plugins/Details_Vanguard/Details_Vanguard.lua b/plugins/Details_Vanguard/Details_Vanguard.lua index 0b4298e5..6401fa07 100644 --- a/plugins/Details_Vanguard/Details_Vanguard.lua +++ b/plugins/Details_Vanguard/Details_Vanguard.lua @@ -130,6 +130,11 @@ local function CreatePluginFrames (data) end Vanguard:IdentifyTanks() + + elseif (event == "DETAILS_STARTED") then + + Vanguard.CurrentInstance = Vanguard:GetInstance (Vanguard.instance_id) + Vanguard.CurrentCombat = Vanguard:GetCurrentCombat() elseif (event == "DETAILS_INSTANCE_ENDRESIZE" or event == "DETAILS_INSTANCE_SIZECHANGED") then --Vanguard:OnResize() @@ -291,17 +296,18 @@ local function CreatePluginFrames (data) self:SetWidth (width) self:SetBackdropColor (unpack (Vanguard.db.tank_block_color)) self.texture:SetTexture (SharedMedia:Fetch ("statusbar", Vanguard.db.tank_block_texture)) - end local debuff_on_enter = function (self) if (self.spellid) then + self.texture:SetBlendMode ("ADD") GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT") GameTooltip:SetSpellByID (self.spellid) GameTooltip:Show() end end local debuff_on_leave = function (self) + self.texture:SetBlendMode ("BLEND") if (self.spellid) then GameTooltip:Hide() end @@ -334,13 +340,14 @@ local function CreatePluginFrames (data) 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:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1}) f:SetBackdropColor (unpack (Vanguard.db.tank_block_color)) + f:SetBackdropBorderColor (0, 0, 0, 1) --statusbar f.statusbar = CreateFrame ("statusbar", nil, f) - f.statusbar:SetPoint ("topleft", f, "topleft", 5, -5) - f.statusbar:SetPoint ("bottomright", f, "bottomright", -5, 5) + f.statusbar:SetPoint ("topleft", f, "topleft", 1, -1) + f.statusbar:SetPoint ("bottomright", f, "bottomright", -1, 1) f.texture = f.statusbar:CreateTexture (nil, "artwork") f.statusbar:SetStatusBarTexture (f.texture) f.statusbar:SetMinMaxValues (0, 100) @@ -382,40 +389,46 @@ local function CreatePluginFrames (data) support_frame:SetSize (24, 24) support_frame:SetScript ("OnMouseUp", on_click) - support_frame:SetScript ("OnEnter", debuff_on_enter) - support_frame:SetScript ("OnLeave", debuff_on_leave) + --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) + local y = 3 + if (i == 1) then --> left support_frame:SetPoint ("left", f, "left", 5, 0) - support_frame:SetPoint ("bottom", f, "bottom", 0, 5) + support_frame:SetPoint ("bottom", f, "bottom", 0, y) texture:SetPoint ("left", f, "left", 5, 0) - texture:SetPoint ("bottom", f, "bottom", 0, 5) + texture:SetPoint ("bottom", f, "bottom", 0, y) elseif (i == 2) then --> center support_frame:SetPoint ("center", f, "center", 0, 0) - support_frame:SetPoint ("bottom", f, "bottom", 0, 5) + support_frame:SetPoint ("bottom", f, "bottom", 0, y) texture:SetPoint ("center", f, "center", 0, 0) - texture:SetPoint ("bottom", f, "bottom", 0, 5) + texture:SetPoint ("bottom", f, "bottom", 0, y) elseif (i == 3) then --> right support_frame:SetPoint ("right", f, "right", -5, 0) - support_frame:SetPoint ("bottom", f, "bottom", 0, 5) + support_frame:SetPoint ("bottom", f, "bottom", 0, y) texture:SetPoint ("right", f, "right", -5, 0) - texture:SetPoint ("bottom", f, "bottom", 0, 5) + texture:SetPoint ("bottom", f, "bottom", 0, y) end local dblock = CreateFrame ("cooldown", "VanguardTankBlock" .. index.. "Cooldown" .. i, support_frame, "CooldownFrameTemplate") + dblock:SetAlpha (0.7) dblock:SetPoint ("topleft", texture, "topleft") dblock:SetPoint ("bottomright", texture, "bottomright") dblock:SetScript ("OnMouseUp", on_click) dblock.texture = texture + + dblock:SetScript ("OnEnter", debuff_on_enter) + dblock:SetScript ("OnLeave", debuff_on_leave) local stack = dblock:CreateFontString (nil, "overlay", "GameFontNormal") stack:SetPoint ("bottomright", dblock, "bottomright", 8, 0) @@ -512,6 +525,7 @@ local function CreatePluginFrames (data) Vanguard.Running = true VanguardFrame:RegisterEvent ("UNIT_HEALTH") + VanguardFrame:RegisterEvent ("UNIT_HEALTH_FREQUENT") --Vanguard:TrackDebuffsAlreadyApplied() VanguardFrame:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED") @@ -526,6 +540,7 @@ local function CreatePluginFrames (data) Vanguard.Running = false VanguardFrame:UnregisterEvent ("UNIT_HEALTH") + VanguardFrame:UnregisterEvent ("UNIT_HEALTH_FREQUENT") VanguardFrame:UnregisterEvent ("COMBAT_LOG_EVENT_UNFILTERED") if (Vanguard.track_incoming) then @@ -536,15 +551,11 @@ local function CreatePluginFrames (data) function Vanguard:DebuffRefreshed (who_name, spellid) local tank_index = Vanguard.TankHashNames [who_name] - --print ("On Refres tank index:", tank_index) if (tank_index) then local tframe = Vanguard.TankBlocks [tank_index] - --print ("Tank index OKE, tframe:", tframe) for i = 1, 3 do local dblock = tframe.debuffs_blocks [i] if (dblock.support.spellid == spellid) then - --print ("REFRESH OKEY!") - local debuff_name = GetSpellInfo (spellid) local _, _, icon, count, _, duration, expirationTime = _UnitDebuff (who_name, debuff_name) @@ -613,6 +624,8 @@ local function CreatePluginFrames (data) end dblock.texture:SetTexture (icon) + dblock.texture:SetTexCoord (0.078125, 0.921875, 0.078125, 0.921875) + if (count and count > 0) then dblock.stack:SetText (count) dblock.stack_bg:Show() @@ -624,6 +637,7 @@ local function CreatePluginFrames (data) dblock:SetCooldown (GetTime(), expirationTime-GetTime(), 0, 0) dblock.in_use = true dblock.support.spellid = spellid + dblock.spellid = spellid for i = 1, 3 do if (not tframe.debuffs_blocks [i].in_use) then @@ -777,7 +791,7 @@ function Vanguard:OnEvent (_, event, arg1, token, time, who_serial, who_name, wh end - elseif (event == "UNIT_HEALTH") then + elseif (event == "UNIT_HEALTH" or event == "UNIT_HEALTH_FREQUENT") then Vanguard:HealthChanged (arg1) elseif (event == "ADDON_LOADED") then @@ -789,13 +803,13 @@ function Vanguard:OnEvent (_, event, arg1, token, time, who_serial, who_name, wh local MINIMAL_DETAILS_VERSION_REQUIRED = 1 local default_saved_table = { - show_inc_bars = true, + show_inc_bars = false, tank_block_size = 150, - tank_block_color = {0, 0, 0, 0.8}, + tank_block_color = {0.24705882, 0.0039215, 0, 0.8}, tank_block_texture = "Details Serenity", first_run = false, } - + --> Install function Vanguard:OnDetailsEvent() end --> dummy func to stop warnings.