diff --git a/boot.lua b/boot.lua index fb570b8a..7a4471b0 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 = 253 --it's 253 for release - _detalhes.userversion = "v3.4.4" + _detalhes.build_counter = 259 --it's 259 for release + _detalhes.userversion = "v3.4.7" _detalhes.realversion = 49 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -18,6 +18,14 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ +|cFFFFFF00v3.4.7 (|cFFFFCC00Dec 11, 2014|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Advanced Death Logs plugin got updates on Endurance Player Value and few bug fixes.\n\n +|cFFFFFF00-|r Max Window Amount options can new be set to 1, before the minimum was 3.\n\n +|cFFFFFF00-|r Fixed a problem with friendly fire tooltip where sometimes it doesn't show up.\n\n +|cFFFFFF00-|r Fixed cooldowns tooltip which wasn't showing rounded numbers (49.99 instead of 50).\n\n +|cFFFFFF00-|r Fixed Warrior's Shield Block which wasn't being count as a cooldown.\n\n +|cFFFFFF00-|r Fixed a problem where sometimes when a hunter pull and reset the boss right after, was causing segments to merge.\n\n + |cFFFFFF00v3.4.4 (|cFFFFCC00Dec 05, 2014|r|cFFFFFF00)|r:\n\n |cFFFFFF00-|r Fixed a issue with Ko'Ragh boss on Highmaul raid.\n\n |cFFFFFF00-|r Few changes on Bookmark panel.\n\n @@ -34,7 +42,7 @@ do |cFFFFFF00-|r Fixed the border for sub menus on mode menu.\n\n --]] - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.4.4 (|cFFFFCC00Dec 05, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a issue with Ko'Ragh boss on Highmaul raid.\n\n|cFFFFFF00-|r Few changes on Bookmark panel.\n\n|cFFFFFF00v3.4.3 (|cFFFFCC00Dec 02, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Removed 'Simple Gray' skin.\n\n|cFFFFFF00-|r Addde new skin: 'Forced Square'.\n\n|cFFFFFF00-|r 'Default Skin' got renamed to 'WoW Interface'.\n\n|cFFFFFF00v3.4.2 (|cFFFFCC00Dec 01, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a bug with menu desaturation where erase and close buttons stay colored after clicking on it.\n\n|cFFFFFF00-|r Fixed stretch where sometimes after release the window, all exceeded bars shows up and fade in again.\n\n|cFFFFFF00-|r Fixed a bug with the +- buttons on the window's scale option.\n\n|cFFFFFF00-|r Fixed the border for sub menus on mode menu.\n\n|cFFFFFF00v3.4.0 (|cFFFFCC00Nov 29, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed custom displays ignoring 'target' setted.\n\n|cFFFFFF00-|r Fixed plugins showing its icon even when auto hide menus is enabled.\n\n|cFFFFFF00-|r .Updates slash command 'worldboss' now it shows Draenor bosses.\n\n|cFFFFFF00v3.3.0 (|cFFFFCC00Nov 25, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 3D models for the bars in the window. The options are at Appearance -> Rows: Advanced.\n\n|cFFFFFF00-|r Now when showing custom displays, clicking on a bar report what is shown on bar's tooltip.\n\n|cFFFFFF00-|r More fixes for dungeon bosses identification.\n\n|cFFFFFF00-|r Fixed a tooltip bug with Debuff Uptime and Aura & Voidzone displays.\n\n|cFFFFFF00-|r Fixed Player Details Window for friendly fire and damage taken.\n\n|cFFFFFF00-|r Fixed Molten Core Raid Finder version where all bosses was considered trash segments.\n\n|cFFFFFF00v3.2.4 (|cFFFFCC00Nov 19, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r More fixes for dungeon bosses recognition.\n\n|cFFFFFF00-|r Fixes for few errors during combat parser.\n\n|cFFFFFF00v3.2.3 (|cFFFFCC00Nov 18, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed Monk's Stagger ability which was counting as damage done.\n\n|cFFFFFF00-|r Added WoD dungeon information, this fixes dungeon bosses being assigned as 'trash cleanup'.\n\n|cFFFFFF00-|r Added more information on API.txt document (is in Details! root folder).\n\n|cFFFFFF00v3.2.1 (|cFFFFCC00Nov 14, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Custom Displays updated to track WoD potions.\n\n|cFFFFFF00-|r Added Feedback panel at options panel.\n\n|cFFFFFF00v3.2.0 (|cFFFFCC00Nov 11, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Major changes on the way Details! store information, these changes saves up to 40% memory and 4% cpu usage.\n\n|cFFFFFF00-|r Fixed problem with pet's healing messing with the owner activity time.\n\n|cFFFFFF00-|r Added Energy -> Resources.\n\n|cFFFFFF00-|r Fixed combat initialization when the player start casting a Dot spell.\n\n|cFFFFFF00-|r Added new custom display: Damage Taken By Spell.\n\n|cFFFFFF00v2.2.3 (|cFFFFCC00Oct 26, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the healing done problem with Priest's Spirit of Redemption.\n\n|cFFFFFF00-|r Fixed avoidance by absorb when the hit missed was a multistrike hit.\n\n|cFFFFFF00-|r Fixed a script time out problem when erasing data while in combat.\n\n|cFFFFFF00-|r Fixed bug with interrupt tooltip when the player have a pet.\n\n|cFFFFFF00v2.2.1 (|cFFFFCC00Oct 22, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the gap between the button and its menu which sometimes traveling the mouse between them was activating tooltips from window's bars.\n\n|cFFFFFF00-|r Fixed an annoying menu blink when the window was near the right side of the screen.\n\n|cFFFFFF00-|r Fixed the stretch grab which was over other windows even with the 'stretch always on top' option disabled.\n\n|cFFFFFF00-|r Few fixes on healing done from absorbs.\n\n|cFFFFFF00v2.1.6 (|cFFFFCC00Oct 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed death's tooltip which wasn't respecting tooltip's configuration set on options panel.\n\n|cFFFFFF00-|r Now when the window is close to the top of the screen, menus will anchor on bottom side of the menu icons.\n\n|cFFFFFF00-|r Added micro displays options on Window Settings bracket.\n\n|cFFFFFF00-|r Fixed the problem with bar's custom texts.\n\n|cFFFFFF00-|r Lua functions inside custom texts, Chart Data scripts and Custom Displays scripts are now protected calls and won't break the addon functionality if an error occurs. Unfortunately we still doesn't have a documentation for Details! API.\n\n|cFFFFFF00-|r Fixed an incomum bug with tank avoidance tables.\n\n|cFFFFFF00-|r Tiny Threat: added option to use class colors instead of green-to-red colors.\n\n|cFFFFFF00-|r Added option to enable shadows on toolbar's buttons.\n\n|cFFFFFF00-|r Added option to set the specing between each button on toolbar.\n\n|cFFFFFF00-|r Finally we merged the left and right menus into only one with 6 icons.\n\n|cFFFFFF00-|r Removed window button and added a new option bracket to manage windows under Mode Menu.\n\n|cFFFFFF00-|r Few changes on 'Default Skin', 'Minimalistic', 'Simple Gray' and 'ElvUI Frame Style BW' (need reaply).\n\n|cFFFFFF00- Important:|r If the menus is out of the position, just reaply the skin.\n\nv2.0.15 (|cFFFFCC00Oct 15, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed tooltips where sometimes it wans't showing at all.\n\n|cFFFFFF00-|r Fixed the healing done amount on Malkorok encounter.\n\nv2.0.14 (|cFFFFCC00Oct 14, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added pre-potion recognition for WoD pots.\n\n|cFFFFFF00-|r Added spell list for Blackrock Foundry encounters.\n\n|cFFFFFF00-|r Added mouse wheel scroll speed option.\n\n|cFFFFFF00-|r Added support for healing multistrike and damage multistrike.\n\n|cFFFFFF00-|r Added a Change Log button on Options Panel.\n\n|cFFFFFF00-|r When the windows is locked, trying to move the window through toolbar will stretch it instead.\n\n|cFFFFFF00-|r Renamed overheal for shields, now its called 'shield wasted'.\n\n|cFFFFFF00-|r Fine tuning on healing done, should have high accuracy now.\n\n|cFFFFFF00-|r Encounter Details plugin now supports Highmaul and Blackrock Foundry.\n\n|cFFFFFF00-|r New class cooldowns and spells recognition.\n\n|cFFFFFF00-|r Fixed few bugs on comparison panel and avoidance panel.\n\n|cFFFFFF00-|r Fixed encounter recognition, now it should show the encounter name over segments menu.\n\n|cFFFFFF00-|r Fixed Graphic part of Encounter Details Plugin, now he draws more accurately.\n\n|cFFFFFF00v1.29.3 (|cFFFFCC00Oct 11, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an addon crash bug when clicking directly on the sword button.\n\n|cFFFFFF00-|r Removed Flat Skin, added new skin: Serenity.\n\n|cFFFFFF00-|r Fixed many issues with bar animations.\n\n|cFFFFFF00-|r Fixed combat encounter start if the player already is in combat when the boss is pulled.\n\n|cFFFFFF00-|r Fixed wheel scroll when sometimes it move very slow or doesn't move the bars at all." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.4.7 (|cFFFFCC00Dec 11, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs plugin got updates on Endurance Player Value and few bug fixes.\n\n|cFFFFFF00-|r Max Window Amount options can new be set to 1, before the minimum was 3.\n\n|cFFFFFF00-|r Fixed a problem with friendly fire tooltip where sometimes it wasn't showing up.\n\n|cFFFFFF00-|r Fixed cooldowns tooltip which wasn't showing rounded numbers (49.99 instead of 50).\n\n|cFFFFFF00-|r Fixed Warrior's Shield Block which wasn't being count as a cooldown.\n\n|cFFFFFF00-|r Fixed a problem where sometimes when a hunter pull and reset the boss right after, was causing segments to merge.\n\n|cFFFFFF00v3.4.4 (|cFFFFCC00Dec 05, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a issue with Ko'Ragh boss on Highmaul raid.\n\n|cFFFFFF00-|r Few changes on Bookmark panel.\n\n|cFFFFFF00v3.4.3 (|cFFFFCC00Dec 02, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Removed 'Simple Gray' skin.\n\n|cFFFFFF00-|r Addde new skin: 'Forced Square'.\n\n|cFFFFFF00-|r 'Default Skin' got renamed to 'WoW Interface'.\n\n|cFFFFFF00v3.4.2 (|cFFFFCC00Dec 01, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a bug with menu desaturation where erase and close buttons stay colored after clicking on it.\n\n|cFFFFFF00-|r Fixed stretch where sometimes after release the window, all exceeded bars shows up and fade in again.\n\n|cFFFFFF00-|r Fixed a bug with the +- buttons on the window's scale option.\n\n|cFFFFFF00-|r Fixed the border for sub menus on mode menu.\n\n|cFFFFFF00v3.4.0 (|cFFFFCC00Nov 29, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed custom displays ignoring 'target' setted.\n\n|cFFFFFF00-|r Fixed plugins showing its icon even when auto hide menus is enabled.\n\n|cFFFFFF00-|r .Updates slash command 'worldboss' now it shows Draenor bosses.\n\n|cFFFFFF00v3.3.0 (|cFFFFCC00Nov 25, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 3D models for the bars in the window. The options are at Appearance -> Rows: Advanced.\n\n|cFFFFFF00-|r Now when showing custom displays, clicking on a bar report what is shown on bar's tooltip.\n\n|cFFFFFF00-|r More fixes for dungeon bosses identification.\n\n|cFFFFFF00-|r Fixed a tooltip bug with Debuff Uptime and Aura & Voidzone displays.\n\n|cFFFFFF00-|r Fixed Player Details Window for friendly fire and damage taken.\n\n|cFFFFFF00-|r Fixed Molten Core Raid Finder version where all bosses was considered trash segments.\n\n|cFFFFFF00v3.2.4 (|cFFFFCC00Nov 19, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r More fixes for dungeon bosses recognition.\n\n|cFFFFFF00-|r Fixes for few errors during combat parser.\n\n|cFFFFFF00v3.2.3 (|cFFFFCC00Nov 18, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed Monk's Stagger ability which was counting as damage done.\n\n|cFFFFFF00-|r Added WoD dungeon information, this fixes dungeon bosses being assigned as 'trash cleanup'.\n\n|cFFFFFF00-|r Added more information on API.txt document (is in Details! root folder).\n\n|cFFFFFF00v3.2.1 (|cFFFFCC00Nov 14, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Custom Displays updated to track WoD potions.\n\n|cFFFFFF00-|r Added Feedback panel at options panel.\n\n|cFFFFFF00v3.2.0 (|cFFFFCC00Nov 11, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Major changes on the way Details! store information, these changes saves up to 40% memory and 4% cpu usage.\n\n|cFFFFFF00-|r Fixed problem with pet's healing messing with the owner activity time.\n\n|cFFFFFF00-|r Added Energy -> Resources.\n\n|cFFFFFF00-|r Fixed combat initialization when the player start casting a Dot spell.\n\n|cFFFFFF00-|r Added new custom display: Damage Taken By Spell.\n\n|cFFFFFF00v2.2.3 (|cFFFFCC00Oct 26, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the healing done problem with Priest's Spirit of Redemption.\n\n|cFFFFFF00-|r Fixed avoidance by absorb when the hit missed was a multistrike hit.\n\n|cFFFFFF00-|r Fixed a script time out problem when erasing data while in combat.\n\n|cFFFFFF00-|r Fixed bug with interrupt tooltip when the player have a pet.\n\n|cFFFFFF00v2.2.1 (|cFFFFCC00Oct 22, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the gap between the button and its menu which sometimes traveling the mouse between them was activating tooltips from window's bars.\n\n|cFFFFFF00-|r Fixed an annoying menu blink when the window was near the right side of the screen.\n\n|cFFFFFF00-|r Fixed the stretch grab which was over other windows even with the 'stretch always on top' option disabled.\n\n|cFFFFFF00-|r Few fixes on healing done from absorbs.\n\n|cFFFFFF00v2.1.6 (|cFFFFCC00Oct 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed death's tooltip which wasn't respecting tooltip's configuration set on options panel.\n\n|cFFFFFF00-|r Now when the window is close to the top of the screen, menus will anchor on bottom side of the menu icons.\n\n|cFFFFFF00-|r Added micro displays options on Window Settings bracket.\n\n|cFFFFFF00-|r Fixed the problem with bar's custom texts.\n\n|cFFFFFF00-|r Lua functions inside custom texts, Chart Data scripts and Custom Displays scripts are now protected calls and won't break the addon functionality if an error occurs. Unfortunately we still doesn't have a documentation for Details! API.\n\n|cFFFFFF00-|r Fixed an incomum bug with tank avoidance tables.\n\n|cFFFFFF00-|r Tiny Threat: added option to use class colors instead of green-to-red colors.\n\n|cFFFFFF00-|r Added option to enable shadows on toolbar's buttons.\n\n|cFFFFFF00-|r Added option to set the specing between each button on toolbar.\n\n|cFFFFFF00-|r Finally we merged the left and right menus into only one with 6 icons.\n\n|cFFFFFF00-|r Removed window button and added a new option bracket to manage windows under Mode Menu.\n\n|cFFFFFF00-|r Few changes on 'Default Skin', 'Minimalistic', 'Simple Gray' and 'ElvUI Frame Style BW' (need reaply).\n\n|cFFFFFF00- Important:|r If the menus is out of the position, just reaply the skin.\n\nv2.0.15 (|cFFFFCC00Oct 15, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed tooltips where sometimes it wans't showing at all.\n\n|cFFFFFF00-|r Fixed the healing done amount on Malkorok encounter.\n\nv2.0.14 (|cFFFFCC00Oct 14, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added pre-potion recognition for WoD pots.\n\n|cFFFFFF00-|r Added spell list for Blackrock Foundry encounters.\n\n|cFFFFFF00-|r Added mouse wheel scroll speed option.\n\n|cFFFFFF00-|r Added support for healing multistrike and damage multistrike.\n\n|cFFFFFF00-|r Added a Change Log button on Options Panel.\n\n|cFFFFFF00-|r When the windows is locked, trying to move the window through toolbar will stretch it instead.\n\n|cFFFFFF00-|r Renamed overheal for shields, now its called 'shield wasted'.\n\n|cFFFFFF00-|r Fine tuning on healing done, should have high accuracy now.\n\n|cFFFFFF00-|r Encounter Details plugin now supports Highmaul and Blackrock Foundry.\n\n|cFFFFFF00-|r New class cooldowns and spells recognition.\n\n|cFFFFFF00-|r Fixed few bugs on comparison panel and avoidance panel.\n\n|cFFFFFF00-|r Fixed encounter recognition, now it should show the encounter name over segments menu." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index 23a7ebc9..23ede4ef 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -1965,9 +1965,12 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra, keydown local Skills = {} for target_name, ff_table in _pairs (FriendlyFire) do - DamagedPlayers [#DamagedPlayers+1] = {target_name, ff_table.total, combat (1, target_name).classe} - for spellid, amount in _pairs (ff_table.spells) do - Skills [#Skills+1] = {spellid, amount} + local actor = combat (1, target_name) + if (actor) then + DamagedPlayers [#DamagedPlayers+1] = {target_name, ff_table.total, actor.classe} + for spellid, amount in _pairs (ff_table.spells) do + Skills [#Skills+1] = {spellid, amount} + end end end diff --git a/classes/classe_others.lua b/classes/classe_others.lua index c14d74a2..e64e7c8b 100644 --- a/classes/classe_others.lua +++ b/classes/classe_others.lua @@ -1608,9 +1608,9 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra) r, g, b = unpack (_detalhes.class_colors [owner.classe]) else r, g, b = unpack (_detalhes.class_colors [self.classe]) - end + end - local meu_total = self ["cooldowns_defensive"] + local meu_total = _math_floor (self ["cooldowns_defensive"]) local minha_tabela = self.cooldowns_defensive_spells._ActorTable --> habilidade usada para interromper diff --git a/core/parser.lua b/core/parser.lua index 6f790201..ea021eca 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -142,7 +142,7 @@ end function parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, multistrike) - + ------------------------------------------------------------------------------------------------ --> early checks and fixes @@ -563,13 +563,29 @@ ------------------------------------------------------------------------------------------------ --> amount add - --> actor spells table - local spell = este_jogador.spells._ActorTable [spellid] - if (not spell) then - spell = este_jogador.spells:PegaHabilidade (spellid, true, token) + if (missType == "ABSORB") then + + if (token == "SWING_MISSED") then + return parser:swing ("SWING_DAMAGE", time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, amountMissed, -1, 1, nil, nil, nil, false, false, false, false, multistrike) + + elseif (token == "RANGE_MISSED") then + return parser:range ("RANGE_DAMAGE", time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amountMissed, -1, 1, nil, nil, nil, false, false, false, false, multistrike) + + else + return parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amountMissed, -1, 1, nil, nil, nil, false, false, false, false, multistrike) + + end + + else + --> actor spells table + local spell = este_jogador.spells._ActorTable [spellid] + if (not spell) then + spell = este_jogador.spells:PegaHabilidade (spellid, true, token) + end + return spell_damageMiss_func (spell, alvo_serial, alvo_name, alvo_flags, who_name, missType) end - return spell_damageMiss_func (spell, alvo_serial, alvo_name, alvo_flags, who_name, missType) - --return spell:AddMiss (alvo_serial, alvo_name, alvo_flags, who_name, missType) + + end ----------------------------------------------------------------------------------------------------------------------------------------- @@ -1776,7 +1792,11 @@ --> search key: ~spellcast ~castspell ~cast function parser:spellcast (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype) - + + --if (spellname == "Shield Block") then + -- print (who_name, spellid, spellname) + --end + ------------------------------------------------------------------------------------------------ --> record cooldowns cast which can't track with buff applyed. @@ -2594,7 +2614,7 @@ _detalhes:SairDoCombate (false, true) --wipe end else - if (_detalhes.tabela_vigente.end_time + 2 >= _detalhes.encounter_table ["end"]) then + if ((_detalhes.tabela_vigente.end_time or 0) + 2 >= _detalhes.encounter_table ["end"]) then --_detalhes.tabela_vigente.start_time = _detalhes.encounter_table ["start"] _detalhes.tabela_vigente.end_time = _detalhes.encounter_table ["end"] _detalhes:AtualizaGumpPrincipal (-1, true) diff --git a/core/plugins_toolbar.lua b/core/plugins_toolbar.lua index 416aed96..42cd4474 100644 --- a/core/plugins_toolbar.lua +++ b/core/plugins_toolbar.lua @@ -26,6 +26,7 @@ --> create button from template local button = CreateFrame ("button", framename, _detalhes.listener, "DetailsToolbarButton") + --button:SetScript ("OnHide", function (self) print (debugstack()) end) --> sizes if (w) then diff --git a/core/util.lua b/core/util.lua index e891fdd5..a44d3216 100644 --- a/core/util.lua +++ b/core/util.lua @@ -232,6 +232,23 @@ end return s end + + function _detalhes:percent_color (value) + local r, g + if (value < 50) then + r = 255 + else + r = _math_floor ( 255 - (value * 2 - 100) * 255 / 100) + end + + if (value > 50) then + g = 255 + else + g = _math_floor ( (value * 2) * 255 / 100) + end + + return r/255, g/255, 0 + end --> unpack more than 1 table -- http://www.dzone.com/snippets/lua-unpack-multiple-tables diff --git a/functions/spells.lua b/functions/spells.lua index e2345a08..61835e9a 100644 --- a/functions/spells.lua +++ b/functions/spells.lua @@ -1223,6 +1223,7 @@ do --[114203] = {180, 15}, -- Demoralizing Banner [114028] = {60, 5}, -- Mass Spell Reflection [97462] = {180, 10}, -- Rallying Cry + [2565] = {12, 6}, -- Shield Block } _detalhes.DefensiveCooldownSpells = { @@ -1299,9 +1300,8 @@ do [23920] = {25, 5}, -- Spell Reflection [114030] = {120, 12}, -- Vigilance [118038] = {120, 8}, -- Die by the Sword - [2565] = {90, 6}, -- Shield Block [112048] = {90, 6}, -- Shield Barrier - ["WARRIOR"] = {871, 12975, 23920, 114030, 118038, 114028, 97462} --114203 + ["WARRIOR"] = {871, 12975, 23920, 114030, 118038, 114028, 97462, 2565} --114203 } diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index efc22380..ebb0797d 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -3403,7 +3403,7 @@ function window:CreateFrame1() --> Max Instances g:NewLabel (frame1, _, "$parentLabelMaxInstances", "maxInstancesLabel", Loc ["STRING_OPTIONS_MAXINSTANCES"], "GameFontHighlightLeft") -- - local s = g:NewSlider (frame1, _, "$parentSliderMaxInstances", "maxInstancesSlider", SLIDER_WIDTH, 20, 3, 30, 1, _detalhes.instances_amount) -- min, max, step, defaultv + local s = g:NewSlider (frame1, _, "$parentSliderMaxInstances", "maxInstancesSlider", SLIDER_WIDTH, 20, 1, 30, 1, _detalhes.instances_amount) -- min, max, step, defaultv s:SetBackdrop (slider_backdrop) s:SetBackdropColor (unpack (slider_backdrop_color)) s:SetThumbSize (50) diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index efab1a59..0e948254 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -784,6 +784,9 @@ local function move_janela (baseframe, iniciando, instancia) if (need_start) then --> se a instância não tiver sido aberta ainda + local lower_instance = _detalhes:GetLowerInstanceNumber() + --print (lower_instance, instancia_alvo.meu_id, DEATHGRAPHICS_BUTTON:GetParent():GetName()) + instancia_alvo:RestauraJanela (instancia_alvo.meu_id, true) if (instancia_alvo:IsSoloMode()) then _detalhes.SoloTables:switch() @@ -2452,10 +2455,9 @@ function _detalhes:InstanceAlert (msg, icon, time, clickfunc) self.alert.button.clickfunction = nil end - if (time) then - self.alert_time = time - _detalhes:ScheduleTimer ("InstanceAlertTime", time, self) - end + time = time or 15 + self.alert_time = time + _detalhes:ScheduleTimer ("InstanceAlertTime", time, self) self.alert:SetPoint ("bottom", self.baseframe, "bottom", 0, -12) self.alert:SetPoint ("left", self.baseframe, "left", 3, 0) @@ -2554,14 +2556,14 @@ function CreateAlertFrame (baseframe, instancia) return alert_bg end -function _detalhes:InstanceMsg (text, icon, textcolor, icontexture, iconcoords, iconcolor) +function _detalhes:InstanceMsg (text, icon, textcolor, iconcoords, iconcolor) if (not text) then self.freeze_icon:Hide() return self.freeze_texto:Hide() end self.freeze_texto:SetText (text) - self.freeze_icon:SetTexture (icon) + self.freeze_icon:SetTexture (icon or [[Interface\CHARACTERFRAME\Disconnect-Icon]]) self.freeze_icon:Show() self.freeze_texto:Show() @@ -2572,12 +2574,6 @@ function _detalhes:InstanceMsg (text, icon, textcolor, icontexture, iconcoords, else self.freeze_texto:SetTextColor (1, 1, 1, 1) end - - if (icontexture) then - self.freeze_icon:SetTexture (icontexture) - else - self.freeze_icon:SetTexture ([[Interface\CHARACTERFRAME\Disconnect-Icon]]) - end if (iconcoords and type (iconcoords) == "table") then self.freeze_icon:SetTexCoord (_unpack (iconcoords)) diff --git a/plugins/Details_RaidInfo-Highmaul/Details_RaidInfo-Highmaul.lua b/plugins/Details_RaidInfo-Highmaul/Details_RaidInfo-Highmaul.lua index 4ee0872c..494e569c 100644 --- a/plugins/Details_RaidInfo-Highmaul/Details_RaidInfo-Highmaul.lua +++ b/plugins/Details_RaidInfo-Highmaul/Details_RaidInfo-Highmaul.lua @@ -42,12 +42,25 @@ local highmaul = { encounter_ids2 = { --combatlog encounter id - + [1721] = 1, --kargath + [1706] = 2, --the butcher + [1722] = 3, --tectus + [1720] = 4, --brakenspore + [1719] = 5, --twin ogron + [1723] = 6, --Koragh + [1705] = 7, --Margok }, boss_ids = { --npc ids - + [78714] = 1, --Kargath + [77404] = 2, --The Butcher + [78948] = 3, --Tectus + [78491] = 4, --Brakenspore + [78238] = 5, --Pol + [78237] = 5, --Phemos + [79015] = 6, --Koragh + [77428] = 7, --Margok }, encounters = { diff --git a/startup.lua b/startup.lua index 00efc309..7ca268f8 100644 --- a/startup.lua +++ b/startup.lua @@ -671,5 +671,6 @@ function _G._detalhes:Start() _detalhes:InstallEncounter (molten_core) + end