diff --git a/boot.lua b/boot.lua index fe1ee2a6..c0e873fe 100644 --- a/boot.lua +++ b/boot.lua @@ -3,7 +3,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 4132 + _detalhes.build_counter = 4153 _detalhes.userversion = "v7.2.5." .. _detalhes.build_counter _detalhes.realversion = 121 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -21,16 +21,13 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v7.2.5.4102.121 (|cFFFFCC00June 22th, 2017|r|cFFFFFF00)|r:\n\n -|cFFFFFF00-|r Details! Forge has updated and now is more usder friendly.\n\n -|cFFFFFF00-|r Fixed an issue with player buff uptime where sometimes some buffs wans't showing in the tooltip.\n\n +|cFFFFFF00v7.2.5.4153.121 (|cFFFFCC00June 24th, 2017|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Fixed Monk Stagger where it was only shown on the friendly fire and not under the Damage Taken display.\n\n --]] ---|cFFFFFF00v7.2.5.4102.121 (|cFFFFCC00June 22th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! Forge has updated and now is more usder friendly.\n\n|cFFFFFF00-|r Fixed an issue with player buff uptime where sometimes some buffs wans't showing in the tooltip.\n\n - -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v7.2.5.4102.121 (|cFFFFCC00June 22th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! Forge has updated and now is more usder friendly.\n\n|cFFFFFF00-|r Fixed an issue with player buff uptime where sometimes some buffs wans't showing in the tooltip.\n\n|cFFFFFF00v7.2.5.3968.120 (|cFFFFCC00June 20th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r New Death Recap implemented! replaces the default from Blizzard and can be configured at Options > Raid Tools.\n\n|cFFFFFF00-|r New Guild Damage and Heal rank on '/details ranking' panel.\n\n|cFFFFFF00-|r Added a Guild Sync button on the Details! Ranking Panel.\n\n|cFFFFFF00-|r Added Custom display 'Damage on Shields', useful for encounter like Maiden of Vigilance where there's big shields to be removed and you want to know who is doing more damage to it.\n\n|cFFFFFF00-|r Added Heal Absorbed display under Heal bracket.\n\nHeal Absorb are the heal denied by abilities such like DK's Necrotic Strike or raid boss Sisters of the Moon 'Embrace of the Eclipse' ability.\nThe tooltip of this display shows which players got heal denied, which abilities absorbed the heal, which abilities tried to heal but got the heal denied.\n\n|cFFFFFF00-|r Added Alternate Power display under Energy bracket, it shows the total of alternate power gain from each player, useful for encounters such as Demonic Inquisition.\n\n|cFFFFFF00-|r 'First Hit' message after pulling a boss, now also shows who the boss is targeting (almost always is who pulled).\n\n|cFFFFFF00-|r Raid Dps {rdps} and Hps {rhps} can now be used on the Broker Data Feed..\n\n|cFFFFFF00-|r Fixed an issue with Chromie from the scenario 'The Deaths of Chromie' where she wasn't being shown on the meter.\n\n|cFFFFFF00-|r Fixed Paladin 'Light of the Martyr' damage to self.\n\n|cFFFFFF00-|r Ticket #198 'Script Error' Fixed.\n\n|cFFFFFF00v7.2.0.3703.119 (|cFFFFCC00May 29th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an error while killing low level mobs with warrior class.\n\n|cFFFFFF00v7.2.0.3693.118 (|cFFFFCC00May 25th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fury Warrior shouldn't be assigned as Protection any more.\n\n|cFFFFFF00-|r Some parser fixes.\n\n|cFFFFFF00v7.2.0.3673.118 (|cFFFFCC00May 09th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #187: Fixed an issue when comparing hunter pets on the player detail window.\n\n|cFFFFFF00-|r Ticket #189 #186: Fixed a taint issue for some classes when using friendly nameplates on.\n\n|cFFFFFF00v7.2.0.3512.116 (|cFFFFCC00April 27th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Havoc Demon Hunter: your fury energy is being shown under Mana Restored (don't ask me why, the combat log is telling us it's mana).\n\n|cFFFFFF00-|r Pets now are shown on damage tooltips.\n\n|cFFFFFF00-|r Pets are now also shown on the comparison panel.\n\n|cFFFFFF00v7.2.0.3474.116 (|cFFFFCC00April 20th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin: Raid Check > added some food buffs which wasn't being tracked.\n\n|cFFFFFF00v7.2.0.3467.116 (|cFFFFCC00April 07th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the custom display window where apply and cancel buttons where over the edit window.\n\n|cFFFFFF00-|r Fix for an issue on editing a bookmark.\n\n|cFFFFFF00v7.1.5.3459.116 (|cFFFFCC00Mar 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue on dynamic overall data where it wasn't showing DPS.\n\n|cFFFFFF00-|r Fixed an issue with Apply, Save and Cancel buttons when editing a custom display.\n\n|cFFFFFF00-|r Removed the Damage and Healing presets for custom displays, now is only possible create custom displays by scripting them.\n\n|cFFFFFF00v7.1.5.3431.116 (|cFFFFCC00Mar 15th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with bar orientation right to left where fixed bar color isn't working.\n\n|cFFFFFF00-|r The nickname field now use FrizQuadrataTT font and shall be compatible with Cyrillic.\n\n|cFFFFFF00v7.1.5.3418.116 (|cFFFFCC00Mar 1st, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #167 fix: Light of the Martyr self-damage now does reduce the healing done (following WCL method).\n\n|cFFFFFF00-|r Ticket #169 fix: Damage Prevented is now working for new segments.\n\n|cFFFFFF00-|r Fixed an issue where sometimes BeastMaster's Hati pet wasn't detected correctly.\n\n|cFFFFFF00v7.1.5.3369.116 (|cFFFFCC00Feb 07th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added custom display 'Dynamic Overall Damage' for mythic dungeons.\n\n|cFFFFFF00-|r Fix for Ticket #168: 'Auto Hide While [Not] Inside Instance is broken'.\n\n|cFFFFFF00-|r The bar truncate frame 'DetailsLeftTextAntiTruncate' is now created on Details! load instead on demand.\n\n|cFFFFFF00v7.1.5.3315.116 (|cFFFFCC00Jan 23th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #162: 'no Monochrome font' available, added an experimental slash command: /run _detalhes:UseOutline ('MONOCHROME').\n\n|cFFFFFF00-|r Ticket #158: 'no elapsed time shown on report to chat', added the elapsed time when reporting a segment.\n\n|cFFFFFF00-|r Ticket #164: 'error when browsing segments', an attempt to fix the problem has been made.\n\n|cFFFFFF00v7.1.5.3305.116 (|cFFFFCC00Jan 15th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Another fix for mythic dungeons overall data reset (thanks Tharai @ Curseforge).\n\n|cFFFFFF00-|r Fix for spec detection on PvP Arenas (thanks Pas06 @ Curseforge).\n\n|cFFFFFF00v7.1.0.3276.115 (|cFFFFCC00Jan 08th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the overall data not reseting when starting a new mythic+ dungeon.\n\n|cFFFFFF00v7.1.0.3266.115 (|cFFFFCC00Dec 29th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data not updating correctly at the end of the combat.\n\n|cFFFFFF00-|r Added a tutorial line on the window when the user access overall data.\n\n|cFFFFFF00v7.1.0.3236.115 (|cFFFFCC00Dec 19th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Integration with BigWigs should be working okay now.\n\n|cFFFFFF00v7.1.0.3231.115 (|cFFFFCC00Dec 15th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Disabled the link with BigWigs to avoid the 'RegisterMessage' error on every login.\n\n|cFFFFFF00v7.1.0.3229.115 (|cFFFFCC00Dec 09th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r When a window is locked, resize grips shouldn't be enabled messing with bar mouse over.\n\n|cFFFFFF00v7.0.3.3222.115 (|cFFFFCC00November 28th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Unstable Affliction to common spells with the same name.\n\n|cFFFFFF00-|r Fixed few issues with built-in plugins.\n\n|cFFFFFF00v7.0.3.3202.115 (|cFFFFCC00November 08th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Weakauras creator from the Encounter Details plugin and '/details forge' shall work correctly now with Trials of Valor.\n\n|cFFFFFF00-|r Raid history should now be recording your Trials of Valor kills.\n\n|cFFFFFF00-|r Added Trials of Valor raid info, good luck and have fun!.\n\n|cFFFFFF00v7.0.3.3201.115 (|cFFFFCC00November 04th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for Paladin holy icon.\n\n|cFFFFFF00-|r Fix for Rogue outlaw icon.\n\n|cFFFFFF00-|r Fixed misc displays with bar sorted by ascending order.\n\n|cFFFFFF00-|r Fix for '/details show' command while the window is on auto hide.\n\n|cFFFFFF00v7.0.3.3114.115 (|cFFFFCC00October 26th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): tooltip tutorial is now clamped to screen and its close button should be visible.\n\n|cFFFFFF00-|r Raid Check (plugin): now also works on dungeons.\n\n|cFFFFFF00-|r Added Potion of the Prolongued Power to the tracker.\n\n|cFFFFFF00v7.1.0.3097.115 (|cFFFFCC00October 25th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r renamed 'report history' to 'latest reports'.\n\n|cFFFFFF00-|r attempt to make all Details! users on the party or raid to track rogue's akaari's soul." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v7.2.5.4153.121 (|cFFFFCC00June 24th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed Monk Stagger where it was only shown on the friendly fire and not under the Damage Taken display.\n\n|cFFFFFF00v7.2.5.4102.121 (|cFFFFCC00June 22th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! Forge has updated and now is more usder friendly.\n\n|cFFFFFF00-|r Fixed an issue with player buff uptime where sometimes some buffs wans't showing in the tooltip.\n\n|cFFFFFF00v7.2.5.3968.120 (|cFFFFCC00June 20th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r New Death Recap implemented! replaces the default from Blizzard and can be configured at Options > Raid Tools.\n\n|cFFFFFF00-|r New Guild Damage and Heal rank on '/details ranking' panel.\n\n|cFFFFFF00-|r Added a Guild Sync button on the Details! Ranking Panel.\n\n|cFFFFFF00-|r Added Custom display 'Damage on Shields', useful for encounter like Maiden of Vigilance where there's big shields to be removed and you want to know who is doing more damage to it.\n\n|cFFFFFF00-|r Added Heal Absorbed display under Heal bracket.\n\nHeal Absorb are the heal denied by abilities such like DK's Necrotic Strike or raid boss Sisters of the Moon 'Embrace of the Eclipse' ability.\nThe tooltip of this display shows which players got heal denied, which abilities absorbed the heal, which abilities tried to heal but got the heal denied.\n\n|cFFFFFF00-|r Added Alternate Power display under Energy bracket, it shows the total of alternate power gain from each player, useful for encounters such as Demonic Inquisition.\n\n|cFFFFFF00-|r 'First Hit' message after pulling a boss, now also shows who the boss is targeting (almost always is who pulled).\n\n|cFFFFFF00-|r Raid Dps {rdps} and Hps {rhps} can now be used on the Broker Data Feed..\n\n|cFFFFFF00-|r Fixed an issue with Chromie from the scenario 'The Deaths of Chromie' where she wasn't being shown on the meter.\n\n|cFFFFFF00-|r Fixed Paladin 'Light of the Martyr' damage to self.\n\n|cFFFFFF00-|r Ticket #198 'Script Error' Fixed.\n\n|cFFFFFF00v7.2.0.3703.119 (|cFFFFCC00May 29th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an error while killing low level mobs with warrior class.\n\n|cFFFFFF00v7.2.0.3693.118 (|cFFFFCC00May 25th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fury Warrior shouldn't be assigned as Protection any more.\n\n|cFFFFFF00-|r Some parser fixes.\n\n|cFFFFFF00v7.2.0.3673.118 (|cFFFFCC00May 09th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #187: Fixed an issue when comparing hunter pets on the player detail window.\n\n|cFFFFFF00-|r Ticket #189 #186: Fixed a taint issue for some classes when using friendly nameplates on.\n\n|cFFFFFF00v7.2.0.3512.116 (|cFFFFCC00April 27th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Havoc Demon Hunter: your fury energy is being shown under Mana Restored (don't ask me why, the combat log is telling us it's mana).\n\n|cFFFFFF00-|r Pets now are shown on damage tooltips.\n\n|cFFFFFF00-|r Pets are now also shown on the comparison panel.\n\n|cFFFFFF00v7.2.0.3474.116 (|cFFFFCC00April 20th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin: Raid Check > added some food buffs which wasn't being tracked.\n\n|cFFFFFF00v7.2.0.3467.116 (|cFFFFCC00April 07th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the custom display window where apply and cancel buttons where over the edit window.\n\n|cFFFFFF00-|r Fix for an issue on editing a bookmark.\n\n|cFFFFFF00v7.1.5.3459.116 (|cFFFFCC00Mar 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue on dynamic overall data where it wasn't showing DPS.\n\n|cFFFFFF00-|r Fixed an issue with Apply, Save and Cancel buttons when editing a custom display.\n\n|cFFFFFF00-|r Removed the Damage and Healing presets for custom displays, now is only possible create custom displays by scripting them.\n\n|cFFFFFF00v7.1.5.3431.116 (|cFFFFCC00Mar 15th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with bar orientation right to left where fixed bar color isn't working.\n\n|cFFFFFF00-|r The nickname field now use FrizQuadrataTT font and shall be compatible with Cyrillic.\n\n|cFFFFFF00v7.1.5.3418.116 (|cFFFFCC00Mar 1st, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #167 fix: Light of the Martyr self-damage now does reduce the healing done (following WCL method).\n\n|cFFFFFF00-|r Ticket #169 fix: Damage Prevented is now working for new segments.\n\n|cFFFFFF00-|r Fixed an issue where sometimes BeastMaster's Hati pet wasn't detected correctly.\n\n|cFFFFFF00v7.1.5.3369.116 (|cFFFFCC00Feb 07th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added custom display 'Dynamic Overall Damage' for mythic dungeons.\n\n|cFFFFFF00-|r Fix for Ticket #168: 'Auto Hide While [Not] Inside Instance is broken'.\n\n|cFFFFFF00-|r The bar truncate frame 'DetailsLeftTextAntiTruncate' is now created on Details! load instead on demand.\n\n|cFFFFFF00v7.1.5.3315.116 (|cFFFFCC00Jan 23th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #162: 'no Monochrome font' available, added an experimental slash command: /run _detalhes:UseOutline ('MONOCHROME').\n\n|cFFFFFF00-|r Ticket #158: 'no elapsed time shown on report to chat', added the elapsed time when reporting a segment.\n\n|cFFFFFF00-|r Ticket #164: 'error when browsing segments', an attempt to fix the problem has been made.\n\n|cFFFFFF00v7.1.5.3305.116 (|cFFFFCC00Jan 15th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Another fix for mythic dungeons overall data reset (thanks Tharai @ Curseforge).\n\n|cFFFFFF00-|r Fix for spec detection on PvP Arenas (thanks Pas06 @ Curseforge).\n\n|cFFFFFF00v7.1.0.3276.115 (|cFFFFCC00Jan 08th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the overall data not reseting when starting a new mythic+ dungeon.\n\n|cFFFFFF00v7.1.0.3266.115 (|cFFFFCC00Dec 29th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data not updating correctly at the end of the combat.\n\n|cFFFFFF00-|r Added a tutorial line on the window when the user access overall data.\n\n|cFFFFFF00v7.1.0.3236.115 (|cFFFFCC00Dec 19th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Integration with BigWigs should be working okay now.\n\n|cFFFFFF00v7.1.0.3231.115 (|cFFFFCC00Dec 15th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Disabled the link with BigWigs to avoid the 'RegisterMessage' error on every login.\n\n|cFFFFFF00v7.1.0.3229.115 (|cFFFFCC00Dec 09th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r When a window is locked, resize grips shouldn't be enabled messing with bar mouse over.\n\n|cFFFFFF00v7.0.3.3222.115 (|cFFFFCC00November 28th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Unstable Affliction to common spells with the same name.\n\n|cFFFFFF00-|r Fixed few issues with built-in plugins.\n\n|cFFFFFF00v7.0.3.3202.115 (|cFFFFCC00November 08th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Weakauras creator from the Encounter Details plugin and '/details forge' shall work correctly now with Trials of Valor.\n\n|cFFFFFF00-|r Raid history should now be recording your Trials of Valor kills.\n\n|cFFFFFF00-|r Added Trials of Valor raid info, good luck and have fun!.\n\n|cFFFFFF00v7.0.3.3201.115 (|cFFFFCC00November 04th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for Paladin holy icon.\n\n|cFFFFFF00-|r Fix for Rogue outlaw icon.\n\n|cFFFFFF00-|r Fixed misc displays with bar sorted by ascending order.\n\n|cFFFFFF00-|r Fix for '/details show' command while the window is on auto hide.\n\n|cFFFFFF00v7.0.3.3114.115 (|cFFFFCC00October 26th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): tooltip tutorial is now clamped to screen and its close button should be visible.\n\n|cFFFFFF00-|r Raid Check (plugin): now also works on dungeons.\n\n|cFFFFFF00-|r Added Potion of the Prolongued Power to the tracker.\n\n|cFFFFFF00v7.1.0.3097.115 (|cFFFFCC00October 25th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r renamed 'report history' to 'latest reports'.\n\n|cFFFFFF00-|r attempt to make all Details! users on the party or raid to track rogue's akaari's soul." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index eb521c3c..f32d0074 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -3319,19 +3319,40 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown) end end else - for nome, _ in _pairs (agressores) do --> lista de nomes + + --> aggressors + for nome, _ in _pairs (agressores) do --who damaged the player + --get the aggressor local este_agressor = showing._ActorTable [showing._NameIndexTable [nome]] if (este_agressor) then --> checagem por causa do total e do garbage collector que não limpa os nomes que deram dano local name = nome + local table_added local damage_amount = este_agressor.targets [self.nome] if (damage_amount) then if (este_agressor:IsPlayer() or este_agressor:IsNeutralOrEnemy()) then - meus_agressores [#meus_agressores+1] = {name, damage_amount, este_agressor.classe, este_agressor} + table_added = {name, damage_amount, este_agressor.classe, este_agressor} + meus_agressores [#meus_agressores+1] = table_added + end + end + + --special cases - Monk stagger + if (nome == self.nome and self.classe == "MONK") then + local ff = este_agressor.friendlyfire [nome] + if (ff and ff.total > 0) then + local staggerDamage = ff.spells [124255] + if (staggerDamage > 0) then + if (table_added) then + table_added [2] = table_added [2] + staggerDamage + else + meus_agressores [#meus_agressores+1] = {name, staggerDamage, "MONK", este_agressor} + end + end end end end end + end _table_sort (meus_agressores, _detalhes.Sort2) @@ -3374,9 +3395,14 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown) local icon_border = _detalhes.tooltip.icon_border_texcoord for i = 1, max do - + local aggressor = meus_agressores[i][4] - if (aggressor:IsNeutralOrEnemy()) then + + --only shows damage from enemies or from the player it self + --the player it self can only be placed on the list by the iteration above + --the iteration doesnt check friendly fire for all actors, only a few cases like Monk Stagger + + if (aggressor:IsNeutralOrEnemy() or aggressor.nome == self.nome) then local all_spells = {} @@ -3387,6 +3413,14 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown) end end + --friendly fire + local friendlyFire = aggressor.friendlyfire [self.nome] + if (friendlyFire) then + for spellid, amount in _pairs (friendlyFire.spells) do + tinsert (all_spells, {spellid, amount, aggressor.nome}) + end + end + for _, spell in _ipairs (all_spells) do local spellname, _, spellicon = _GetSpellInfo (spell [1]) GameCooltip:AddLine (spellname .. " (|cFFFFFF00" .. spell [3] .. "|r): ", FormatTooltipNumber (_, spell [2]).." (" .. _cstr ("%.1f", (spell [2] / damage_taken) * 100).."%)") diff --git a/core/parser.lua b/core/parser.lua index d16c5dde..0d47770c 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -148,8 +148,7 @@ [233499] = 233490, --Unstable Affliction } - local is_using_spellId_override = false - + --> stormlash and greater blessing of the might local SPELLID_SHAMAN_SLASH_AURA = 195222 local SPELLID_SHAMAN_SLASH_DAMAGE = 195256 local SPELLID_PALADIN_GBOM_AURA = 203528 @@ -158,6 +157,19 @@ local SPELLNAME_SHAMAN_SLASH = GetSpellInfo (195222) local SPELLNAME_PALADIN_GBOM = GetSpellInfo (203528) + --> spells with special treatment + local special_damage_spells = { + [98021] = true, --> Spirit Link Toten + [96917] = true, --> Light of the Martyr + [SPELLID_PALADIN_GBOM_DAMAGE] = true, + [SPELLID_SHAMAN_SLASH_DAMAGE] = true, + [220893] = true, --> Akaari's Soul + [124255] = true, --> Stagger + } + + --> is parser allowed to replace spellIDs? + local is_using_spellId_override = false + --> recording data options flags local _recording_self_buffs = false local _recording_ability_with_buffs = false @@ -270,60 +282,47 @@ --if (alvo_serial:find ("-76933-")) then -- return --end - - --> spirit link toten - if (spellid == 98021) then - return parser:SLT_damage (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) - - --> Light of the Martyr - paladin spell which causes damage to the caster it self - elseif (spellid == 196917) then -- or spellid == 183998 < healing part - local healingActor = healing_cache [who_name] - if (healingActor and healingActor.spells) then - healingActor.total = healingActor.total - (amount or 0) - - --local spell = healingActor.spells._ActorTable [spellid] - --if (spell) then - -- spell.total = spell.total - (amount or 0) - -- return - --end - end - return --> ignore this event - end - + + --> if the parser are allowed to replace spellIDs if (is_using_spellId_override) then spellid = override_spellId [spellid] or spellid end - if (spellid == SPELLID_PALADIN_GBOM_DAMAGE) then - who_serial, who_name, who_flags = parser:GetRealHitSourceFromBuffOwner (paladin_gbom, who_serial, who_name, who_flags, SPELLNAME_PALADIN_GBOM) - elseif (spellid == SPELLID_SHAMAN_SLASH_DAMAGE) then - who_serial, who_name, who_flags = parser:GetRealHitSourceFromBuffOwner (shaman_slash, who_serial, who_name, who_flags, SPELLNAME_SHAMAN_SLASH) - end - - if (spellid == 220893) then --Rogue's Akaari's Soul - Soul Rip - if (who_flags and _bit_band (who_flags, REACTION_MINE) ~= 0) then - who_serial, who_name, who_flags = UnitGUID ("player"), _detalhes.playername, 0x00000417 + --> avoid doing spellID checks on each iteration + if (special_damage_spells [spellid]) then + --> stagger + if (spellid == 124255) then + return parser:MonkStagger_damage (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) + + --> spirit link toten + elseif (spellid == 98021) then + return parser:SLT_damage (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) + + --> Light of the Martyr - paladin spell which causes damage to the caster it self + elseif (spellid == 196917) then -- or spellid == 183998 < healing part + local healingActor = healing_cache [who_name] + if (healingActor and healingActor.spells) then + healingActor.total = healingActor.total - (amount or 0) + end + return --> ignore this event + + --> paladin and shaman special conditions, change source + elseif (spellid == SPELLID_PALADIN_GBOM_DAMAGE) then + who_serial, who_name, who_flags = parser:GetRealHitSourceFromBuffOwner (paladin_gbom, who_serial, who_name, who_flags, SPELLNAME_PALADIN_GBOM) + elseif (spellid == SPELLID_SHAMAN_SLASH_DAMAGE) then + who_serial, who_name, who_flags = parser:GetRealHitSourceFromBuffOwner (shaman_slash, who_serial, who_name, who_flags, SPELLNAME_SHAMAN_SLASH) + + --> Rogue's Akaari's Soul - Soul Rip + elseif (spellid == 220893) then + if (who_flags and _bit_band (who_flags, REACTION_MINE) ~= 0) then + who_serial, who_name, who_flags = UnitGUID ("player"), _detalhes.playername, 0x00000417 + end end end - - --> REMOVE AFTER LEGION LAUNCH - --if (soul_capacitor [who_serial]) then - -- if (soul_capacitor [who_serial]+12 < _tempo) then - -- --> something went wrong, debuff didn't expired or we didn't saw it going out. - -- soul_capacitor [who_serial] = nil - -- else - -- return - -- end - --end - - --- if (absorbed and absorbed > 0) then --- print ("dano absorbido", spellname, absorbed) --- end ------------------------------------------------------------------------------------------------ --> check if need start an combat - + if (not _in_combat) then if ( token ~= "SPELL_PERIODIC_DAMAGE" and spellid ~= SPELLID_PALADIN_GBOM_DAMAGE and ( @@ -372,7 +371,7 @@ ------------------------------------------------------------------------------------------------ --> get actors - --> damager + --> source damager local este_jogador, meu_dono = damage_cache [who_serial] or damage_cache_pets [who_serial] or damage_cache [who_name], damage_cache_petsOwners [who_serial] if (not este_jogador) then --> pode ser um desconhecido ou um pet @@ -455,21 +454,23 @@ --> record avoidance only for tank actors if (tanks_members_cache [alvo_serial]) then --> autoshot or melee hit + --> monk's stagger - --[ if (jogador_alvo.classe == "MONK") then if (absorbed) then - amount = (amount or 0) - absorbed + --> the absorbed amount was staggered and should not be count as damage taken now + --> this absorbed will hit the player with the stagger debuff + amount = (amount or 0) - absorbed end else --> advanced damage taken + --if advanced damage taken is enabled, the damage taken to tanks acts like the monk stuff above if (_detalhes.damage_taken_everything) then if (absorbed) then amount = (amount or 0) - absorbed end end end - --]] --> avoidance local avoidance = jogador_alvo.avoidance @@ -599,13 +600,8 @@ --> firendly fire if ( - --( - (_bit_band (alvo_flags, REACTION_FRIENDLY) ~= 0 and _bit_band (who_flags, REACTION_FRIENDLY) ~= 0) or --ajdt d' brx - (raid_members_cache [alvo_serial] and raid_members_cache [who_serial] and alvo_serial:find ("Player") and who_serial:find ("Player")) --amrl - --) - --and - --spellid ~= 124255 --stagger - --spellid ~= 999997 --stagger + (_bit_band (alvo_flags, REACTION_FRIENDLY) ~= 0 and _bit_band (who_flags, REACTION_FRIENDLY) ~= 0) or --ajdt d' brx + (raid_members_cache [alvo_serial] and raid_members_cache [who_serial] and alvo_serial:find ("Player") and who_serial:find ("Player")) --amrl ) then --> ignore soul link (damage from the warlock on his pet) @@ -643,12 +639,7 @@ t.n = i end end - - --> faz a adição do friendly fire - --if (not amount) then - --print ("No AMOUNT") - --print (token, who_name, who_flags, alvo_name, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand) - --end + este_jogador.friendlyfire_total = este_jogador.friendlyfire_total + amount local friend = este_jogador.friendlyfire [alvo_name] or este_jogador:CreateFFTable (alvo_name) @@ -724,6 +715,149 @@ return spell_damage_func (spell, alvo_serial, alvo_name, alvo_flags, amount, who_name, resisted, blocked, absorbed, critical, glacing, token, isoffhand) end + + function parser:MonkStagger_damage (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) + + --> tag the container to refresh + _current_damage_container.need_refresh = true + + --> get the monk damage object + local este_jogador, meu_dono = damage_cache [who_serial] or damage_cache_pets [who_serial] or damage_cache [who_name], damage_cache_petsOwners [who_serial] + + if (not este_jogador) then --> pode ser um desconhecido ou um pet + este_jogador, meu_dono, who_name = _current_damage_container:PegarCombatente (who_serial, who_name, who_flags, true) + if (meu_dono) then --> é um pet + if (who_serial ~= "") then + damage_cache_pets [who_serial] = este_jogador + damage_cache_petsOwners [who_serial] = meu_dono + end + --conferir se o dono já esta no cache + if (not damage_cache [meu_dono.serial] and meu_dono.serial ~= "") then + damage_cache [meu_dono.serial] = meu_dono + end + else + if (who_flags) then --> ter certeza que não é um pet + if (who_serial ~= "") then + damage_cache [who_serial] = este_jogador + else + if (who_name:find ("%[")) then + damage_cache [who_name] = este_jogador + local _, _, icon = _GetSpellInfo (spellid or 1) + este_jogador.spellicon = icon + --print ("no serial actor", spellname, who_name, "added to cache.") + else + --_detalhes:Msg ("Unknown actor with unknown serial ", spellname, who_name) + end + end + end + end + + elseif (meu_dono) then + --> é um pet + who_name = who_name .. " <" .. meu_dono.nome .. ">" + end + + --> last event + este_jogador.last_event = _tempo + + --> amount + amount = (amount or 0) + local total_amount = amount + (absorbed or 0) + + --> damage taken + este_jogador.damage_taken = este_jogador.damage_taken + amount + if (not este_jogador.damage_from [who_name]) then --> adiciona a pool de dano tomado de quem + este_jogador.damage_from [who_name] = true + end + + --> friendly fire + --total + este_jogador.friendlyfire_total = este_jogador.friendlyfire_total + amount + --from who + local friend = este_jogador.friendlyfire [who_name] or este_jogador:CreateFFTable (who_name) + friend.total = friend.total + amount + friend.spells [spellid] = (friend.spells [spellid] or 0) + amount + + --> record death log + local t = last_events_cache [who_name] + + if (not t) then + t = _current_combat:CreateLastEventsTable (who_name) + end + + local i = t.n + + local this_event = t [i] + + if (not this_event) then + return print ("Parser Event Error -> Set to 16 DeathLogs and /reload", i, _death_event_amt) + end + + this_event [1] = true --> true if this is a damage || false for healing + this_event [2] = spellid --> spellid || false if this is a battle ress line + this_event [3] = amount --> amount of damage or healing + this_event [4] = time --> parser time + this_event [5] = _UnitHealth (who_name) --> current unit heal + this_event [6] = who_name --> source name + this_event [7] = absorbed + this_event [8] = school + this_event [9] = true --> friendly fire + this_event [10] = overkill + + i = i + 1 + + if (i == _death_event_amt+1) then + t.n = 1 + else + t.n = i + end + + --> avoidance + local avoidance = este_jogador.avoidance + if (not avoidance) then + este_jogador.avoidance = _detalhes:CreateActorAvoidanceTable() + avoidance = este_jogador.avoidance + end + + local overall = avoidance.overall + + local mob = avoidance [who_name] + if (not mob) then --> if isn't in the table, build on the fly + mob = _detalhes:CreateActorAvoidanceTable (true) + avoidance [who_name] = mob + end + + overall ["ALL"] = overall ["ALL"] + 1 --> qualtipo de hit ou absorb + mob ["ALL"] = mob ["ALL"] + 1 --> qualtipo de hit ou absorb + + if (blocked and blocked > 0) then + overall ["BLOCKED_HITS"] = overall ["BLOCKED_HITS"] + 1 + mob ["BLOCKED_HITS"] = mob ["BLOCKED_HITS"] + 1 + overall ["BLOCKED_AMT"] = overall ["BLOCKED_AMT"] + blocked + mob ["BLOCKED_AMT"] = mob ["BLOCKED_AMT"] + blocked + end + + --> absorbs status + if (absorbed) then + --> aqui pode ser apenas absorb parcial + overall ["ABSORB"] = overall ["ABSORB"] + 1 + overall ["PARTIAL_ABSORBED"] = overall ["PARTIAL_ABSORBED"] + 1 + overall ["PARTIAL_ABSORB_AMT"] = overall ["PARTIAL_ABSORB_AMT"] + absorbed + overall ["ABSORB_AMT"] = overall ["ABSORB_AMT"] + absorbed + mob ["ABSORB"] = mob ["ABSORB"] + 1 + mob ["PARTIAL_ABSORBED"] = mob ["PARTIAL_ABSORBED"] + 1 + mob ["PARTIAL_ABSORB_AMT"] = mob ["PARTIAL_ABSORB_AMT"] + absorbed + mob ["ABSORB_AMT"] = mob ["ABSORB_AMT"] + absorbed + else + --> adicionar aos hits sem absorbs + overall ["FULL_HIT"] = overall ["FULL_HIT"] + 1 + overall ["FULL_HIT_AMT"] = overall ["FULL_HIT_AMT"] + amount + mob ["FULL_HIT"] = mob ["FULL_HIT"] + 1 + mob ["FULL_HIT_AMT"] = mob ["FULL_HIT_AMT"] + amount + end + + end + function parser:SLT_damage (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) --> damager