diff --git a/boot.lua b/boot.lua index 9b39d037..d33becfb 100644 --- a/boot.lua +++ b/boot.lua @@ -1,10 +1,10 @@ - ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> global name declaration _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") _detalhes.build_counter = 1095 --it's 1095 for release - _detalhes.userversion = "v3.15.5" + _detalhes.userversion = "v3.15.5a" _detalhes.realversion = 70 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes @@ -21,7 +21,12 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v3.15.4 (|cFFFFCC00Jun 08, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00v3.15.5a (|cFFFFCC00Jun 11, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Fixed an issue where sometimes tooltips wasn't being shown.\n\n +|cFFFFFF00-|r Fixed a problem with overall data where it was using, even on dungoens, the raid-only 30 delay rule.\n\n +|cFFFFFF00-|r Fixed an issue with spec detection (now it may detect even faster).\n\n + +|cFFFFFF00v3.15.5 (|cFFFFCC00Jun 08, 2015|r|cFFFFFF00)|r:\n\n |cFFFFFF00-|r Fixed a problem with auto hide feature not hiding plugins hosted by the window.\n\n |cFFFFFF00-|r Fixed an issue with stretch feature when the anchor button was anchored at the bottom side of the window.\n\n |cFFFFFF00-|r Small interface tweaks on tooltips, bookmark and player detail window.\n\n @@ -36,11 +41,9 @@ do |cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n --]] ---|cFFFFFF00v3.15.1 (|cFFFFCC00May 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n|cFFFFFF00-|r Effective time will automatically be used when inside a battleground and using sync from the score board.\n\n|cFFFFFF00-|r Added 'hide all' option on the minimap menu.\n\n|cFFFFFF00-|r Added support for battlegrounds.\n\n|cFFFFFF00-|r Added option for disable showing battleground enemies when the window is in group mode.\n\n|cFFFFFF00-|r Added option to disable the sync from battleground score board.\n\n|cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n - -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.15.5 (|cFFFFCC00Jun 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a problem with auto hide feature not hiding plugins hosted by the window.\n\n|cFFFFFF00-|r Fixed an issue with stretch feature when the anchor button was anchored at the bottom side of the window.\n\n|cFFFFFF00-|r Small interface tweaks on tooltips, bookmark and player detail window.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show amount of casts and uptime.\n\n|cFFFFFF00-|r Added an extra tooltip for the class icon at the player's bar.\n\n|cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n|cFFFFFF00-|r Effective time will automatically be used when inside a battleground and using sync from the score board.\n\n|cFFFFFF00-|r Added 'hide all' option on the minimap menu.\n\n|cFFFFFF00-|r Added support for battlegrounds.\n\n|cFFFFFF00-|r Added option for disable showing battleground enemies when the window is in group mode.\n\n|cFFFFFF00-|r Added option to disable the sync from battleground score board.\n\n|cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n|cFFFFFF00v3.14.4 (|cFFFFCC00May 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r TimeLine (plugin): now also shows marks symbolizing the player death.\n\n|cFFFFFF00-|r Added raid history panel. Open it through bookmark or /details history.\n\n|cFFFFFF00-|r Added support for skins for Player Detail Window.\n\n|cFFFFFF00-|r Added report history on report button.\n\n|cFFFFFF00-|r Added key bindings settings for report what is shown on window #1 or #2.\n\n|cFFFFFF00v3.14.0b (|cFFFFCC00May 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Several texture changes for a smaller download size.\n\n|cFFFFFF00v3.13.4a (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created 'Details! Forge' but is still under development: /details forge.\n\n|cFFFFFF00-|r Several improvements on combatlog reader and custom displays.\n\n|cFFFFFF00-|r Improvements on enemies damage taken tooltip.\n\n|cFFFFFF00v3.13.1 (|cFFFFCC00April 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window and Comparison Panel.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel.\n\n|cFFFFFF00-|r Wallpaper for menus on title bar got a customization option under tooltips bracket on Options Panel.\n\n|cFFFFFF00-|r Updated spell list for Crowd Control and class detection.\n\n|cFFFFFF00-|r Improved Weakaura creation tool under Encounter Details Plugin.\n\n|cFFFFFF00v3.12.10 (|cFFFFCC00April 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the spell uptime on damage player detail window.\n\n|cFFFFFF00-|r Added Rune Tap as cooldown.\n\n|cFFFFFF00-|r Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.\n\n|cFFFFFF00-|r Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.\n\n|cFFFFFF00v3.12.7 (|cFFFFCC00April 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash command /details profile .\n\n|cFFFFFF00v3.12.6 (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): added a report button on Emotes tab.\n\n|cFFFFFF00-|r Encounter Details (plugin): improved Weakauras creation.\n\n|cFFFFFF00-|r Encounter Details (plugin): fixed the report text for interrupts and dispells.\n\n|cFFFFFF00-|r Crowd control by Pets now is merged with its owner.\n\n|cFFFFFF00-|r Truncated left text on bars now shows the entire text when hover over the bar.\n\n|cFFFFFF00-|r Added an extra option on minimap menu to disable the minimap icon.\n\n|cFFFFFF00-|r Fixed a problem when disabling the minimap icon through options panel.\n\n|cFFFFFF00-|r Fixed an issue with item level tracker feature.\n\n|cFFFFFF00v3.12.2 (|cFFFFCC00Mar 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Raid Check (plugin): added item level.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): bug fixes, it's important to update it.\n\n|cFFFFFF00-|r Time Line (plugin): bug fixes.\n\n|cFFFFFF00-|r Added option to disabled th eitem level tracker.\n\n|cFFFFFF00-|r Added item level on Raid Check plugin panel.\n\n|cFFFFFF00-|r Added Spirit Link Totem damage and healing on death log.\n\n|cFFFFFF00-|r Added the total of life exchanged by the Spirit Link Totem on player detail window.\n\n|cFFFFFF00-|r Added more spells for crowd control.\n\n|cFFFFFF00-|r Added scroll on bookmark panel.\n\n|cFFFFFF00-|r Fixed issue with Dps/Hps data broker which wasn't respecting the type of time (effective/activity) selected.\n\n|cFFFFFF00-|r Fixed few bugs when using the key bind to toggle windows.\n\n|cFFFFFF00v3.11.5 (|cFFFFCC00Mar 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data where max/min amount for spells was being calculated wrong.\n\n|cFFFFFF00-|r Fixed a problem while reporting enemy damage taken.\n\n|cFFFFFF00-|r Fixed an issue with damage taken by spell where some spells wasn't shown.\n\n|cFFFFFF00-|r Few improvements on tooltips.\n\n|cFFFFFF00-|r Fixed a accuracy problem with shaman's spirit link toten where its life exchange was considered healing done.\n\n|cFFFFFF00-|r Boss segments now need to have at least 30 seconds to be added on the overall data.\n\n|cFFFFFF00-|r When the segment limit is reach, segments with less combat time will be erased instead of the olders.\n\n|cFFFFFF00-|r Added item level tracker.\n\n|cFFFFFF00-|r Fixed window positioning when changing from Solo mode to Group mode.\n\n|cFFFFFF00-|r Added an option for change the amount of lines on death log.\n\n|cFFFFFF00-|r Added custom display for CC done.\n\n|cFFFFFF00v3.10.10 (|cFFFFCC00Mar 10, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): done a calibration on endurance calculation.\n\n|cFFFFFF00-|r Raid Check (plugin): now also show information for 50+ stats runes.\n\n|cFFFFFF00-|r Fixed cooldowns spell targets on overall data.\n\n|cFFFFFF00-|r Fixed report custom displays where sometimes it didn't report spell links.\n\n|cFFFFFF00-|r Replaced old report line saying 'for the last X segments' with 'overall data'.\n\n|cFFFFFF00-|r Mini-displays on statusbar are now more responsible to right button click.\n\n|cFFFFFF00-|r Added Mage's Greater Invisibility as cooldown.\n\n|cFFFFFF00v3.10.8 (|cFFFFCC00Mar 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improved aura creation.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show your pets.\n\n|cFFFFFF00-|r Fixed 'Raid Check' plugin food detection." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.15.5a (|cFFFFCC00Jun 12, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue where sometimes tooltips wasn't being shown.\n\n|cFFFFFF00-|r Fixed a problem with overall data where it was using, even on dungoens, the raid-only 30 delay rule.\n\n|cFFFFFF00-|r Fixed an issue with spec detection (now it may detect even faster).\n\n|cFFFFFF00v3.15.5 (|cFFFFCC00Jun 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a problem with auto hide feature not hiding plugins hosted by the window.\n\n|cFFFFFF00-|r Fixed an issue with stretch feature when the anchor button was anchored at the bottom side of the window.\n\n|cFFFFFF00-|r Small interface tweaks on tooltips, bookmark and player detail window.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show amount of casts and uptime.\n\n|cFFFFFF00-|r Added an extra tooltip for the class icon at the player's bar.\n\n|cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n|cFFFFFF00-|r Effective time will automatically be used when inside a battleground and using sync from the score board.\n\n|cFFFFFF00-|r Added 'hide all' option on the minimap menu.\n\n|cFFFFFF00-|r Added support for battlegrounds.\n\n|cFFFFFF00-|r Added option for disable showing battleground enemies when the window is in group mode.\n\n|cFFFFFF00-|r Added option to disable the sync from battleground score board.\n\n|cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n|cFFFFFF00v3.14.4 (|cFFFFCC00May 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r TimeLine (plugin): now also shows marks symbolizing the player death.\n\n|cFFFFFF00-|r Added raid history panel. Open it through bookmark or /details history.\n\n|cFFFFFF00-|r Added support for skins for Player Detail Window.\n\n|cFFFFFF00-|r Added report history on report button.\n\n|cFFFFFF00-|r Added key bindings settings for report what is shown on window #1 or #2.\n\n|cFFFFFF00v3.14.0b (|cFFFFCC00May 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Several texture changes for a smaller download size.\n\n|cFFFFFF00v3.13.4a (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created 'Details! Forge' but is still under development: /details forge.\n\n|cFFFFFF00-|r Several improvements on combatlog reader and custom displays.\n\n|cFFFFFF00-|r Improvements on enemies damage taken tooltip.\n\n|cFFFFFF00v3.13.1 (|cFFFFCC00April 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window and Comparison Panel.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel.\n\n|cFFFFFF00-|r Wallpaper for menus on title bar got a customization option under tooltips bracket on Options Panel.\n\n|cFFFFFF00-|r Updated spell list for Crowd Control and class detection.\n\n|cFFFFFF00-|r Improved Weakaura creation tool under Encounter Details Plugin.\n\n|cFFFFFF00v3.12.10 (|cFFFFCC00April 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the spell uptime on damage player detail window.\n\n|cFFFFFF00-|r Added Rune Tap as cooldown.\n\n|cFFFFFF00-|r Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.\n\n|cFFFFFF00-|r Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.\n\n|cFFFFFF00v3.12.7 (|cFFFFCC00April 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash command /details profile .\n\n|cFFFFFF00v3.12.6 (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): added a report button on Emotes tab.\n\n|cFFFFFF00-|r Encounter Details (plugin): improved Weakauras creation.\n\n|cFFFFFF00-|r Encounter Details (plugin): fixed the report text for interrupts and dispells.\n\n|cFFFFFF00-|r Crowd control by Pets now is merged with its owner.\n\n|cFFFFFF00-|r Truncated left text on bars now shows the entire text when hover over the bar.\n\n|cFFFFFF00-|r Added an extra option on minimap menu to disable the minimap icon.\n\n|cFFFFFF00-|r Fixed a problem when disabling the minimap icon through options panel.\n\n|cFFFFFF00-|r Fixed an issue with item level tracker feature.\n\n|cFFFFFF00v3.12.2 (|cFFFFCC00Mar 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Raid Check (plugin): added item level.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): bug fixes, it's important to update it.\n\n|cFFFFFF00-|r Time Line (plugin): bug fixes.\n\n|cFFFFFF00-|r Added option to disabled th eitem level tracker.\n\n|cFFFFFF00-|r Added item level on Raid Check plugin panel.\n\n|cFFFFFF00-|r Added Spirit Link Totem damage and healing on death log.\n\n|cFFFFFF00-|r Added the total of life exchanged by the Spirit Link Totem on player detail window.\n\n|cFFFFFF00-|r Added more spells for crowd control.\n\n|cFFFFFF00-|r Added scroll on bookmark panel.\n\n|cFFFFFF00-|r Fixed issue with Dps/Hps data broker which wasn't respecting the type of time (effective/activity) selected.\n\n|cFFFFFF00-|r Fixed few bugs when using the key bind to toggle windows.\n\n|cFFFFFF00v3.11.5 (|cFFFFCC00Mar 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data where max/min amount for spells was being calculated wrong.\n\n|cFFFFFF00-|r Fixed a problem while reporting enemy damage taken.\n\n|cFFFFFF00-|r Fixed an issue with damage taken by spell where some spells wasn't shown.\n\n|cFFFFFF00-|r Few improvements on tooltips.\n\n|cFFFFFF00-|r Fixed a accuracy problem with shaman's spirit link toten where its life exchange was considered healing done.\n\n|cFFFFFF00-|r Boss segments now need to have at least 30 seconds to be added on the overall data.\n\n|cFFFFFF00-|r When the segment limit is reach, segments with less combat time will be erased instead of the olders.\n\n|cFFFFFF00-|r Added item level tracker.\n\n|cFFFFFF00-|r Fixed window positioning when changing from Solo mode to Group mode.\n\n|cFFFFFF00-|r Added an option for change the amount of lines on death log.\n\n|cFFFFFF00-|r Added custom display for CC done.\n\n|cFFFFFF00v3.10.10 (|cFFFFCC00Mar 10, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): done a calibration on endurance calculation." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_combate.lua b/classes/classe_combate.lua index 3bc5be98..1047ba3d 100644 --- a/classes/classe_combate.lua +++ b/classes/classe_combate.lua @@ -62,6 +62,10 @@ return self [attribute] end + function combate:InstanceType() + return _rawget (self, "instance_type") + end + function combate:IsTrash() return _rawget (self, "is_trash") end diff --git a/classes/container_combatentes.lua b/classes/container_combatentes.lua index 0e52f6b6..07cf4754 100644 --- a/classes/container_combatentes.lua +++ b/classes/container_combatentes.lua @@ -269,9 +269,7 @@ end end end - - novo_objeto.flag_original = flag - novo_objeto.serial = serial + end local pet_blacklist = {} @@ -362,6 +360,8 @@ local novo_objeto = self.funcao_de_criacao (_, serial, nome) novo_objeto.nome = nome + novo_objeto.flag_original = flag + novo_objeto.serial = serial -- tipo do container ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ diff --git a/classes/container_historico.lua b/classes/container_historico.lua index b131a548..8023e9ea 100644 --- a/classes/container_historico.lua +++ b/classes/container_historico.lua @@ -162,7 +162,7 @@ function historico:adicionar (tabela) end if (overall_added) then - if (tabela.is_boss and tabela:GetCombatTime() < 30) then + if (tabela.is_boss and tabela:InstanceType() == "raid" and tabela:GetCombatTime() < 30) then _detalhes:Msg ("segment not added to overall (less than 30 seconds of combat time).") else if (_detalhes.debug) then diff --git a/functions/playerclass.lua b/functions/playerclass.lua index 9f435f08..0cc940a5 100644 --- a/functions/playerclass.lua +++ b/functions/playerclass.lua @@ -100,6 +100,7 @@ do if (Actor.minha_barra and type (Actor.minha_barra) == "table") then Actor.minha_barra.minha_tabela = nil + _detalhes:ScheduleWindowUpdate() end return class @@ -119,6 +120,7 @@ do if (Actor.minha_barra and type (Actor.minha_barra) == "table") then Actor.minha_barra.minha_tabela = nil + _detalhes:ScheduleWindowUpdate() end return class @@ -158,14 +160,17 @@ do local Actor, container = t[1], t[2] local SpecSpellList = _detalhes.SpecSpellList - if (Actor.spells) then - for spellid, _ in _pairs (Actor.spells._ActorTable) do - local spec = SpecSpellList [spellid] - if (spec) then - if (spec ~= Actor.spec) then + --> get from the spell cast list + if (_detalhes.tabela_vigente) then + local misc_actor = _detalhes.tabela_vigente (4, Actor.nome) + if (misc_actor and misc_actor.spell_cast) then + for spellid, _ in pairs (misc_actor.spell_cast) do + local spec = SpecSpellList [spellid] + if (spec) then _detalhes.cached_specs [Actor.serial] = spec Actor.spec = spec + Actor.guessing_spec = nil if (container) then container.need_refresh = true @@ -173,103 +178,159 @@ do if (Actor.minha_barra and type (Actor.minha_barra) == "table") then Actor.minha_barra.minha_tabela = nil + _detalhes:ScheduleWindowUpdate() end return spec - else - break end end end - - if (Actor.classe == "HUNTER") then - local container_misc = _detalhes.tabela_vigente[4] - local index = container_misc._NameIndexTable [Actor.nome] - if (index) then - local misc_actor = container_misc._ActorTable [index] - local buffs = misc_actor.buff_uptime_spells and misc_actor.buff_uptime_spells._ActorTable - if (buffs) then - for spellid, spell in _pairs (buffs) do - local spec = SpecSpellList [spellid] - if (spec) then - if (spec ~= Actor.spec) then - _detalhes.cached_specs [Actor.serial] = spec - - Actor.spec = spec + else + if (Actor.spells) then + for spellid, _ in _pairs (Actor.spells._ActorTable) do + local spec = SpecSpellList [spellid] + if (spec) then + if (spec ~= Actor.spec) then + _detalhes.cached_specs [Actor.serial] = spec + + Actor.spec = spec + + if (container) then + container.need_refresh = true + end + + if (Actor.minha_barra and type (Actor.minha_barra) == "table") then + Actor.minha_barra.minha_tabela = nil + _detalhes:ScheduleWindowUpdate() + end + + return spec + else + break + end + end + end + + if (Actor.classe == "HUNTER") then + local container_misc = _detalhes.tabela_vigente[4] + local index = container_misc._NameIndexTable [Actor.nome] + if (index) then + local misc_actor = container_misc._ActorTable [index] + local buffs = misc_actor.buff_uptime_spells and misc_actor.buff_uptime_spells._ActorTable + if (buffs) then + for spellid, spell in _pairs (buffs) do + local spec = SpecSpellList [spellid] + if (spec) then + if (spec ~= Actor.spec) then + _detalhes.cached_specs [Actor.serial] = spec - if (container) then - container.need_refresh = true - end + Actor.spec = spec + + if (container) then + container.need_refresh = true + end + + if (Actor.minha_barra and type (Actor.minha_barra) == "table") then + Actor.minha_barra.minha_tabela = nil + _detalhes:ScheduleWindowUpdate() + end - if (Actor.minha_barra and type (Actor.minha_barra) == "table") then - Actor.minha_barra.minha_tabela = nil + return spec + else + break end - - return spec - else - break end end end end end + end - end end - + function _detalhes:GuessSpec (t) - + local Actor, container, tries = t[1], t[2], t[3] if (not Actor) then return false end - local guid = UnitGUID (Actor.nome) - if (guid) then - local spec = _detalhes.cached_specs [guid] - if (spec) then - Actor.spec = spec - Actor.guessing_spec = nil - - if (container) then - container.need_refresh = true - end - - if (Actor.minha_barra and type (Actor.minha_barra) == "table") then - Actor.minha_barra.minha_tabela = nil - end - - return spec - end - end - local SpecSpellList = _detalhes.SpecSpellList - if (Actor.spells) then --> correcao pros containers misc, precisa pegar os diferentes tipos de containers de lá - for spellid, _ in _pairs (Actor.spells._ActorTable) do - local spec = SpecSpellList [spellid] - if (spec) then - - _detalhes.cached_specs [Actor.serial] = spec - - Actor.spec = spec - Actor.guessing_spec = nil + --local misc_actor = info.instancia.showing (4, self:name()) + --spell_cast + + --> get from the spec cache + local spec = _detalhes.cached_specs [Actor.serial] + if (spec) then + Actor.spec = spec + Actor.guessing_spec = nil + + if (container) then + container.need_refresh = true + end + + if (Actor.minha_barra and type (Actor.minha_barra) == "table") then + Actor.minha_barra.minha_tabela = nil + _detalhes:ScheduleWindowUpdate() + end + + return spec + end + + --> get from the spell cast list + if (_detalhes.tabela_vigente) then + local misc_actor = _detalhes.tabela_vigente (4, Actor.nome) + if (misc_actor and misc_actor.spell_cast) then + for spellid, _ in pairs (misc_actor.spell_cast) do + local spec = SpecSpellList [spellid] + if (spec) then + _detalhes.cached_specs [Actor.serial] = spec - if (container) then - container.need_refresh = true - end + Actor.spec = spec + Actor.guessing_spec = nil + + if (container) then + container.need_refresh = true + end + + if (Actor.minha_barra and type (Actor.minha_barra) == "table") then + Actor.minha_barra.minha_tabela = nil + _detalhes:ScheduleWindowUpdate() + end - if (Actor.minha_barra and type (Actor.minha_barra) == "table") then - Actor.minha_barra.minha_tabela = nil + return spec + end + end + end + else + + if (Actor.spells) then --> correcao pros containers misc, precisa pegar os diferentes tipos de containers de lá + for spellid, _ in _pairs (Actor.spells._ActorTable) do + local spec = SpecSpellList [spellid] + if (spec) then + _detalhes.cached_specs [Actor.serial] = spec + + Actor.spec = spec + Actor.guessing_spec = nil + + if (container) then + container.need_refresh = true + end + + if (Actor.minha_barra and type (Actor.minha_barra) == "table") then + Actor.minha_barra.minha_tabela = nil + _detalhes:ScheduleWindowUpdate() + end + + return spec end - - return spec end end end - + if (Actor.classe == "HUNTER") then local container_misc = _detalhes.tabela_vigente[4] local index = container_misc._NameIndexTable [Actor.nome] @@ -292,6 +353,7 @@ do if (Actor.minha_barra and type (Actor.minha_barra) == "table") then Actor.minha_barra.minha_tabela = nil + _detalhes:ScheduleWindowUpdate() end return spec @@ -316,6 +378,7 @@ do if (Actor.minha_barra and type (Actor.minha_barra) == "table") then Actor.minha_barra.minha_tabela = nil + _detalhes:ScheduleWindowUpdate() end return spec diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 872d7454..35e8d310 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -2196,7 +2196,29 @@ end icon_frame_events:RegisterEvent ("COMBAT_PLAYER_ENTER", "EnterCombat") function icon_frame_events:CancelAnim (anim) + + local anim, timeout = unpack (anim) + if (_detalhes.icon_animations.load.in_use [anim]) then + + if (timeout) then + local f = anim + if (not f.question_icon) then + f.question_icon = f.parent:GetParent():GetParent().border:CreateTexture (nil, "overlay") + f.question_icon:SetTexture ([[Interface\GossipFrame\ActiveLegendaryQuestIcon]]) + f.question_icon:SetSize (16, 16) + end + f.question_icon:Show() + f.question_icon:SetPoint ("center", f.parent, "center") + + if (not _detalhes.HideBarQuestionIcon) then + function _detalhes:HideBarQuestionIcon (frame) + frame.question_icon:Hide() + end + end + _detalhes:ScheduleTimer ("HideBarQuestionIcon", 2, f) + end + _detalhes.icon_animations.load.in_use [anim] = nil tinsert (_detalhes.icon_animations.load.available, anim) anim.anim:Stop() @@ -2208,21 +2230,25 @@ function icon_frame_events:CancelAnim (anim) end local icon_frame_inspect_callback = function (guid, unitid, icon_frame) + if (icon_frame.icon_animation) then + icon_frame.icon_animation.anim:Stop() + icon_frame.icon_animation:Hide() + end + local is_in_use = _detalhes.icon_animations.load.in_use [icon_frame.icon_animation] if (is_in_use) then tinsert (_detalhes.icon_animations.load.available, icon_frame.icon_animation) _detalhes.icon_animations.load.in_use [icon_frame.icon_animation] = nil end - icon_frame.icon_animation.anim:Stop() - icon_frame.icon_animation:Hide() - if (icon_frame:IsMouseOver()) then icon_frame_on_enter (icon_frame) end - icon_frame.icon_animation.icon_frame = nil - icon_frame.icon_animation = nil + if (icon_frame.icon_animation) then + icon_frame.icon_animation.icon_frame = nil + icon_frame.icon_animation = nil + end end local icon_frame_create_animation = function() @@ -2242,7 +2268,14 @@ local icon_frame_create_animation = function() tinsert (_detalhes.icon_animations.load.available, f) end -local icon_frame_on_click = function (self) +local icon_frame_on_click_down = function (self) + self:GetParent():GetParent().icone_classe:SetPoint ("left", self:GetParent():GetParent(), "left", 1, -1) +end + +local icon_frame_on_click_up = function (self) + + self:GetParent():GetParent().icone_classe:SetPoint ("left", self:GetParent():GetParent(), "left") + if (_detalhes.in_combat) then _detalhes:Msg (Loc ["STRING_QUERY_INSPECT_FAIL1"]) return @@ -2250,6 +2283,40 @@ local icon_frame_on_click = function (self) if (self.showing == "actor") then if (_detalhes.ilevel.core:HasQueuedInspec (self.unitname)) then + + --> icon animation + local anim = tremove (_detalhes.icon_animations.load.available) + if (not anim) then + icon_frame_create_animation() + anim = tremove (_detalhes.icon_animations.load.available) + end + + local f = anim + if (not f.question_icon) then + f.question_icon = self:GetParent():GetParent().border:CreateTexture (nil, "overlay") + f.question_icon:SetTexture ([[Interface\GossipFrame\ActiveLegendaryQuestIcon]]) + f.question_icon:SetSize (16, 16) + end + + f.question_icon:ClearAllPoints() + f.question_icon:SetPoint ("center", self, "center") + f.question_icon:Show() + + if (not _detalhes.HideBarQuestionIcon) then + function _detalhes:HideBarQuestionIcon (frame) + frame.question_icon:Hide() + end + end + _detalhes:ScheduleTimer ("HideBarQuestionIcon", 1, f) + + self.icon_animation = anim + anim.icon_frame = self + + local pid + pid = icon_frame_events:ScheduleTimer ("CancelAnim", 1, {anim}) + _detalhes.icon_animations.load.in_use [anim] = pid + anim.parent = self + return end @@ -2280,18 +2347,24 @@ local icon_frame_on_click = function (self) local pid if (does_query) then - pid = icon_frame_events:ScheduleTimer ("CancelAnim", 4, anim) + pid = icon_frame_events:ScheduleTimer ("CancelAnim", 4, {anim, true}) else - pid = icon_frame_events:ScheduleTimer ("CancelAnim", 0.2, anim) + pid = icon_frame_events:ScheduleTimer ("CancelAnim", 0.2, {anim}) end _detalhes.icon_animations.load.in_use [anim] = pid + anim.parent = self + + if (anim.question_icon) then + anim.question_icon:Hide() + end end end local set_frame_icon_scripts = function (row) row.icon_frame:SetScript ("OnEnter", icon_frame_on_enter) row.icon_frame:SetScript ("OnLeave", icon_frame_on_leave) - row.icon_frame:SetScript ("OnMouseUp", icon_frame_on_click) + row.icon_frame:SetScript ("OnMouseDown", icon_frame_on_click_down) + row.icon_frame:SetScript ("OnMouseUp", icon_frame_on_click_up) end local function barra_scripts (esta_barra, instancia, i) diff --git a/startup.lua b/startup.lua index 27f85619..fd32b6de 100644 --- a/startup.lua +++ b/startup.lua @@ -115,7 +115,22 @@ function _G._detalhes:Start() --> start instances updater - _detalhes:CheckSwitchOnLogon() + self:CheckSwitchOnLogon() + + function _detalhes:ScheduledWindowUpdate (forced) + if (not forced and _detalhes.in_combat) then + return + end + _detalhes.scheduled_window_update = nil + _detalhes:AtualizaGumpPrincipal (-1, true) + end + function _detalhes:ScheduleWindowUpdate (time, forced) + if (_detalhes.scheduled_window_update) then + _detalhes:CancelTimer (_detalhes.scheduled_window_update) + _detalhes.scheduled_window_update = nil + end + _detalhes.scheduled_window_update = _detalhes:ScheduleTimer ("ScheduledWindowUpdate", time or 1, forced) + end self:AtualizaGumpPrincipal (-1, true) self.atualizador = self:ScheduleRepeatingTimer ("AtualizaGumpPrincipal", _detalhes.update_speed, -1)