Added Targets, Added Options
This commit is contained in:
@@ -4494,6 +4494,8 @@ function atributo_damage:MontaInfoDamageDone() --I guess this fills the list of
|
||||
---@type string
|
||||
local playerName = actorObject:Name()
|
||||
|
||||
local attribute, subAttribute = instance:GetDisplay()
|
||||
|
||||
--guild ranking on a boss
|
||||
--check if is a raid encounter and if is heroic or mythic
|
||||
do
|
||||
@@ -4641,6 +4643,31 @@ function atributo_damage:MontaInfoDamageDone() --I guess this fills the list of
|
||||
--send to the breakdown window
|
||||
Details222.BreakdownWindow.SendSpellData(breakdownSpellDataList, actorObject, combatObject, instance)
|
||||
|
||||
--targets
|
||||
|
||||
---an array of breakdowntargettable
|
||||
---@type breakdowntargettablelist
|
||||
local targetList = {}
|
||||
|
||||
local targetTotalValue = 0
|
||||
|
||||
local targetsTable = self:GetTargets()
|
||||
for targetName, amount in pairs(targetsTable) do
|
||||
---@class breakdowntargettable
|
||||
local bkTargetData = {
|
||||
name = targetName,
|
||||
total = amount,
|
||||
overheal = 0,
|
||||
}
|
||||
targetTotalValue = targetTotalValue + amount
|
||||
tinsert(targetList, bkTargetData)
|
||||
end
|
||||
|
||||
targetList.totalValue = targetTotalValue
|
||||
targetList.combatTime = actorCombatTime
|
||||
|
||||
Details222.BreakdownWindow.SendTargetData(targetList, actorObject, combatObject, instance)
|
||||
|
||||
if 1 then return end
|
||||
|
||||
--to be deprecated and removed:
|
||||
|
||||
@@ -1997,6 +1997,58 @@ function atributo_heal:MontaInfoHealingDone()
|
||||
--send to the breakdown window
|
||||
Details222.BreakdownWindow.SendSpellData(actorSpellsSorted, actorObject, combatObject, instance)
|
||||
|
||||
--targets
|
||||
|
||||
---an array of breakdowntargettable
|
||||
---@type breakdowntargettable[]
|
||||
local targetList = {}
|
||||
|
||||
--get the targets table: in the class heal, an actor has two targets table, one for normal healing and one for overheal
|
||||
---@type targettable
|
||||
local normalTargetsTable = self:GetTargets("targets")
|
||||
---@type targettable
|
||||
local overhealTargetsTable = self:GetTargets("targets_overheal")
|
||||
|
||||
local targetTotalValue = 0
|
||||
local targetOverhealTotalValue = 0
|
||||
|
||||
--build the data required by the breakdown window
|
||||
for targetName, amount in pairs(normalTargetsTable) do
|
||||
if (amount > 0) then
|
||||
local overhealAmount = overhealTargetsTable[targetName] or 0
|
||||
---@type breakdowntargettable
|
||||
local bkTargetData = {
|
||||
name = targetName,
|
||||
total = amount,
|
||||
overheal = overhealAmount,
|
||||
}
|
||||
targetTotalValue = targetTotalValue + amount
|
||||
targetOverhealTotalValue = targetOverhealTotalValue + (overhealAmount)
|
||||
tinsert(targetList, bkTargetData)
|
||||
end
|
||||
end
|
||||
|
||||
for targetName, amount in pairs(overhealTargetsTable) do
|
||||
if (amount > 0) then
|
||||
if (not normalTargetsTable[targetName]) then
|
||||
---@type breakdowntargettable
|
||||
local bkTargetData = {
|
||||
name = targetName,
|
||||
total = 0,
|
||||
overheal = amount,
|
||||
}
|
||||
targetOverhealTotalValue = targetOverhealTotalValue + (amount)
|
||||
tinsert(targetList, bkTargetData)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
targetList.totalValue = targetTotalValue
|
||||
targetList.totalValueOverheal = targetOverhealTotalValue
|
||||
targetList.combatTime = actorCombatTime
|
||||
|
||||
Details222.BreakdownWindow.SendTargetData(targetList, actorObject, combatObject, instance)
|
||||
|
||||
if 1 then return end
|
||||
|
||||
local instancia = info.instancia
|
||||
|
||||
Reference in New Issue
Block a user