'n_curado' 'n_dmg' 'c_curado' and 'c_dmg' renamed to 'n_total' and 'c_total'
This commit is contained in:
+14
-14
@@ -1820,7 +1820,7 @@
|
||||
|
||||
local role = DetailsFramework.UnitGroupRolesAssigned("player")
|
||||
|
||||
if (spell.n_dmg) then
|
||||
if (spell.n_total) then
|
||||
|
||||
local spellschool, schooltext = spell.spellschool, ""
|
||||
if (spellschool) then
|
||||
@@ -1885,12 +1885,12 @@
|
||||
GC:AddLine("Normal Hits: ", spell.n_amt .. " (" ..floor( spell.n_amt/total_hits*100) .. "%)")
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
local n_average = spell.n_dmg / spell.n_amt
|
||||
local T = (combat_time*spell.n_dmg)/spell.total
|
||||
local n_average = spell.n_total / spell.n_amt
|
||||
local T = (combat_time*spell.n_total)/spell.total
|
||||
local P = average/n_average*100
|
||||
T = P*T/100
|
||||
|
||||
GC:AddLine("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format("%.1f",spell.n_dmg / T ))
|
||||
GC:AddLine("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format("%.1f",spell.n_total / T ))
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
--GC:AddLine(" ")
|
||||
@@ -1899,11 +1899,11 @@
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
if (spell.c_amt > 0) then
|
||||
local c_average = spell.c_dmg/spell.c_amt
|
||||
local T = (combat_time*spell.c_dmg)/spell.total
|
||||
local c_average = spell.c_total/spell.c_amt
|
||||
local T = (combat_time*spell.c_total)/spell.total
|
||||
local P = average/c_average*100
|
||||
T = P*T/100
|
||||
local crit_dps = spell.c_dmg / T
|
||||
local crit_dps = spell.c_total / T
|
||||
|
||||
GC:AddLine("Average / E-Dps: ", _detalhes:ToK (c_average) .. " / " .. _detalhes:comma_value (crit_dps))
|
||||
else
|
||||
@@ -1913,7 +1913,7 @@
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
|
||||
elseif (spell.n_curado) then
|
||||
elseif (spell.n_total) then
|
||||
|
||||
local spellschool, schooltext = spell.spellschool, ""
|
||||
if (spellschool) then
|
||||
@@ -1945,12 +1945,12 @@
|
||||
GC:AddLine("Normal Hits: ", spell.n_amt .. " (" ..floor( spell.n_amt/total_hits*100) .. "%)")
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
local n_average = spell.n_curado / spell.n_amt
|
||||
local T = (combat_time*spell.n_curado)/spell.total
|
||||
local n_average = spell.n_total / spell.n_amt
|
||||
local T = (combat_time*spell.n_total)/spell.total
|
||||
local P = average/n_average*100
|
||||
T = P*T/100
|
||||
|
||||
GC:AddLine("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format("%.1f",spell.n_curado / T ))
|
||||
GC:AddLine("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format("%.1f",spell.n_total / T ))
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
--GC:AddLine(" ")
|
||||
@@ -1959,11 +1959,11 @@
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
if (spell.c_amt > 0) then
|
||||
local c_average = spell.c_curado/spell.c_amt
|
||||
local T = (combat_time*spell.c_curado)/spell.total
|
||||
local c_average = spell.c_total/spell.c_amt
|
||||
local T = (combat_time*spell.c_total)/spell.total
|
||||
local P = average/c_average*100
|
||||
T = P*T/100
|
||||
local crit_dps = spell.c_curado / T
|
||||
local crit_dps = spell.c_total / T
|
||||
|
||||
GC:AddLine("Average / E-Hps: ", _detalhes:ToK (c_average) .. " / " .. _detalhes:comma_value (crit_dps))
|
||||
else
|
||||
|
||||
@@ -4520,7 +4520,7 @@ function atributo_damage:MontaInfoDamageDone() --I guess this fills the list of
|
||||
---@type number
|
||||
local totalDamageWithoutPet = actorObject.total_without_pet
|
||||
---@type number
|
||||
local actorTotalDamage = actorObject.total
|
||||
local actorTotal = actorObject.total
|
||||
---@type table
|
||||
local actorSpellsSorted = {}
|
||||
---@type table<number, spelltable>
|
||||
@@ -4537,7 +4537,7 @@ function atributo_damage:MontaInfoDamageDone() --I guess this fills the list of
|
||||
end
|
||||
|
||||
--actor spells
|
||||
---@type {[string]: number}
|
||||
---@type table<string, number>
|
||||
local alreadyAdded = {}
|
||||
for spellId, spellTable in pairs(actorSpells) do
|
||||
---@cast spellId number
|
||||
@@ -4632,7 +4632,7 @@ function atributo_damage:MontaInfoDamageDone() --I guess this fills the list of
|
||||
return t1.total > t2.total
|
||||
end)
|
||||
|
||||
actorSpellsSorted.totalValue = actorTotalDamage
|
||||
actorSpellsSorted.totalValue = actorTotal
|
||||
actorSpellsSorted.combatTime = actorCombatTime
|
||||
|
||||
--actorSpellsSorted has the spell infomation, need to pass to the summary tab
|
||||
@@ -5283,7 +5283,7 @@ function atributo_damage:MontaDetalhesDamageDone (spellId, spellLine, instance)
|
||||
--NORMAL
|
||||
local normal_hits = spellTable.n_amt
|
||||
if (normal_hits > 0) then
|
||||
local normal_dmg = spellTable.n_dmg
|
||||
local normal_dmg = spellTable.n_total
|
||||
local media_normal = normal_dmg/normal_hits
|
||||
local T = (meu_tempo*normal_dmg)/ max(spellTable.total, 0.001)
|
||||
local P = media/media_normal*100
|
||||
@@ -5306,11 +5306,11 @@ function atributo_damage:MontaDetalhesDamageDone (spellId, spellLine, instance)
|
||||
|
||||
--CRITICO
|
||||
if (spellTable.c_amt > 0) then
|
||||
local media_critico = spellTable.c_dmg/spellTable.c_amt
|
||||
local T = (meu_tempo*spellTable.c_dmg)/spellTable.total
|
||||
local media_critico = spellTable.c_total/spellTable.c_amt
|
||||
local T = (meu_tempo*spellTable.c_total)/spellTable.total
|
||||
local P = media/max(media_critico, 0.0001)*100
|
||||
T = P*T/100
|
||||
local crit_dps = spellTable.c_dmg/T
|
||||
local crit_dps = spellTable.c_total/T
|
||||
if (not crit_dps) then
|
||||
crit_dps = 0
|
||||
end
|
||||
|
||||
+135
-10
@@ -122,11 +122,6 @@ end
|
||||
|
||||
--tooltip function
|
||||
|
||||
|
||||
local function RefreshNpcHealingTakenBar(tabela, barra, instancia)
|
||||
atributo_damage:UpdateNpcHealingTaken(tabela, tabela.minha_barra, barra.colocacao, instancia)
|
||||
end
|
||||
|
||||
local on_switch_NHT_show = function(instance) --npc healing taken
|
||||
instance:TrocaTabela(instance, true, 1, 8)
|
||||
return true
|
||||
@@ -1868,8 +1863,138 @@ function atributo_heal:MontaInfoOverHealing()
|
||||
end
|
||||
|
||||
function atributo_heal:MontaInfoHealingDone()
|
||||
---@type actor
|
||||
local actorObject = self
|
||||
---@type instance
|
||||
local instance = info.instancia
|
||||
---@type combat
|
||||
local combatObject = instance:GetCombat()
|
||||
---@type string
|
||||
local playerName = actorObject:Name()
|
||||
|
||||
--pegar as habilidade de dar sort no heal
|
||||
---@type number
|
||||
local actorTotal = actorObject.total
|
||||
---@type table
|
||||
local actorSpellsSorted = {}
|
||||
---@type table<number, spelltable>
|
||||
local actorSpells = actorObject:GetSpellList()
|
||||
|
||||
--get time
|
||||
local actorCombatTime
|
||||
if (Details.time_type == 1 or not actorObject.grupo) then
|
||||
actorCombatTime = actorObject:Tempo()
|
||||
elseif (Details.time_type == 2) then
|
||||
actorCombatTime = info.instancia.showing:GetCombatTime()
|
||||
end
|
||||
|
||||
--actor spells
|
||||
---@type table<string, number>
|
||||
local alreadyAdded = {}
|
||||
for spellId, spellTable in pairs(actorSpells) do
|
||||
---@cast spellId number
|
||||
---@cast spellTable spelltable
|
||||
|
||||
spellTable.ChartData = nil
|
||||
|
||||
---@type string
|
||||
local spellName = _GetSpellInfo(spellId)
|
||||
if (spellName) then
|
||||
---@type number in which index the spell with the same name was stored
|
||||
local index = alreadyAdded[spellName]
|
||||
if (index) then
|
||||
---@type breakdownspelldata
|
||||
local bkSpellData = actorSpellsSorted[index]
|
||||
bkSpellData.spellIds[#bkSpellData.spellIds+1] = spellId
|
||||
bkSpellData.spellTables[#bkSpellData.spellTables+1] = spellTable
|
||||
bkSpellData.petNames[#bkSpellData.petNames+1] = ""
|
||||
bkSpellData.bCanExpand = true
|
||||
else
|
||||
---@type breakdownspelldata
|
||||
local bkSpellData = {
|
||||
id = spellId,
|
||||
spellschool = spellTable.spellschool,
|
||||
bIsExpanded = Details222.BreakdownWindow.IsSpellExpanded(spellId),
|
||||
bCanExpand = false,
|
||||
|
||||
spellIds = {spellId},
|
||||
spellTables = {spellTable}, --sub spell tables to show if the spell is expanded
|
||||
petNames = {""},
|
||||
}
|
||||
|
||||
actorSpellsSorted[#actorSpellsSorted+1] = bkSpellData
|
||||
alreadyAdded[spellName] = #actorSpellsSorted
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--pets spells
|
||||
local actorPets = actorObject:GetPets()
|
||||
for _, petName in ipairs(actorPets) do
|
||||
---@type actor
|
||||
local petActor = combatObject(DETAILS_ATTRIBUTE_HEAL, petName)
|
||||
if (petActor) then --PET
|
||||
local spells = petActor:GetSpellList()
|
||||
for spellId, spellTable in pairs(spells) do
|
||||
---@cast spellId number
|
||||
---@cast spellTable spelltable
|
||||
|
||||
spellTable.ChartData = nil
|
||||
--PET
|
||||
---@type string
|
||||
local spellName = _GetSpellInfo(spellId)
|
||||
if (spellName) then
|
||||
---@type number in which index the spell with the same name was stored
|
||||
local index = alreadyAdded[spellName]
|
||||
if (index) then --PET
|
||||
---@type breakdownspelldata
|
||||
local bkSpellData = actorSpellsSorted[index]
|
||||
bkSpellData.spellIds[#bkSpellData.spellIds+1] = spellId
|
||||
bkSpellData.spellTables[#bkSpellData.spellTables+1] = spellTable
|
||||
bkSpellData.petNames[#bkSpellData.petNames+1] = petName
|
||||
bkSpellData.bCanExpand = true
|
||||
else --PET
|
||||
---@type breakdownspelldata
|
||||
local bkSpellData = {
|
||||
id = spellId,
|
||||
spellschool = spellTable.spellschool,
|
||||
expanded = Details222.BreakdownWindow.IsSpellExpanded(spellId),
|
||||
bCanExpand = false,
|
||||
|
||||
spellIds = {spellId},
|
||||
spellTables = {spellTable},
|
||||
petNames = {petName},
|
||||
}
|
||||
actorSpellsSorted[#actorSpellsSorted+1] = bkSpellData
|
||||
alreadyAdded[spellName] = #actorSpellsSorted
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, #actorSpellsSorted do
|
||||
---@type breakdownspelldata
|
||||
local bkSpellData = actorSpellsSorted[i]
|
||||
Details:SumSpellTables(bkSpellData.spellTables, bkSpellData)
|
||||
end
|
||||
|
||||
--table.sort(actorSpellsSorted, Details.Sort2)
|
||||
table.sort(actorSpellsSorted, function(t1, t2)
|
||||
return t1.total > t2.total
|
||||
end)
|
||||
|
||||
actorSpellsSorted.totalValue = actorTotal
|
||||
actorSpellsSorted.combatTime = actorCombatTime
|
||||
|
||||
--actorSpellsSorted has the spell infomation, need to pass to the summary tab
|
||||
|
||||
--cleanup
|
||||
table.wipe(alreadyAdded)
|
||||
|
||||
--send to the breakdown window
|
||||
Details222.BreakdownWindow.SendSpellData(actorSpellsSorted, actorObject, combatObject, instance)
|
||||
|
||||
if 1 then return end
|
||||
|
||||
local instancia = info.instancia
|
||||
local total = self.total
|
||||
@@ -2306,7 +2431,7 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
|
||||
--NORMAL
|
||||
local normal_hits = esta_magia.n_amt
|
||||
if (normal_hits > 0) then
|
||||
local normal_curado = esta_magia.n_curado
|
||||
local normal_curado = esta_magia.n_total
|
||||
local media_normal = normal_curado/normal_hits
|
||||
media_normal = max(media_normal, 0.000001)
|
||||
|
||||
@@ -2337,11 +2462,11 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
|
||||
|
||||
--CRITICO
|
||||
if (esta_magia.c_amt > 0) then
|
||||
local media_critico = esta_magia.c_curado/esta_magia.c_amt
|
||||
local T = (meu_tempo*esta_magia.c_curado)/esta_magia.total
|
||||
local media_critico = esta_magia.c_total/esta_magia.c_amt
|
||||
local T = (meu_tempo*esta_magia.c_total)/esta_magia.total
|
||||
local P = media/max(media_critico, 0.0001)*100
|
||||
T = P*T/100
|
||||
local crit_hps = esta_magia.c_curado/T
|
||||
local crit_hps = esta_magia.c_total/T
|
||||
if (not crit_hps) then
|
||||
crit_hps = 0
|
||||
end
|
||||
|
||||
@@ -41,13 +41,13 @@
|
||||
--amount normal hits
|
||||
n_amt = 0,
|
||||
--total damage of normal hits
|
||||
n_dmg = 0,
|
||||
n_total = 0,
|
||||
|
||||
--critical hits
|
||||
c_min = 0,
|
||||
c_max = 0,
|
||||
c_amt = 0,
|
||||
c_dmg = 0,
|
||||
c_total = 0,
|
||||
|
||||
--glacing hits
|
||||
g_amt = 0,
|
||||
@@ -117,7 +117,7 @@
|
||||
self.g_amt = self.g_amt+1 --amount � o total de dano
|
||||
|
||||
elseif (critical) then
|
||||
self.c_dmg = self.c_dmg+amount --amount � o total de dano
|
||||
self.c_total = self.c_total+amount --amount � o total de dano
|
||||
self.c_amt = self.c_amt+1 --amount � o total de dano
|
||||
if (amount > self.c_max) then
|
||||
self.c_max = amount
|
||||
@@ -127,7 +127,7 @@
|
||||
end
|
||||
|
||||
else
|
||||
self.n_dmg = self.n_dmg+amount
|
||||
self.n_total = self.n_total+amount
|
||||
self.n_amt = self.n_amt+1
|
||||
if (amount > self.n_max) then
|
||||
self.n_max = amount
|
||||
|
||||
@@ -1,96 +1,86 @@
|
||||
-- heal ability file
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local Details = _G._detalhes
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
local healingAbility = Details.habilidade_cura
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--constants
|
||||
|
||||
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
|
||||
local habilidade_cura = _detalhes.habilidade_cura
|
||||
local container_combatentes = _detalhes.container_combatentes
|
||||
local container_heal_target = _detalhes.container_type.CONTAINER_HEALTARGET_CLASS
|
||||
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--internals
|
||||
|
||||
function habilidade_cura:NovaTabela (id, link)
|
||||
|
||||
local _newHealSpell = {
|
||||
|
||||
function healingAbility:NovaTabela(id)
|
||||
---@type spelltable
|
||||
local spellTable = {
|
||||
--spellId
|
||||
id = id,
|
||||
--total amount of hits
|
||||
counter = 0,
|
||||
|
||||
--totals
|
||||
total = 0,
|
||||
|
||||
--healing done total (healing done by normal hits + healing done by critical hits)
|
||||
total = 0,
|
||||
--absorbs total
|
||||
totalabsorb = 0,
|
||||
absorbed = 0,
|
||||
--overheal total
|
||||
overheal = 0,
|
||||
--heal denied
|
||||
totaldenied = 0,
|
||||
|
||||
--normal hits
|
||||
n_min = 0,
|
||||
n_max = 0,
|
||||
n_amt = 0,
|
||||
n_curado = 0,
|
||||
|
||||
--critical hits
|
||||
c_min = 0,
|
||||
c_max = 0,
|
||||
c_amt = 0,
|
||||
c_curado = 0,
|
||||
--healing done by normal hits
|
||||
n_amt = 0, --amount of hits
|
||||
n_min = 0, --min healing done by normal hits (non critical)
|
||||
n_max = 0, --max healing done by normal hits (non critical)
|
||||
n_total = 0, --total healing done by normal hits (non critical)
|
||||
|
||||
--healing done by critical hits
|
||||
c_amt = 0, --amount of hits
|
||||
c_min = 0, --min healing done by critical hits
|
||||
c_max = 0, --max healing done by critical hits
|
||||
c_total = 0, --total healing done by critical hits
|
||||
|
||||
--targets containers
|
||||
targets = {},
|
||||
targets_overheal = {},
|
||||
targets_absorbs = {}
|
||||
}
|
||||
|
||||
return _newHealSpell
|
||||
|
||||
return spellTable
|
||||
end
|
||||
|
||||
function habilidade_cura:Add (serial, nome, flag, amount, extraSpellID, absorbed, critical, overhealing, is_shield)
|
||||
|
||||
function healingAbility:Add(serial, nome, flag, amount, extraSpellID, absorbed, critical, overhealing, bIsShield)
|
||||
amount = amount or 0
|
||||
self.targets [nome] = (self.targets [nome] or 0) + amount
|
||||
|
||||
if (absorbed == "SPELL_HEAL_ABSORBED") then
|
||||
self.counter = self.counter + 1
|
||||
self.totaldenied = self.totaldenied + amount
|
||||
|
||||
|
||||
local healerName = critical
|
||||
|
||||
|
||||
--create the denied table spells, on the fly
|
||||
if (not self.heal_denied) then
|
||||
self.heal_denied = {}
|
||||
self.heal_denied_healers = {}
|
||||
end
|
||||
|
||||
|
||||
self.heal_denied [extraSpellID] = (self.heal_denied [extraSpellID] or 0) + amount
|
||||
self.heal_denied_healers [healerName] = (self.heal_denied_healers [healerName] or 0) + amount
|
||||
else
|
||||
|
||||
self.total = self.total + amount
|
||||
self.counter = self.counter + 1
|
||||
|
||||
|
||||
if (absorbed and absorbed > 0) then
|
||||
self.absorbed = self.absorbed + absorbed
|
||||
end
|
||||
|
||||
|
||||
if (overhealing and overhealing > 0) then
|
||||
self.overheal = self.overheal + overhealing
|
||||
self.targets_overheal [nome] = (self.targets_overheal [nome] or 0) + overhealing
|
||||
end
|
||||
|
||||
if (is_shield) then
|
||||
|
||||
if (bIsShield) then
|
||||
self.totalabsorb = self.totalabsorb + amount
|
||||
self.targets_absorbs [nome] = (self.targets_absorbs [nome] or 0) + amount
|
||||
end
|
||||
|
||||
|
||||
if (critical) then
|
||||
self.c_curado = self.c_curado+amount --amount � o total de dano
|
||||
self.c_total = self.c_total+amount --amount � o total de dano
|
||||
self.c_amt = self.c_amt+1 --amount � o total de dano
|
||||
if (amount > self.c_max) then
|
||||
self.c_max = amount
|
||||
@@ -99,7 +89,7 @@
|
||||
self.c_min = amount
|
||||
end
|
||||
else
|
||||
self.n_curado = self.n_curado+amount
|
||||
self.n_total = self.n_total+amount
|
||||
self.n_amt = self.n_amt+1
|
||||
if (amount > self.n_max) then
|
||||
self.n_max = amount
|
||||
@@ -108,8 +98,6 @@
|
||||
self.n_min = amount
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user