diff --git a/boot.lua b/boot.lua index 4f65e592..2bcccacc 100644 --- a/boot.lua +++ b/boot.lua @@ -3,9 +3,9 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 2201 --it's 2201 for release - _detalhes.userversion = "v4.1.6" - _detalhes.realversion = 78 --core version + _detalhes.build_counter = 2221 --it's 2221 for release + _detalhes.userversion = "v4.2" + _detalhes.realversion = 79 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes @@ -21,13 +21,13 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v4.1.6 (|cFFFFCC00Jan 14, 2016|r|cFFFFFF00)|r:\n\n -|cFFFFFF00-|r Fixed the size of the right margin on tooltips.\n\n +|cFFFFFF00v4.2 (|cFFFFCC00Jan 18, 2016|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Added two new custom displays: Damage Done on targets marked with skull and Damage Done on targets marked with any other mark.\n\n --]] -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v4.1.6 (|cFFFFCC00Jan 14, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the size of the right margin on tooltips.\n\n|cFFFFFF00v4.1.5 (|cFFFFCC00Jan 10, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the weakauras creator for DBM and BidWigs Timers.\n\n|cFFFFFF00-|r Fix for an issue with dungeon bosses where sometimes Details! throw some error messages.\n\n|cFFFFFF00-|r Attempt to fix a 'class undefined' bug.\n\n|cFFFFFF00v4.1.4 (|cFFFFCC00Jan 03, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with the segment plugin for the statusbar.\n\n|cFFFFFF00v4.1.3 (|cFFFFCC00Jan 01, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Small visual improvement on tooltips.\n\n|cFFFFFF00-|r Fixed an issue when closing solo plugins with the red X button.\n\n|cFFFFFF00v4.1.2 (|cFFFFCC00Dec 31, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for item level tracker.\n\n|cFFFFFF00v4.1.1 (|cFFFFCC00Dec 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Using LibItemUpgradeInfo library to retrive the item level of upgraded items.\n\n|cFFFFFF00v4.1.0 (|cFFFFCC00Dec 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new skin preset: 'New Gray'.\n\n|cFFFFFF00-|r Added a Dark skin for the Options Panel.\n\n|cFFFFFF00-|r Fixed an issue with the Plugin DPS Tuning when reseting data on Details!.\n\n|cFFFFFF00-|r Removed realm names from player at the Comparison Panel.\n\n|cFFFFFF00v4.0.8 (|cFFFFCC00Dec 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Framework and functions update for the next version of the Advanced Death Logs plugin.\n\n|cFFFFFF00v4.0.7 (|cFFFFCC00Dec 07, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed some corner border for elvui skins.\n\n|cFFFFFF00-|r /run Details.death_tooltip_width = 500 makes the deathlog tooltip be 500 width.\n\n|cFFFFFF00v4.0.6e (|cFFFFCC00Nov 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue where sometimes some actors are duplicated at the end of an encounter.\n\n|cFFFFFF00-|r Fixed bookmark for segments (shift+right click).\n\n|cFFFFFF00-|r Fixed an issue with Chat Tab Embed when embeding only one window.\n\n|cFFFFFF00v4.0.6c (|cFFFFCC00Nov 04, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for numeral system: Western/East Asian.\n\n|cFFFFFF00v4.0.5c (|cFFFFCC00Oct 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option to disable the all-displays window (right click on title bar).\n\n|cFFFFFF00-|r Added an option to suppress segment changes after killing a boss encounter (experimental).\n\n|cFFFFFF00-|r Fixed pet battles auto hide.\n\n|cFFFFFF00-|r Fixed an issue with bar animations starting from the middle of the bar.\n\n|cFFFFFF00-|r Fixed buffs and spell cast start on weakauras creator tool.\n\n|cFFFFFF00v4.0.3a (|cFFFFCC00Set 29, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for an error on Damage Taken By Spell display.\n\n|cFFFFFF00v4.0.3 (|cFFFFCC00Set 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Some improvements on Plugin's icon at the title bar.\n\n|cFFFFFF00v4.0.2 (|cFFFFCC00Set 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 'ShielTronic Shield' on HealthPotion & Stone display.\n\n|cFFFFFF00-|r Improvements done on Vanguard Plugin.\n\n|cFFFFFF00-|r Fixed an alignment issue which was happening with few tooltips.\n\n|cFFFFFF00-|r Fixed a problem where sometimes the addon crashes while doing a /reload during raid.\n\n|cFFFFFF00-|r Fixed the creation of auras for weakauras from the Forge (/details forge).\n\n|cFFFFFF00v4.0.1 (|cFFFFCC00Set 21, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an options to use a customized skin file.\n\n|cFFFFFF00-|r Added an options to use a customized bar texture file.\n\n|cFFFFFF00-|r A Package with photoshop files with examples and the skin file for Minimalistic skin are available at WoW Interface.\n\n|cFFFFFF00-|r Added 'API Custom Displays.txt' on Details! folder, this file explain how to create scripts for custom displays.\n\n|cFFFFFF00v4.0h (|cFFFFCC00Set 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created new plugin 'Target Caller' for RBGs, it's available at Curse.com.\n\n|cFFFFFF00-|r Fixed death display color when not using colored by the player class.\n\n|cFFFFFF00-|r Fixed a rare bug where the window for Encounter Details Plugin won't open when clicking on its icon.\n\n|cFFFFFF00-|r Added officer channel to 'Announce Death' feature.\n\n|cFFFFFF00v4.0f (|cFFFFCC00Set 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the title bar encounter timer.\n\n|cFFFFFF00v4.0e (|cFFFFCC00Set 14, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a custom display for Crowd Control Received.\n\n|cFFFFFF00-|r Weak Aura Creator Tool, now has full support for BigWigs and Dbm time bars.\n\n|cFFFFFF00-|r Auras for interrupt and dispelling has been added on the Weak Aura Creator Tool.\n\n|cFFFFFF00-|r Details! Forge now has support for DBM and BigWigs time bars.\n\n|cFFFFFF00-|r Solo Plugins now has a close button on their panels.\n\n|cFFFFFF00-|r Fixed damage/healing score message after a boss kill.\n\n|cFFFFFF00-|r Now, an alert to open the history panel is shown after killing a boss.\n\n|cFFFFFF00-|r Added a 'all-displays' menu when right clicking title bar.\n\n|cFFFFFF00-|r Removed few texture from bookmarks panel, now it has a more clean appearance.\n\n|cFFFFFF00-|r Updated Details! Framework.\n\n|cFFFFFF00-|r Added option in order to change the bar orientation.\n\n|cFFFFFF00-|r Added an option to make the menus on title bar work with clicks instead of hovering over them.\n\n|cFFFFFF00-|r Healing for battleground enemies is now placed on healing done instead of enemy healing done.\n\n|cFFFFFF00-|r Improvements on our support for Arena battles.\n\n|cFFFFFF00-|r Fixed some issues on the Player Detail Window.\n\n|cFFFFFF00-|r Fixed encounter time on title bar text.\n\n|cFFFFFF00-|r Fixed death display tooltip, wasn't respecting the font and size set on options panel.\n\n|cFFFFFF00v3.18.5 (|cFFFFCC00Aug 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improvements on Weakauras creation from Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements on 'Auto Switch to Current' feature. Details! windows are now more responsible about auto changing a segment while the player, for instance, has the report window opened.\n\n|cFFFFFF00-|r Added slash command '/de wipe'. It ends the raid encounter segment and stop capturing data.\nIf you are the raid leader, all other users of Details! will also stop.\nWorks great for players not make damage padding after a wipe call.\n\n|cFFFFFF00-|r Added the overheal made by pets on tooltip and player details window.\n\n|cFFFFFF00-|r Added an option to disable stretch button and bar highlight.\n\n|cFFFFFF00-|r Disabling nicknames now also disable avatars.\n\n|cFFFFFF00-|r Added 'spinal healing injector' on custom display 'Health Potion & Stone' used.\n\n|cFFFFFF00-|r Fixed title text width when auto-hide menu buttons is enabled.\n\n|cFFFFFF00-|r Fixed item level of timewarped items.\n\n|cFFFFFF00-|r Fixed report for custom display Crowd Control.\n\n|cFFFFFF00-|r Fixed role icons on custom displays.\n\n|cFFFFFF00-|r Fixed an issue with dropdown boxes where wasn't showing all options." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v4.2 (|cFFFFCC00Jan 18, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added two new custom displays: Damage Done on targets marked with skull and Damage Done on targets marked with any other mark.\n\n|cFFFFFF00v4.1.6 (|cFFFFCC00Jan 14, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the size of the right margin on tooltips.\n\n|cFFFFFF00v4.1.5 (|cFFFFCC00Jan 10, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the weakauras creator for DBM and BidWigs Timers.\n\n|cFFFFFF00-|r Fix for an issue with dungeon bosses where sometimes Details! throw some error messages.\n\n|cFFFFFF00-|r Attempt to fix a 'class undefined' bug.\n\n|cFFFFFF00v4.1.4 (|cFFFFCC00Jan 03, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with the segment plugin for the statusbar.\n\n|cFFFFFF00v4.1.3 (|cFFFFCC00Jan 01, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Small visual improvement on tooltips.\n\n|cFFFFFF00-|r Fixed an issue when closing solo plugins with the red X button.\n\n|cFFFFFF00v4.1.2 (|cFFFFCC00Dec 31, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for item level tracker.\n\n|cFFFFFF00v4.1.1 (|cFFFFCC00Dec 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Using LibItemUpgradeInfo library to retrive the item level of upgraded items.\n\n|cFFFFFF00v4.1.0 (|cFFFFCC00Dec 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new skin preset: 'New Gray'.\n\n|cFFFFFF00-|r Added a Dark skin for the Options Panel.\n\n|cFFFFFF00-|r Fixed an issue with the Plugin DPS Tuning when reseting data on Details!.\n\n|cFFFFFF00-|r Removed realm names from player at the Comparison Panel.\n\n|cFFFFFF00v4.0.8 (|cFFFFCC00Dec 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Framework and functions update for the next version of the Advanced Death Logs plugin.\n\n|cFFFFFF00v4.0.7 (|cFFFFCC00Dec 07, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed some corner border for elvui skins.\n\n|cFFFFFF00-|r /run Details.death_tooltip_width = 500 makes the deathlog tooltip be 500 width.\n\n|cFFFFFF00v4.0.6e (|cFFFFCC00Nov 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue where sometimes some actors are duplicated at the end of an encounter.\n\n|cFFFFFF00-|r Fixed bookmark for segments (shift+right click).\n\n|cFFFFFF00-|r Fixed an issue with Chat Tab Embed when embeding only one window.\n\n|cFFFFFF00v4.0.6c (|cFFFFCC00Nov 04, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for numeral system: Western/East Asian.\n\n|cFFFFFF00v4.0.5c (|cFFFFCC00Oct 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option to disable the all-displays window (right click on title bar).\n\n|cFFFFFF00-|r Added an option to suppress segment changes after killing a boss encounter (experimental).\n\n|cFFFFFF00-|r Fixed pet battles auto hide.\n\n|cFFFFFF00-|r Fixed an issue with bar animations starting from the middle of the bar.\n\n|cFFFFFF00-|r Fixed buffs and spell cast start on weakauras creator tool.\n\n|cFFFFFF00v4.0.3a (|cFFFFCC00Set 29, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for an error on Damage Taken By Spell display.\n\n|cFFFFFF00v4.0.3 (|cFFFFCC00Set 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Some improvements on Plugin's icon at the title bar.\n\n|cFFFFFF00v4.0.2 (|cFFFFCC00Set 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 'ShielTronic Shield' on HealthPotion & Stone display.\n\n|cFFFFFF00-|r Improvements done on Vanguard Plugin.\n\n|cFFFFFF00-|r Fixed an alignment issue which was happening with few tooltips.\n\n|cFFFFFF00-|r Fixed a problem where sometimes the addon crashes while doing a /reload during raid.\n\n|cFFFFFF00-|r Fixed the creation of auras for weakauras from the Forge (/details forge).\n\n|cFFFFFF00v4.0.1 (|cFFFFCC00Set 21, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an options to use a customized skin file.\n\n|cFFFFFF00-|r Added an options to use a customized bar texture file.\n\n|cFFFFFF00-|r A Package with photoshop files with examples and the skin file for Minimalistic skin are available at WoW Interface.\n\n|cFFFFFF00-|r Added 'API Custom Displays.txt' on Details! folder, this file explain how to create scripts for custom displays.\n\n|cFFFFFF00v4.0h (|cFFFFCC00Set 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created new plugin 'Target Caller' for RBGs, it's available at Curse.com.\n\n|cFFFFFF00-|r Fixed death display color when not using colored by the player class.\n\n|cFFFFFF00-|r Fixed a rare bug where the window for Encounter Details Plugin won't open when clicking on its icon.\n\n|cFFFFFF00-|r Added officer channel to 'Announce Death' feature.\n\n|cFFFFFF00v4.0f (|cFFFFCC00Set 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the title bar encounter timer.\n\n|cFFFFFF00v4.0e (|cFFFFCC00Set 14, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a custom display for Crowd Control Received.\n\n|cFFFFFF00-|r Weak Aura Creator Tool, now has full support for BigWigs and Dbm time bars.\n\n|cFFFFFF00-|r Auras for interrupt and dispelling has been added on the Weak Aura Creator Tool.\n\n|cFFFFFF00-|r Details! Forge now has support for DBM and BigWigs time bars.\n\n|cFFFFFF00-|r Solo Plugins now has a close button on their panels.\n\n|cFFFFFF00-|r Fixed damage/healing score message after a boss kill.\n\n|cFFFFFF00-|r Now, an alert to open the history panel is shown after killing a boss.\n\n|cFFFFFF00-|r Added a 'all-displays' menu when right clicking title bar.\n\n|cFFFFFF00-|r Removed few texture from bookmarks panel, now it has a more clean appearance.\n\n|cFFFFFF00-|r Updated Details! Framework.\n\n|cFFFFFF00-|r Added option in order to change the bar orientation.\n\n|cFFFFFF00-|r Added an option to make the menus on title bar work with clicks instead of hovering over them.\n\n|cFFFFFF00-|r Healing for battleground enemies is now placed on healing done instead of enemy healing done.\n\n|cFFFFFF00-|r Improvements on our support for Arena battles.\n\n|cFFFFFF00-|r Fixed some issues on the Player Detail Window.\n\n|cFFFFFF00-|r Fixed encounter time on title bar text.\n\n|cFFFFFF00-|r Fixed death display tooltip, wasn't respecting the font and size set on options panel.\n\n|cFFFFFF00v3.18.5 (|cFFFFCC00Aug 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improvements on Weakauras creation from Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements on 'Auto Switch to Current' feature. Details! windows are now more responsible about auto changing a segment while the player, for instance, has the report window opened.\n\n|cFFFFFF00-|r Added slash command '/de wipe'. It ends the raid encounter segment and stop capturing data.\nIf you are the raid leader, all other users of Details! will also stop.\nWorks great for players not make damage padding after a wipe call.\n\n|cFFFFFF00-|r Added the overheal made by pets on tooltip and player details window.\n\n|cFFFFFF00-|r Added an option to disable stretch button and bar highlight.\n\n|cFFFFFF00-|r Disabling nicknames now also disable avatars.\n\n|cFFFFFF00-|r Added 'spinal healing injector' on custom display 'Health Potion & Stone' used.\n\n|cFFFFFF00-|r Fixed title text width when auto-hide menu buttons is enabled.\n\n|cFFFFFF00-|r Fixed item level of timewarped items." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_custom.lua b/classes/classe_custom.lua index 960e4391..b9853e52 100644 --- a/classes/classe_custom.lua +++ b/classes/classe_custom.lua @@ -2130,6 +2130,230 @@ end end + ---------------------------------------------------------------------------------------------------------------------------------------------------- + + local DamageOnSkullTarget = { + name = Loc ["STRING_CUSTOM_DAMAGEONSKULL"], + icon = [[Interface\TARGETINGFRAME\UI-RaidTargetingIcon_8]], + attribute = false, + spellid = false, + author = "Details!", + desc = Loc ["STRING_CUSTOM_DAMAGEONSKULL_DESC"], + source = false, + target = false, + script_version = 2, + script = [[ + --get the parameters passed + local Combat, CustomContainer, Instance = ... + --declade the values to return + local total, top, amount = 0, 0, 0 + + --raid target flags: + -- 128: skull + -- 64: cross + -- 32: square + -- 16: moon + -- 8: triangle + -- 4: diamond + -- 2: circle + -- 1: star + + --do the loop + for _, actor in ipairs (Combat:GetActorList (DETAILS_ATTRIBUTE_DAMAGE)) do + if (actor:IsPlayer()) then + if (actor.raid_targets [128]) then + CustomContainer:AddValue (actor, actor.raid_targets [128]) + end + end + end + + --if not managed inside the loop, get the values of total, top and amount + total, top = CustomContainer:GetTotalAndHighestValue() + amount = CustomContainer:GetNumActors() + + --return the values + return total, top, amount + ]], + tooltip = [[ + --get the parameters passed + local actor, combat, instance = ... + + --get the cooltip object (we dont use the convencional GameTooltip here) + local GameCooltip = GameCooltip + + --Cooltip code + local format_func = Details:GetCurrentToKFunction() + + --Cooltip code + local RaidTargets = actor.raid_targets + + local DamageOnStar = RaidTargets [128] + if (DamageOnStar) then + --RAID_TARGET_8 is the built-in localized word for 'Skull'. + GameCooltip:AddLine (RAID_TARGET_8 .. ":", format_func (_, DamageOnStar)) + GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_8", 1, 1, 14, 14) + Details:AddTooltipBackgroundStatusbar() + end + ]], + } + +-- /run _detalhes:AddDefaultCustomDisplays() + + local have = false + for _, custom in ipairs (self.custom) do + if (custom.name == Loc ["STRING_CUSTOM_DAMAGEONSKULL"] and (custom.script_version and custom.script_version >= DamageOnSkullTarget.script_version) ) then + have = true + break + end + end + if (not have) then + setmetatable (DamageOnSkullTarget, _detalhes.atributo_custom) + DamageOnSkullTarget.__index = _detalhes.atributo_custom + + for i, custom in ipairs (self.custom) do + if (custom.name == Loc ["STRING_CUSTOM_DAMAGEONSKULL"]) then + table.remove (self.custom, i) + tinsert (self.custom, i, DamageOnSkullTarget) + have = true + end + end + if (not have) then + self.custom [#self.custom+1] = DamageOnSkullTarget + end + end + + ---------------------------------------------------------------------------------------------------------------------------------------------------- + + local DamageOnAnyTarget = { + name = Loc ["STRING_CUSTOM_DAMAGEONANYMARKEDTARGET"], + icon = [[Interface\TARGETINGFRAME\UI-RaidTargetingIcon_5]], + attribute = false, + spellid = false, + author = "Details!", + desc = Loc ["STRING_CUSTOM_DAMAGEONANYMARKEDTARGET_DESC"], + source = false, + target = false, + script_version = 2, + script = [[ + --get the parameters passed + local Combat, CustomContainer, Instance = ... + --declade the values to return + local total, top, amount = 0, 0, 0 + + --do the loop + for _, actor in ipairs (Combat:GetActorList (DETAILS_ATTRIBUTE_DAMAGE)) do + if (actor:IsPlayer()) then + local total = (actor.raid_targets [1] or 0) --star + total = total + (actor.raid_targets [2] or 0) --circle + total = total + (actor.raid_targets [4] or 0) --diamond + total = total + (actor.raid_targets [8] or 0) --tiangle + total = total + (actor.raid_targets [16] or 0) --moon + total = total + (actor.raid_targets [32] or 0) --square + total = total + (actor.raid_targets [64] or 0) --cross + + if (total > 0) then + CustomContainer:AddValue (actor, total) + end + end + end + + --if not managed inside the loop, get the values of total, top and amount + total, top = CustomContainer:GetTotalAndHighestValue() + amount = CustomContainer:GetNumActors() + + --return the values + return total, top, amount + ]], + tooltip = [[ + --get the parameters passed + local actor, combat, instance = ... + + --get the cooltip object + local GameCooltip = GameCooltip + + local format_func = Details:GetCurrentToKFunction() + + --Cooltip code + local RaidTargets = actor.raid_targets + + local DamageOnStar = RaidTargets [1] + if (DamageOnStar) then + GameCooltip:AddLine (RAID_TARGET_1 .. ":", format_func (_, DamageOnStar)) + GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_1", 1, 1, 14, 14) + Details:AddTooltipBackgroundStatusbar() + end + + local DamageOnCircle = RaidTargets [2] + if (DamageOnCircle) then + GameCooltip:AddLine (RAID_TARGET_2 .. ":", format_func (_, DamageOnCircle)) + GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_2", 1, 1, 14, 14) + Details:AddTooltipBackgroundStatusbar() + end + + local DamageOnDiamond = RaidTargets [4] + if (DamageOnDiamond) then + GameCooltip:AddLine (RAID_TARGET_3 .. ":", format_func (_, DamageOnDiamond)) + GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_3", 1, 1, 14, 14) + Details:AddTooltipBackgroundStatusbar() + end + + local DamageOnTriangle = RaidTargets [8] + if (DamageOnTriangle) then + GameCooltip:AddLine (RAID_TARGET_4 .. ":", format_func (_, DamageOnTriangle)) + GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_4", 1, 1, 14, 14) + Details:AddTooltipBackgroundStatusbar() + end + + local DamageOnMoon = RaidTargets [16] + if (DamageOnMoon) then + GameCooltip:AddLine (RAID_TARGET_5 .. ":", format_func (_, DamageOnMoon)) + GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_5", 1, 1, 14, 14) + Details:AddTooltipBackgroundStatusbar() + end + + local DamageOnSquare = RaidTargets [32] + if (DamageOnSquare) then + GameCooltip:AddLine (RAID_TARGET_6 .. ":", format_func (_, DamageOnSquare)) + GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_6", 1, 1, 14, 14) + Details:AddTooltipBackgroundStatusbar() + end + + local DamageOnCross = RaidTargets [64] + if (DamageOnCross) then + GameCooltip:AddLine (RAID_TARGET_7 .. ":", format_func (_, DamageOnCross)) + GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_7", 1, 1, 14, 14) + Details:AddTooltipBackgroundStatusbar() + end + ]], + } + +-- /run _detalhes:AddDefaultCustomDisplays() + + local have = false + for _, custom in ipairs (self.custom) do + if (custom.name == Loc ["STRING_CUSTOM_DAMAGEONANYMARKEDTARGET"] and (custom.script_version and custom.script_version >= DamageOnAnyTarget.script_version) ) then + have = true + break + end + end + if (not have) then + setmetatable (DamageOnAnyTarget, _detalhes.atributo_custom) + DamageOnAnyTarget.__index = _detalhes.atributo_custom + + for i, custom in ipairs (self.custom) do + if (custom.name == Loc ["STRING_CUSTOM_DAMAGEONANYMARKEDTARGET"]) then + table.remove (self.custom, i) + tinsert (self.custom, i, DamageOnAnyTarget) + have = true + end + end + if (not have) then + self.custom [#self.custom+1] = DamageOnAnyTarget + end + end + + ---------------------------------------------------------------------------------------------------------------------------------------------------- + _detalhes:ResetCustomFunctionsCache() end diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index d6fc8601..b0544e60 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -379,6 +379,8 @@ pets = {}, + raid_targets = {}, + friendlyfire_total = 0, friendlyfire = {}, diff --git a/core/parser.lua b/core/parser.lua index 70a26493..f587d95d 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -107,6 +107,17 @@ local ENVIRONMENTAL_LAVA_NAME = Loc ["STRING_ENVIRONMENTAL_LAVA"] local ENVIRONMENTAL_SLIME_NAME = Loc ["STRING_ENVIRONMENTAL_SLIME"] + local RAID_TARGET_FLAGS = { + [128] = true, --0x80 skull + [64] = true, --0x40 cross + [32] = true, --0x20 square + [16] = true, --0x10 moon + [8] = true, --0x8 triangle + [4] = true, --0x4 diamond + [2] = true, --0x2 circle + [1] = true, --0x1 star + } + --> recording data options flags local _recording_self_buffs = false local _recording_ability_with_buffs = false @@ -127,6 +138,7 @@ local _hook_battleress_container = _detalhes.hooks ["HOOK_BATTLERESS"] local _hook_interrupt_container = _detalhes.hooks ["HOOK_INTERRUPT"] + ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> internal functions @@ -134,27 +146,26 @@ --> DAMAGE serach key: ~damage | ----------------------------------------------------------------------------------------------------------------------------------------- - function parser:swing (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, multistrike) - return parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, 1, "Corpo-a-Corpo", 00000001, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, multistrike) --> localize-me + function parser:swing (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, multistrike) + return parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, 1, "Corpo-a-Corpo", 00000001, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, multistrike) --> localize-me --spellid, spellname, spelltype end - function parser:range (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) - return parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, 2, "Tiro-Automático", 00000001, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, multistrike) --> localize-me + function parser:range (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, multistrike) + return parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, 2, "Tiro-Automático", 00000001, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, multistrike) --> localize-me --spellid, spellname, spelltype end -- /run local f=CreateFrame("frame");f:RegisterAllEvents();f:SetScript("OnEvent", function(self, ...)print (...);end) -- /run local f=CreateFrame("frame");f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED");f:SetScript("OnEvent", function(self, ...) print (...) end) --- /run local f=CreateFrame("frame");f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED");f:SetScript("OnEvent", function(self, ...) print (...) end) - +-- /run local f=CreateFrame("frame");f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED");f:SetScript("OnE -- /run local f=CreateFrame("frame");f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");f:SetScript("OnEvent", function(self, ...)print (...);end) -- /run local f=CreateFrame("frame");f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");f:SetScript("OnEvent",function(self, ...) local a = select(6, ...);if (a=="")then print (...) end end) -- /run local f=CreateFrame("frame");f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");f:SetScript("OnEvent",function(self, ...) local a = select(3, ...);print (a);if (a=="SPELL_CAST_SUCCESS")then print (...) end 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) + function parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, multistrike) ------------------------------------------------------------------------------------------------ --> early checks and fixes @@ -549,14 +560,24 @@ meu_dono.targets [alvo_name] = (meu_dono.targets [alvo_name] or 0) + amount meu_dono.last_event = _tempo + + if (RAID_TARGET_FLAGS [alvo_flags2]) then + --> add the amount done for the owner + meu_dono.raid_targets [alvo_flags2] = (meu_dono.raid_targets [alvo_flags2] or 0) + amount + end end - + + --> raid targets + if (RAID_TARGET_FLAGS [alvo_flags2]) then + este_jogador.raid_targets [alvo_flags2] = (este_jogador.raid_targets [alvo_flags2] or 0) + amount + end + --> actor este_jogador.total = este_jogador.total + amount --> actor without pets este_jogador.total_without_pet = este_jogador.total_without_pet + amount - + --> actor targets este_jogador.targets [alvo_name] = (este_jogador.targets [alvo_name] or 0) + amount @@ -680,16 +701,16 @@ end --function parser:swingmissed (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, missType, isOffHand, amountMissed) - function parser:swingmissed (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, missType, isOffHand, multistrike, amountMissed) --, isOffHand, multistrike, amountMissed, arg1 - return parser:missed (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, 1, "Corpo-a-Corpo", 00000001, missType, isOffHand, multistrike, amountMissed) --, isOffHand, multistrike, amountMissed, arg1 + function parser:swingmissed (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, missType, isOffHand, multistrike, amountMissed) --, isOffHand, multistrike, amountMissed, arg1 + return parser:missed (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, 1, "Corpo-a-Corpo", 00000001, missType, isOffHand, multistrike, amountMissed) --, isOffHand, multistrike, amountMissed, arg1 end - function parser:rangemissed (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, missType, isOffHand, multistrike, amountMissed) --, isOffHand, multistrike, amountMissed, arg1 - return parser:missed (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, 2, "Tiro-Automático", 00000001, missType, isOffHand, multistrike, amountMissed) --, isOffHand, multistrike, amountMissed, arg1 + function parser:rangemissed (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, missType, isOffHand, multistrike, amountMissed) --, isOffHand, multistrike, amountMissed, arg1 + return parser:missed (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, 2, "Tiro-Automático", 00000001, missType, isOffHand, multistrike, amountMissed) --, isOffHand, multistrike, amountMissed, arg1 end -- ~miss - function parser:missed (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, missType, isOffHand, multistrike, amountMissed, arg1) + function parser:missed (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, missType, isOffHand, multistrike, amountMissed, arg1) ------------------------------------------------------------------------------------------------ --> early checks and fixes @@ -772,13 +793,13 @@ 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) + return parser:swing ("SWING_DAMAGE", time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, 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) + return parser:range ("RANGE_DAMAGE", time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, 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) + return parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, amountMissed, -1, 1, nil, nil, nil, false, false, false, false, multistrike) end @@ -801,7 +822,7 @@ ----------------------------------------------------------------------------------------------------------------------------------------- --> SUMMON serach key: ~summon | ----------------------------------------------------------------------------------------------------------------------------------------- - function parser:summon (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellName) + function parser:summon (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellName) --[[statistics]]-- _detalhes.statistics.pets_summons = _detalhes.statistics.pets_summons + 1 @@ -872,7 +893,7 @@ [152118] = true, --Clarity of Will } - function parser:heal_absorb (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, owner_serial, owner_name, owner_flags, owner_flags2, shieldid, shieldname, shieldtype, amount) + function parser:heal_absorb (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spellschool, owner_serial, owner_name, owner_flags, owner_flags2, shieldid, shieldname, shieldtype, amount) --[[statistics]]-- _detalhes.statistics.absorbs_calls = _detalhes.statistics.absorbs_calls + 1 @@ -910,11 +931,11 @@ end --> chamar a função de cura pra contar a cura - return parser:heal (token, time, owner_serial, owner_name, owner_flags, alvo_serial, alvo_name, alvo_flags, shieldid, shieldname, shieldtype, amount, 0, 0, nil, nil, true) + return parser:heal (token, time, owner_serial, owner_name, owner_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, shieldid, shieldname, shieldtype, amount, 0, 0, nil, nil, true) end - function parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, overhealing, absorbed, critical, multistrike, is_shield) + function parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, amount, overhealing, absorbed, critical, multistrike, is_shield) ------------------------------------------------------------------------------------------------ --> early checks and fixes @@ -1190,7 +1211,7 @@ --> BUFFS & DEBUFFS serach key: ~buff ~aura ~shield | ----------------------------------------------------------------------------------------------------------------------------------------- - function parser:buff (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, tipo, amount, arg1, arg2, arg3) + function parser:buff (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spellschool, tipo, amount, arg1, arg2, arg3) --> not yet well know about unnamed buff casters if (not alvo_name) then @@ -1220,7 +1241,7 @@ if (_recording_buffs_and_debuffs) then if (who_name == alvo_name and raid_members_cache [who_serial] and _in_combat) then --> call record buffs uptime - parser:add_buff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_IN") + parser:add_buff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, "BUFF_UPTIME_IN") end end @@ -1242,7 +1263,7 @@ --> defensive cooldowns elseif (defensive_cooldown_spell_list [spellid]) then --> usou cooldown - return parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname) + return parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname) end @@ -1258,15 +1279,15 @@ if (_recording_buffs_and_debuffs) then if (cc_spell_list [spellid]) then - parser:add_cc_done (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname) + parser:add_cc_done (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname) end if (raid_members_cache [who_serial]) then --> call record debuffs uptime - parser:add_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_IN") + parser:add_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, "DEBUFF_UPTIME_IN") elseif (raid_members_cache [alvo_serial] and not raid_members_cache [who_serial]) then --> alvo é da raide e who é alguem de fora da raide - parser:add_bad_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, "DEBUFF_UPTIME_IN") + parser:add_bad_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spellschool, "DEBUFF_UPTIME_IN") end end @@ -1338,7 +1359,7 @@ end -- ~crowd control ~ccdone - function parser:add_cc_done (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname) + function parser:add_cc_done (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname) ------------------------------------------------------------------------------------------------ --> early checks and fixes @@ -1424,7 +1445,7 @@ end end - function parser:buff_refresh (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, tipo, amount) + function parser:buff_refresh (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spellschool, tipo, amount) ------------------------------------------------------------------------------------------------ --> handle shields @@ -1436,7 +1457,7 @@ if (_recording_buffs_and_debuffs) then if (who_name == alvo_name and raid_members_cache [who_serial] and _in_combat) then --> call record buffs uptime - parser:add_buff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_REFRESH") + parser:add_buff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, "BUFF_UPTIME_REFRESH") end end @@ -1456,7 +1477,7 @@ escudo [alvo_name][spellid][who_name] = amount if (overheal > 0) then - return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, nil, 0, _math_ceil (overheal), 0, 0, nil, true) + return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, nil, 0, _math_ceil (overheal), 0, 0, nil, true) end --local absorb = escudo [alvo_name][spellid][who_name] - amount @@ -1474,7 +1495,7 @@ --> defensive cooldowns elseif (defensive_cooldown_spell_list [spellid]) then --> usou cooldown - return parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname) + return parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname) ------------------------------------------------------------------------------------------------ --> recording buffs @@ -1502,9 +1523,9 @@ if (_recording_buffs_and_debuffs) then if (raid_members_cache [who_serial]) then --> call record debuffs uptime - parser:add_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_REFRESH") + parser:add_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, "DEBUFF_UPTIME_REFRESH") elseif (raid_members_cache [alvo_serial] and not raid_members_cache [who_serial]) then --> alvo é da raide e o caster é inimigo - parser:add_bad_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, "DEBUFF_UPTIME_REFRESH") + parser:add_bad_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spellschool, "DEBUFF_UPTIME_REFRESH") end end @@ -1560,7 +1581,7 @@ end end - function parser:unbuff (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, tipo, amount) + function parser:unbuff (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spellschool, tipo, amount) ------------------------------------------------------------------------------------------------ --> handle shields @@ -1572,7 +1593,7 @@ if (_recording_buffs_and_debuffs) then if (who_name == alvo_name and raid_members_cache [who_serial] and _in_combat) then --> call record buffs uptime - parser:add_buff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_OUT") + parser:add_buff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, "BUFF_UPTIME_OUT") end end @@ -1591,7 +1612,7 @@ escudo [alvo_name][spellid][who_name] = 0 if (overheal and overheal > 0) then - return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, nil, 0, _math_ceil (overheal), 0, 0, nil, true) + return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, nil, 0, _math_ceil (overheal), 0, 0, nil, true) else return end @@ -1634,9 +1655,9 @@ if (_recording_buffs_and_debuffs) then if (raid_members_cache [who_serial]) then --> call record debuffs uptime - parser:add_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_OUT") + parser:add_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, "DEBUFF_UPTIME_OUT") elseif (raid_members_cache [alvo_serial] and not raid_members_cache [who_serial]) then --> alvo é da raide e o caster é inimigo - parser:add_bad_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, "DEBUFF_UPTIME_OUT") + parser:add_bad_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spellschool, "DEBUFF_UPTIME_OUT") end end @@ -1681,7 +1702,7 @@ --> MISC search key: ~buffuptime ~buffsuptime | ----------------------------------------------------------------------------------------------------------------------------------------- - function parser:add_bad_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, in_out) + function parser:add_bad_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spellschool, in_out) if (not alvo_name) then --> no target name, just quit @@ -1761,7 +1782,7 @@ end -- ~debuff - function parser:add_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, in_out) + function parser:add_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, in_out) ------------------------------------------------------------------------------------------------ --> early checks and fixes @@ -1799,7 +1820,7 @@ end - function parser:add_buff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, in_out) + function parser:add_buff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, in_out) ------------------------------------------------------------------------------------------------ --> early checks and fixes @@ -1890,7 +1911,7 @@ [SPELL_POWER_BURNING_EMBERS] = {file = [[Interface\PLAYERFRAME\Warlock-DestructionUI]], coords = {3/256, 33/256, 23/64, 52/64}} } - function parser:energize (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, powertype, p6, p7) + function parser:energize (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, amount, powertype, p6, p7) ------------------------------------------------------------------------------------------------ --> early checks and fixes @@ -2003,7 +2024,7 @@ --> MISC search key: ~cooldown | ----------------------------------------------------------------------------------------------------------------------------------------- - function parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname) + function parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname) ------------------------------------------------------------------------------------------------ --> early checks and fixes @@ -2106,7 +2127,7 @@ --serach key: ~interrupt - function parser:interrupt (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool) + function parser:interrupt (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool) ------------------------------------------------------------------------------------------------ --> early checks and fixes @@ -2210,7 +2231,7 @@ end --> 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) + function parser:spellcast (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype) ------------------------------------------------------------------------------------------------ --> early checks and fixes @@ -2260,7 +2281,7 @@ alvo_name = Loc ["STRING_RAID_WIDE"] end end - return parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname) + return parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname) end else @@ -2284,7 +2305,7 @@ --serach key: ~dispell - function parser:dispell (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool, auraType) + function parser:dispell (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool, auraType) ------------------------------------------------------------------------------------------------ --> early checks and fixes @@ -2373,7 +2394,7 @@ end --serach key: ~ress - function parser:ress (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname) + function parser:ress (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname) ------------------------------------------------------------------------------------------------ --> early checks and fixes @@ -2469,7 +2490,7 @@ end --serach key: ~cc - function parser:break_cc (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool, auraType) + function parser:break_cc (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool, auraType) ------------------------------------------------------------------------------------------------ --> early checks and fixes @@ -2682,7 +2703,7 @@ end end - function parser:environment (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, env_type, amount) + function parser:environment (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, env_type, amount) local spelid @@ -2706,7 +2727,7 @@ spelid = 8 end - return parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spelid or 1, env_type, 00000003, amount, -1, 1) --> localize-me + return parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spelid or 1, env_type, 00000003, amount, -1, 1) --> localize-me end ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -3662,6 +3683,9 @@ --> end -- ~parserstart ~startparser + + + function _detalhes:OnParserEvent (evento, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, ...) local funcao = token_list [token] @@ -3669,7 +3693,7 @@ --if (token ~= "SPELL_AURA_REFRESH" and token ~= "SPELL_AURA_REMOVED" and token ~= "SPELL_AURA_APPLIED") then -- print ("running func:", token) --end - return funcao (nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, ... ) + return funcao (nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, ...) else return end @@ -4034,7 +4058,7 @@ damageDone = damageDone + _detalhes:GetOrderNumber() end actor.total = damageDone - actor.classe = classToken + actor.classe = classToken or "UNKNOW" elseif (name ~= "Unknown") then local guid = _UnitGUID (name) @@ -4047,7 +4071,7 @@ end actor = _current_damage_container:PegarCombatente (guid, name, flag, true) actor.total = _detalhes:GetOrderNumber() - actor.classe = classToken + actor.classe = classToken or "UNKNOW" end end @@ -4057,7 +4081,7 @@ healingDone = healingDone + _detalhes:GetOrderNumber() end actor.total = healingDone - actor.classe = classToken + actor.classe = classToken or "UNKNOW" elseif (name ~= "Unknown") then local guid = _UnitGUID (name) @@ -4070,7 +4094,7 @@ end actor = _current_heal_container:PegarCombatente (guid, name, flag, true) actor.total = _detalhes:GetOrderNumber() - actor.classe = classToken + actor.classe = classToken or "UNKNOW" end end diff --git a/functions/skins.lua b/functions/skins.lua index dbca7ea7..f765bac5 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -119,7 +119,7 @@ local _ true, -- [4] true, -- [5] false, -- [6] - ["space"] = -3, + ["space"] = -2, ["shadow"] = true, }, ["show_sidebars"] = true, @@ -637,7 +637,7 @@ local _ true, -- [4] true, -- [5] false, -- [6] - ["space"] = -3, + ["space"] = -2, ["shadow"] = false, }, ["desaturated_menu"] = false, @@ -805,7 +805,7 @@ local _ true, -- [4] true, -- [5] false, -- [6] - ["space"] = -3, + ["space"] = -2, ["shadow"] = false, }, ["show_sidebars"] = false, @@ -1144,7 +1144,7 @@ local _ true, true, -- [5] false, -- [6] - ["space"] = -3, + ["space"] = -2, ["shadow"] = true, }, ["desaturated_menu"] = false, @@ -1585,7 +1585,7 @@ local _ true, -- [4] true, -- [5] false, -- [6] - ["space"] = -3, + ["space"] = -2, ["shadow"] = true, }, ["show_sidebars"] = true, @@ -1764,7 +1764,7 @@ local _ ["strata"] = "LOW", ["show_sidebars"] = true, ["hide_in_combat_alpha"] = 0, - ["menu_icons"] = {true, true, true, true, true, false, ["space"] = -3, ["shadow"] = true}, + ["menu_icons"] = {true, true, true, true, true, false, ["space"] = -2, ["shadow"] = true}, ["desaturated_menu"] = false, ["auto_hide_menu"] = { ["left"] = false, diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 3ba9ff77..686ffc86 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -5782,6 +5782,8 @@ local build_segment_list = function (self, elapsed) local instancia = parameters_table [1] parameters_table[2] = parameters_table[2] + elapsed + local battleground_color = {1, 0.666, 0, 1} + if (parameters_table[2] > 0.15) then self:SetScript ("OnUpdate", nil) @@ -5886,7 +5888,7 @@ local build_segment_list = function (self, elapsed) end elseif (thisCombat.is_pvp) then - CoolTip:AddLine (thisCombat.is_pvp.name, _, 1, "yellow") + CoolTip:AddLine (thisCombat.is_pvp.name, _, 1, battleground_color) enemy = thisCombat.is_pvp.name CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 12, 0.251953125, 0.306640625, 0.205078125, 0.248046875)