Added friendly fire and healing taken into the new breakdown
This commit is contained in:
+10
-2
@@ -362,6 +362,10 @@
|
||||
---@field ListSpells fun(container: spellcontainer) : any, any usage: for spellId, spelltable in container:ListActors() do
|
||||
---@field _ActorTable table
|
||||
|
||||
---@class friendlyfiretable : table
|
||||
---@field total number total amount of friendly fire caused by the actor
|
||||
---@field spells table<number, number> spellId = total
|
||||
|
||||
---@class spelltable : table
|
||||
---@field uptime number
|
||||
---@field total number
|
||||
@@ -423,8 +427,6 @@
|
||||
---@field total number
|
||||
---@field pets table<number, string>
|
||||
---@field targets targettable
|
||||
---@field damage_taken number amount of damage the actor took durent the segment
|
||||
---@field damage_from table<string, boolean> store the name of the actors which damaged the actor, format: [actorName] = true
|
||||
---@field GetSpellContainer fun(actor: actor, containerType: "debuff"|"buff"|"spell"|"cooldowns") : spellcontainer
|
||||
---@field Class fun(actor: actor) : string get the ingame class of the actor
|
||||
---@field Spec fun(actor: actor) : string get the ingame spec of the actor
|
||||
@@ -433,6 +435,12 @@
|
||||
---@field GetPets fun(actor: actor) : table<number, string> get a table with all pet names that belong to the player
|
||||
---@field GetSpellList fun(actor: actor) : table<number, spelltable>
|
||||
|
||||
---@class actordamage : actor
|
||||
---@field friendlyfire_total number
|
||||
---@field friendlyfire friendlyfiretable
|
||||
---@field damage_taken number amount of damage the actor took durent the segment
|
||||
---@field damage_from table<string, boolean> store the name of the actors which damaged the actor, format: [actorName] = true
|
||||
|
||||
---@class segmentid : number
|
||||
---@class instanceid : number
|
||||
---@class attributeid : number
|
||||
|
||||
@@ -3591,6 +3591,13 @@ local ENEMIES_format_name = function(player) if (player == 0) then return false
|
||||
local ENEMIES_format_amount = function(amount) if (amount <= 0) then return false end return Details:ToK(amount) .. " (" .. format("%.1f", amount / tooltip_temp_table.damage_total * 100) .. "%)" end
|
||||
|
||||
function damageClass:ReportEnemyDamageTaken (actor, instance, ShiftKeyDown, ControlKeyDown, fromFrags)
|
||||
|
||||
--can open the breakdown window now
|
||||
|
||||
|
||||
|
||||
if (true) then return end
|
||||
|
||||
if (ShiftKeyDown) then
|
||||
local inimigo = actor.nome
|
||||
local custom_name = inimigo .. " -" .. Loc ["STRING_CUSTOM_ENEMY_DT"]
|
||||
@@ -4077,7 +4084,49 @@ end
|
||||
|
||||
|
||||
------ Friendly Fire
|
||||
function damageClass:MontaInfoFriendlyFire()
|
||||
local friendlyFireHeadersAllowed = {icon = true, name = true, rank = true, amount = true, persecond = true, percent = true}
|
||||
function damageClass:MontaInfoFriendlyFire() --~friendlyfire ~friendly ~ff
|
||||
---@type actordamage
|
||||
local actorObject = self
|
||||
---@type instance
|
||||
local instance = info.instancia
|
||||
---@type combat
|
||||
local combatObject = instance:GetCombat()
|
||||
---@type string
|
||||
local actorName = actorObject:Name()
|
||||
|
||||
---@type number
|
||||
local friendlyFireTotal = actorObject.friendlyfire_total
|
||||
---@type table<string, friendlyfiretable>
|
||||
local damagedPlayers = actorObject.friendlyfire --players which got hit by this actor
|
||||
---@type actorcontainer
|
||||
local damageContainer = combatObject:GetContainer(class_type)
|
||||
|
||||
local resultTable = {}
|
||||
|
||||
for targetName, friendlyFireTable in pairs(damagedPlayers) do
|
||||
local amountOfFriendlyFire = friendlyFireTable.total
|
||||
if (amountOfFriendlyFire > 0) then
|
||||
local targetActorObject = damageContainer:GetActor(targetName)
|
||||
if (targetActorObject) then
|
||||
---@type texturetable
|
||||
local iconTable = Details:GetActorIcon(targetActorObject)
|
||||
|
||||
---@type {name: string, amount: number, icon: texturetable}
|
||||
local ffTable = {name = targetName, total = amountOfFriendlyFire, icon = iconTable}
|
||||
|
||||
resultTable[#resultTable+1] = ffTable
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
resultTable.totalValue = friendlyFireTotal
|
||||
resultTable.combatTime = combatObject:GetCombatTime()
|
||||
resultTable.headersAllowed = friendlyFireHeadersAllowed
|
||||
|
||||
Details222.BreakdownWindow.SendGenericData(resultTable, actorObject, combatObject, instance)
|
||||
|
||||
if true then return end
|
||||
|
||||
local instancia = info.instancia
|
||||
local combat = instancia:GetShowingCombat()
|
||||
@@ -4263,7 +4312,7 @@ function damageClass:MontaInfoDamageTaken()
|
||||
|
||||
Details222.BreakdownWindow.SendGenericData(resultTable, actorObject, combatObject, instance)
|
||||
|
||||
if 1 then return end
|
||||
if true then return end
|
||||
|
||||
local barras = info.barras1
|
||||
local meus_agressores = {}
|
||||
|
||||
@@ -1666,7 +1666,53 @@ function atributo_heal:MontaInfo()
|
||||
end
|
||||
end
|
||||
|
||||
local healingTakenHeadersAllowed = {icon = true, name = true, rank = true, amount = true, persecond = true, percent = true}
|
||||
function atributo_heal:MontaInfoHealTaken()
|
||||
---@type actor
|
||||
local actorObject = self
|
||||
---@type instance
|
||||
local instance = info.instancia
|
||||
---@type combat
|
||||
local combatObject = instance:GetCombat()
|
||||
---@type string
|
||||
local actorName = actorObject:Name()
|
||||
|
||||
---@type number
|
||||
local healTakenTotal = actorObject.healing_taken
|
||||
---@type table<string, boolean>
|
||||
local healTakenFrom = actorObject.healing_from
|
||||
---@type actorcontainer
|
||||
local healContainer = combatObject:GetContainer(class_type)
|
||||
|
||||
local resultTable = {}
|
||||
|
||||
---@type string
|
||||
for healerName in pairs(healTakenFrom) do
|
||||
local sourceActorObject = healContainer:GetActor(healerName)
|
||||
if (sourceActorObject) then
|
||||
---@type table<string, number>
|
||||
local targets = sourceActorObject:GetTargets()
|
||||
---@type number|nil
|
||||
local amountOfHeal = targets[actorName]
|
||||
if (amountOfHeal) then
|
||||
---@type texturetable
|
||||
local iconTable = Details:GetActorIcon(sourceActorObject)
|
||||
|
||||
---@type {name: string, amount: number, icon: texturetable}
|
||||
local healTakenTable = {name = healerName, total = amountOfHeal, icon = iconTable}
|
||||
|
||||
resultTable[#resultTable+1] = healTakenTable
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
resultTable.totalValue = healTakenTotal
|
||||
resultTable.combatTime = combatObject:GetCombatTime()
|
||||
resultTable.headersAllowed = healingTakenHeadersAllowed
|
||||
|
||||
Details222.BreakdownWindow.SendGenericData(resultTable, actorObject, combatObject, instance)
|
||||
|
||||
if true then return end
|
||||
|
||||
local healing_taken = self.healing_taken
|
||||
local curandeiros = self.healing_from
|
||||
|
||||
@@ -1060,6 +1060,8 @@ end
|
||||
|
||||
function atributo_energy:MontaInfoRegenRecebido()
|
||||
|
||||
if true then return end
|
||||
|
||||
reset_tooltips_table()
|
||||
|
||||
local barras = info.barras1
|
||||
|
||||
@@ -111,7 +111,8 @@ function Details:OpenBreakdownWindow(instanceObject, actorObject, bFromAttribute
|
||||
Details:CloseBreakdownWindow()
|
||||
return
|
||||
end
|
||||
return Details.row_singleclick_overwrite[mainAttribute][subAttribute](_, actorObject, instanceObject, bIsShiftKeyDown, bIsControlKeyDown)
|
||||
Details.row_singleclick_overwrite[mainAttribute][subAttribute](_, actorObject, instanceObject, bIsShiftKeyDown, bIsControlKeyDown)
|
||||
return
|
||||
end
|
||||
|
||||
if (instanceObject:GetMode() == DETAILS_MODE_RAID) then
|
||||
|
||||
@@ -1535,7 +1535,8 @@ local refreshGenericFunc = function(scrollFrame, scrollData, offset, totalLines)
|
||||
---@type fontstring
|
||||
local fontString = genericBar.InLineTexts[textIndex]
|
||||
genericBar:AddFrameToHeaderAlignment(fontString)
|
||||
fontString:SetText(dataTable.name)
|
||||
local nameWithoutRealm = DF:RemoveRealmName(dataTable.name)
|
||||
fontString:SetText(nameWithoutRealm or dataTable.name)
|
||||
textIndex = textIndex + 1
|
||||
end
|
||||
|
||||
@@ -2177,7 +2178,7 @@ function spellsTab.CreateTargetContainer(tabFrame) --~create ~target ~createtarg
|
||||
targetScrollFrame:CreateLine(spellsTab.CreateTargetBar)
|
||||
end
|
||||
|
||||
tabFrame.targets = tabFrame:CreateFontString(nil, "overlay", "QuestFont_Large")
|
||||
tabFrame.targets = targetScrollFrame:CreateFontString(nil, "overlay", "QuestFont_Large")
|
||||
tabFrame.targets:SetPoint("bottomleft", container, "topleft", 2, 2)
|
||||
tabFrame.targets:SetText(Loc ["STRING_TARGETS"] .. ":")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user