'n_curado' 'n_dmg' 'c_curado' and 'c_dmg' renamed to 'n_total' and 'c_total'
This commit is contained in:
@@ -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