From ac57e570a9906795652ce2e26f968603050afdcc Mon Sep 17 00:00:00 2001 From: Tercio Date: Wed, 29 Jul 2015 21:28:31 -0300 Subject: [PATCH] - Fixed issue with vehicles exchanging ownership, e.g. Soulbound Constructor on HFC raid. --- boot.lua | 19 +++++----------- classes/classe_others.lua | 15 ++++++++++--- classes/container_pets.lua | 46 ++++++++++++++++++++++++++++++++++---- core/parser.lua | 22 +++++++++++++++++- functions/link.lua | 21 +++++++++++++---- 5 files changed, 98 insertions(+), 25 deletions(-) diff --git a/boot.lua b/boot.lua index 70ddc5e2..889fbdba 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 = 1319 --it's 1319 for release - _detalhes.userversion = "v3.17.6" + _detalhes.userversion = "v3.17.7" _detalhes.realversion = 73 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes @@ -21,22 +21,14 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|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.17.7 (|cFFFFCC00Jul 29, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Fixed issue with vehicles exchanging ownership, e.g. Soulbound Constructor on HFC raid.\n\n + --]] -- - Loc ["STRING_VERSION_LOG"] = "|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.\n\n|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." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.17.7 (|cFFFFCC00Jul 29, 2015|r|cFFFFFF00)|r:\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.\n\n|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." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " @@ -93,6 +85,7 @@ do --> ignored pets _detalhes.pets_ignored = {} _detalhes.pets_no_owner = {} + _detalhes.pets_players = {} --> armazena as skins disponíveis para as janelas _detalhes.skins = {} --> armazena os hooks das funções do parser diff --git a/classes/classe_others.lua b/classes/classe_others.lua index 66caf851..43d2c894 100644 --- a/classes/classe_others.lua +++ b/classes/classe_others.lua @@ -1538,7 +1538,10 @@ function _detalhes:CatchRaidBuffUptime (in_or_out) for playername, potspellid in _pairs (pot_usage) do local name, _, icon = _GetSpellInfo (potspellid) local _, class = UnitClass (playername) - local class_color = RAID_CLASS_COLORS [class].colorStr + local class_color = "" + if (class and RAID_CLASS_COLORS [class]) then + class_color = RAID_CLASS_COLORS [class].colorStr + end string_output = string_output .. "|c" .. class_color .. playername .. "|r |T" .. icon .. ":14:14:0:0:64:64:0:64:0:64|t " end @@ -1604,7 +1607,10 @@ function _detalhes:CatchRaidBuffUptime (in_or_out) for playername, potspellid in _pairs (pot_usage) do local name, _, icon = _GetSpellInfo (potspellid) local _, class = UnitClass (playername) - local class_color = RAID_CLASS_COLORS [class].colorStr + local class_color = "" + if (class and RAID_CLASS_COLORS [class]) then + class_color = RAID_CLASS_COLORS [class].colorStr + end string_output = string_output .. "|c" .. class_color .. playername .. "|r |T" .. icon .. ":14:14:0:0:64:64:0:64:0:64|t " end @@ -1644,7 +1650,10 @@ function _detalhes:CatchRaidBuffUptime (in_or_out) for playername, potspellid in _pairs (pot_usage) do local name, _, icon = _GetSpellInfo (potspellid) local _, class = UnitClass (playername) - local class_color = RAID_CLASS_COLORS [class].colorStr + local class_color = "" + if (class and RAID_CLASS_COLORS [class]) then + class_color = RAID_CLASS_COLORS [class].colorStr + end string_output = string_output .. "|c" .. class_color .. playername .. "|r |T" .. icon .. ":14:14:0:0:64:64:0:64:0:64|t " end diff --git a/classes/container_pets.lua b/classes/container_pets.lua index d2040f08..b6193da3 100644 --- a/classes/container_pets.lua +++ b/classes/container_pets.lua @@ -111,8 +111,38 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags) return end ---> ao ter raid roster update, precisa dar foreach no container de pets e verificar as flags ---> o mesmo precisa ser feito com as tabelas de combate +function container_pets:Unpet (...) + local unitid = ... + + local owner_serial = _UnitGUID (unitid) + + if (owner_serial) then + --tira o pet existente da tabela de pets e do cache do core + local existing_pet_serial = _detalhes.pets_players [owner_serial] + if (existing_pet_serial) then + _detalhes.parser:RevomeActorFromCache (existing_pet_serial) + container_pets:Remover (existing_pet_serial) + _detalhes.pets_players [owner_serial] = nil + end + --verifica se há um pet novo deste jogador + local pet_serial = _UnitGUID (unitid .. "pet") + if (pet_serial) then + if (not _detalhes.tabela_pets.pets [pet_serial]) then + local nome, realm = _UnitName (unitid) + if (realm and realm ~= "") then + nome = nome.."-"..realm + end + _detalhes.tabela_pets:Adicionar (pet_serial, _UnitName (unitid .. "pet"), 0x1114, owner_serial, nome, 0x514) + end + _detalhes.parser:RevomeActorFromCache (pet_serial) + container_pets:PlayerPet (owner_serial, pet_serial) + end + end +end + +function container_pets:PlayerPet (player_serial, pet_serial) + _detalhes.pets_players [player_serial] = pet_serial +end function container_pets:BuscarPets() if (_IsInRaid()) then @@ -124,7 +154,10 @@ function container_pets:BuscarPets() if (realm and realm ~= "") then nome = nome.."-"..realm end - _detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("raidpet"..i), 0x1114, _UnitGUID ("raid"..i), nome, 0x514) + local owner_serial = _UnitGUID ("raid"..i) + _detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("raidpet"..i), 0x1114, owner_serial, nome, 0x514) + _detalhes.parser:RevomeActorFromCache (pet_serial) + container_pets:PlayerPet (owner_serial, pet_serial) end end end @@ -162,7 +195,12 @@ function container_pets:BuscarPets() end end --- 4372 = 1114 -> pet control player -> friendly -> aff raid +function container_pets:Remover (pet_serial) + if (_detalhes.tabela_pets.pets [pet_serial]) then + table.wipe (_detalhes.tabela_pets.pets [pet_serial]) + end + _detalhes.tabela_pets.pets [pet_serial] = nil +end function container_pets:Adicionar (pet_serial, pet_nome, pet_flags, dono_serial, dono_nome, dono_flags) diff --git a/core/parser.lua b/core/parser.lua index 916e4f7e..57ad42a6 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -1206,7 +1206,7 @@ parser:dead ("UNIT_DIED", time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags) ignore_death [who_name] = true return - elseif (spellid == 184293) then --> WOD trinket: Soul Capacitor T18 + elseif (spellid == 184293) then --> WOD trinket: Soul Capacitor T18 (soul eruption 184559) soul_capacitor [who_serial] = _tempo end @@ -3192,6 +3192,7 @@ end function _detalhes.parser_functions:UNIT_PET (...) + _detalhes.container_pets:Unpet (...) _detalhes:SchedulePetUpdate (1) end @@ -3609,6 +3610,25 @@ misc_cache = setmetatable ({}, _detalhes.weaktable) end + + function parser:RevomeActorFromCache (actor_serial, actor_name) + if (actor_name) then + damage_cache [actor_name] = nil + damage_cache_pets [actor_name] = nil + damage_cache_petsOwners [actor_name] = nil + healing_cache [actor_name] = nil + energy_cache [actor_name] = nil + misc_cache [actor_name] = nil + end + if (actor_serial) then + damage_cache [actor_serial] = nil + damage_cache_pets [actor_serial] = nil + damage_cache_petsOwners [actor_serial] = nil + healing_cache [actor_serial] = nil + energy_cache [actor_serial] = nil + misc_cache [actor_serial] = nil + end + end function _detalhes:UptadeRaidMembersCache() diff --git a/functions/link.lua b/functions/link.lua index cea1431e..428f7e6e 100644 --- a/functions/link.lua +++ b/functions/link.lua @@ -901,8 +901,8 @@ function _detalhes:BossModsLink() if (_G.DBM) then - local dbm_callback_phase = function (event, msg) - + local dbm_callback_phase = function (event, msg, ...) + local mod = _detalhes.encounter_table.DBM_Mod if (not mod) then @@ -942,15 +942,23 @@ DBM:RegisterCallback ("DBM_Announce", dbm_callback_phase) DBM:RegisterCallback ("pull", dbm_callback_pull) + + --DBM:RegisterCallback ("DBM_TimerStart", function (a, b, c, d, e, f, g) + -- print (a, b, c, d, e, f, g) + --end) end + + LoadAddOn ("BigWigs_Core") if (BigWigs and not _G.DBM) then BigWigs:Enable() - function _detalhes:BigWigs_Message (event, module, key, text) - --print ("new bigwigs message...") + function _detalhes:BigWigs_Message (event, module, key, text, ...) + + --print (event, module, key, text, ...) + if (key == "stages") then local phase = text:gsub (".*%s", "") phase = tonumber (phase) @@ -976,6 +984,11 @@ end BigWigs.RegisterMessage (_detalhes, "BigWigs_Message") + + --function _detalhes:BigWigs_StartBar (...) + -- print (...) + --end + --BigWigs.RegisterMessage (_detalhes, "BigWigs_StartBar") end end