v3 Release Candidate.

This commit is contained in:
tercio
2014-11-11 19:49:24 -02:00
parent 1ab15245b4
commit cf3219f436
41 changed files with 2835 additions and 3757 deletions
+27 -10
View File
@@ -55,11 +55,15 @@
return self.TimeData [name]
end
function combate:GetContainer (attribute)
return self [attribute]
end
function combate:IsTrash()
return _rawget (self, "is_trash")
end
function combate:GetDifficult()
function combate:GetDifficulty()
return self.is_boss and self.is_boss.diff
end
@@ -111,6 +115,8 @@
end
--return the total of a specific attribute
local power_table = {0, 1, 3, 6}
function combate:GetTotal (attribute, subAttribute, onlyGroup)
if (attribute == 1 or attribute == 2) then
if (onlyGroup) then
@@ -119,7 +125,17 @@
return self.totals [attribute]
end
elseif (attribute == 3 or attribute == 4) then
elseif (attribute == 3) then
if (subAttribute == 5) then --> resources
return self.totals.resources or 0
end
if (onlyGroup) then
return self.totals_grupo [attribute] [power_table [subAttribute]]
else
return self.totals [attribute] [power_table [subAttribute]]
end
elseif (attribute == 4) then
local subName = _detalhes:GetInternalSubAttributeName (attribute, subAttribute)
if (onlyGroup) then
return self.totals_grupo [attribute] [subName]
@@ -127,6 +143,7 @@
return self.totals [attribute] [subName]
end
end
return 0
end
@@ -217,10 +234,10 @@
0, --> dano
0, --> cura
{--> e_energy
mana = 0, --> mana
e_rage = 0, --> rage
e_energy = 0, --> energy (rogues cat)
runepower = 0 --> runepower (dk)
[0] = 0, --> mana
[1] = 0, --> rage
[3] = 0, --> energy (rogues cat)
[6] = 0 --> runepower (dk)
},
{--> misc
cc_break = 0, --> armazena quantas quebras de CC
@@ -243,10 +260,10 @@
0, --> dano
0, --> cura
{--> e_energy
mana = 0, --> mana
e_rage = 0, --> rage
e_energy = 0, --> energy (rogues cat)
runepower = 0 --> runepower (dk)
[0] = 0, --> mana
[1] = 0, --> rage
[3] = 0, --> energy (rogues cat)
[6] = 0 --> runepower (dk)
},
{--> misc
cc_break = 0, --> armazena quantas quebras de CC
+4 -5
View File
@@ -1003,7 +1003,6 @@
TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
atributo_custom:UpdateDamageDoneBracket()
atributo_custom:UpdateHealingDoneBracket()
atributo_custom:UpdateDamageTakenBracket()
end
function _detalhes:AddDefaultCustomDisplays()
@@ -1036,7 +1035,7 @@
local found_potion = false
--get the spell debuff uptime container
local debuff_uptime_container = player.debuff_uptime and player.debuff_uptime_spell_tables and player.debuff_uptime_spell_tables._ActorTable
local debuff_uptime_container = player.debuff_uptime and player.debuff_uptime_spells and player.debuff_uptime_spells._ActorTable
if (debuff_uptime_container) then
--potion of focus (can't use as pre-potion, so, its amount is always 1
--local focus_potion = debuff_uptime_container [156432] --WoD
@@ -1053,7 +1052,7 @@
end
--get the spell buff uptime container
local buff_uptime_container = player.buff_uptime and player.buff_uptime_spell_tables and player.buff_uptime_spell_tables._ActorTable
local buff_uptime_container = player.buff_uptime and player.buff_uptime_spells and player.buff_uptime_spells._ActorTable
if (buff_uptime_container) then
--potion of the jade serpent
@@ -1135,7 +1134,7 @@
local player, combat, instance = ...
--get the debuff container for potion of focus
local debuff_uptime_container = player.debuff_uptime and player.debuff_uptime_spell_tables and player.debuff_uptime_spell_tables._ActorTable
local debuff_uptime_container = player.debuff_uptime and player.debuff_uptime_spells and player.debuff_uptime_spells._ActorTable
if (debuff_uptime_container) then
--local focus_potion = debuff_uptime_container [156432] --WoD
local focus_potion = debuff_uptime_container [105701] --MoP
@@ -1149,7 +1148,7 @@
end
--get the buff container for all the others potions
local buff_uptime_container = player.buff_uptime and player.buff_uptime_spell_tables and player.buff_uptime_spell_tables._ActorTable
local buff_uptime_container = player.buff_uptime and player.buff_uptime_spells and player.buff_uptime_spells._ActorTable
if (buff_uptime_container) then
--potion of the jade serpent
--local jade_serpent_potion = buff_uptime_container [156426] --WoD
+273 -510
View File
File diff suppressed because it is too large Load Diff
+4 -100
View File
@@ -5,7 +5,6 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
local _setmetatable = setmetatable--lua local
local _ipairs = ipairs--lua local
local _pairs = pairs--lua local
local _UnitAura = UnitAura--api local
@@ -68,15 +67,9 @@
a_amt = 0,
a_dmg = 0,
targets = container_combatentes:NovoContainer (container_damage_target)
targets = {}
}
_setmetatable (_newDamageSpell, habilidade_dano)
if (link) then
_newDamageSpell.targets.shadow = link.targets
end
if (token == "SPELL_PERIODIC_DAMAGE") then
_detalhes:SpellIsDot (id)
end
@@ -86,29 +79,16 @@
function habilidade_dano:AddMiss (serial, nome, flags, who_nome, missType)
self.counter = self.counter + 1
local miss = self [missType] or 0
miss = miss + 1
self [missType] = miss
self [missType] = (self [missType] or 0) + 1
self.targets:PegarCombatente (serial, nome, flags, true) --apenas criar o alvo para a abilidade
end
function habilidade_dano:AddFF (amount)
self.counter = self.counter + 1
self.total = self.total + amount
self.targets [nome] = self.targets [nome] or 0
end
function habilidade_dano:Add (serial, nome, flag, amount, who_nome, resisted, blocked, absorbed, critical, glacing, token, multistrike, isoffhand)
self.counter = self.counter + 1
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
self.targets [nome] = (self.targets [nome] or 0) + amount
if (multistrike) then
self.m_amt = self.m_amt + 1
@@ -140,7 +120,6 @@
end
self.total = self.total + amount
alvo.total = alvo.total + amount
if (glacing) then
self.g_dmg = self.g_dmg+amount --> amount é o total de dano
@@ -223,81 +202,6 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
function _detalhes.refresh:r_habilidade_dano (habilidade, shadow) --recebeu o container shadow
_setmetatable (habilidade, habilidade_dano)
habilidade.__index = habilidade_dano
habilidade.shadow = shadow._ActorTable [habilidade.id]
_detalhes.refresh:r_container_combatentes (habilidade.targets, habilidade.shadow.targets)
end
function _detalhes.clear:c_habilidade_dano (habilidade)
--habilidade.__index = {}
habilidade.__index = nil
habilidade.shadow = nil
_detalhes.clear:c_container_combatentes (habilidade.targets)
end
habilidade_dano.__add = function (tabela1, tabela2)
tabela1.total = tabela1.total + tabela2.total
tabela1.counter = tabela1.counter + tabela2.counter
tabela1.successful_casted = tabela1.successful_casted + tabela2.successful_casted
tabela1.n_min = tabela1.n_min + tabela2.n_min
tabela1.n_max = tabela1.n_max + tabela2.n_max
tabela1.n_amt = tabela1.n_amt + tabela2.n_amt
tabela1.n_dmg = tabela1.n_dmg + tabela2.n_dmg
tabela1.c_min = tabela1.c_min + tabela2.c_min
tabela1.c_max = tabela1.c_max + tabela2.c_max
tabela1.c_amt = tabela1.c_amt + tabela2.c_amt
tabela1.c_dmg = tabela1.c_dmg + tabela2.c_dmg
tabela1.g_amt = tabela1.g_amt + tabela2.g_amt
tabela1.g_dmg = tabela1.g_dmg + tabela2.g_dmg
tabela1.r_amt = tabela1.r_amt + tabela2.r_amt
tabela1.r_dmg = tabela1.r_dmg + tabela2.r_dmg
tabela1.b_amt = tabela1.b_amt + tabela2.b_amt
tabela1.b_dmg = tabela1.b_dmg + tabela2.b_dmg
tabela1.a_amt = tabela1.a_amt + tabela2.a_amt
tabela1.a_dmg = tabela1.a_dmg + tabela2.a_dmg
return tabela1
end
habilidade_dano.__sub = function (tabela1, tabela2)
tabela1.total = tabela1.total - tabela2.total
tabela1.counter = tabela1.counter - tabela2.counter
tabela1.successful_casted = tabela1.successful_casted - tabela2.successful_casted
tabela1.n_min = tabela1.n_min - tabela2.n_min
tabela1.n_max = tabela1.n_max - tabela2.n_max
tabela1.n_amt = tabela1.n_amt - tabela2.n_amt
tabela1.n_dmg = tabela1.n_dmg - tabela2.n_dmg
tabela1.c_min = tabela1.c_min - tabela2.c_min
tabela1.c_max = tabela1.c_max - tabela2.c_max
tabela1.c_amt = tabela1.c_amt - tabela2.c_amt
tabela1.c_dmg = tabela1.c_dmg - tabela2.c_dmg
tabela1.g_amt = tabela1.g_amt - tabela2.g_amt
tabela1.g_dmg = tabela1.g_dmg - tabela2.g_dmg
tabela1.r_amt = tabela1.r_amt - tabela2.r_amt
tabela1.r_dmg = tabela1.r_dmg - tabela2.r_dmg
tabela1.b_amt = tabela1.b_amt - tabela2.b_amt
tabela1.b_dmg = tabela1.b_dmg - tabela2.b_dmg
tabela1.a_amt = tabela1.a_amt - tabela2.a_amt
tabela1.a_dmg = tabela1.a_dmg - tabela2.a_dmg
return tabela1
end
function _detalhes:UpdateDamageAbilityGears()
_recording_ability_with_buffs = _detalhes.RecordPlayerAbilityWithBuffs
end
+640 -465
View File
File diff suppressed because it is too large Load Diff
+4 -73
View File
@@ -25,88 +25,19 @@
function habilidade_energy:NovaTabela (id, link, token)
local _newEnergySpell = {
id = id,
counter = 0,
mana = 0,
e_rage = 0,
e_energy = 0,
runepower = 0,
targets = container_combatentes:NovoContainer (container_energy_target)
total = 0,
targets = {}
}
_setmetatable (_newEnergySpell, habilidade_energy)
if (link) then
_newEnergySpell.targets.shadow = link.targets
end
return _newEnergySpell
end
function habilidade_energy:Add (serial, nome, flag, amount, who_nome, powertype)
self.counter = self.counter + 1
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
if (powertype == 0) then --> MANA
self.mana = self.mana + amount
alvo.mana = alvo.mana + amount
elseif (powertype == 1) then --> e_rage
self.e_rage = self.e_rage + amount
alvo.e_rage = alvo.e_rage + amount
elseif (powertype == 3) then --> ENERGIA
self.e_energy = self.e_energy + amount
alvo.e_energy = alvo.e_energy + amount
elseif (powertype == 6) then --> RUNEPOWER
self.runepower = self.runepower + amount
alvo.runepower = alvo.runepower + amount
end
self.total = self.total + amount
self.targets [nome] = (self.targets [nome] or 0) + amount
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
function _detalhes.refresh:r_habilidade_e_energy (habilidade, shadow) --recebeu o container shadow
_setmetatable (habilidade, habilidade_energy)
habilidade.__index = habilidade_energy
if (shadow ~= -1) then
habilidade.shadow = shadow._ActorTable[habilidade.id]
_detalhes.refresh:r_container_combatentes (habilidade.targets, habilidade.shadow.targets)
else
_detalhes.refresh:r_container_combatentes (habilidade.targets, -1)
end
end
function _detalhes.clear:c_habilidade_e_energy (habilidade)
--habilidade.__index = {}
habilidade.__index = {}
habilidade.shadow = nil
_detalhes.clear:c_container_combatentes (habilidade.targets)
end
habilidade_energy.__sub = function (tabela1, tabela2)
tabela1.mana = tabela1.mana - tabela2.mana
tabela1.e_rage = tabela1.e_rage - tabela2.e_rage
tabela1.e_energy = tabela1.e_energy - tabela2.e_energy
tabela1.runepower = tabela1.runepower - tabela2.runepower
tabela1.counter = tabela1.counter - tabela2.counter
return tabela1
end
+173 -283
View File
@@ -105,21 +105,22 @@ function atributo_heal:NovaTabela (serial, nome, link)
heal_enemy_amt = 0,
--container armazenará os IDs das habilidades usadas por este jogador
spell_tables = container_habilidades:NovoContainer (container_heal),
spells = container_habilidades:NovoContainer (container_heal),
--container armazenará os seriais dos alvos que o player aplicou dano
targets = container_combatentes:NovoContainer (container_heal_target)
targets = {},
targets_overheal = {},
targets_absorbs = {}
}
_setmetatable (_new_healActor, atributo_heal)
if (link) then --> se não for a shadow
--if (link) then --> se não for a shadow
--_new_healActor.last_events_table = _detalhes:CreateActorLastEventTable()
--_new_healActor.last_events_table.original = true
_new_healActor.targets.shadow = link.targets
_new_healActor.spell_tables.shadow = link.spell_tables
end
--_new_healActor.targets.shadow = link.targets
--_new_healActor.spells.shadow = link.spells
--end
return _new_healActor
end
@@ -546,22 +547,6 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
end
function atributo_heal:Custom (_customName, _combat, sub_atributo, spell, alvo)
local _Skill = self.spell_tables._ActorTable [tonumber (spell)]
if (_Skill) then
local spellName = _GetSpellInfo (tonumber (spell))
local SkillTargets = _Skill.targets._ActorTable
for _, TargetActor in _ipairs (SkillTargets) do
local TargetActorSelf = _combat (class_type, TargetActor.nome)
if (TargetActorSelf) then
TargetActorSelf.custom = TargetActor.total + TargetActorSelf.custom
_combat.totals [_customName] = _combat.totals [_customName] + TargetActor.total
end
end
end
end
local actor_class_color_r, actor_class_color_g, actor_class_color_b
--function atributo_heal:AtualizaBarra (instancia, qual_barra, lugar, total, sub_atributo, forcar)
@@ -987,9 +972,9 @@ function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra, keydown)
local este_curador = showing._ActorTable[showing._NameIndexTable[nome]]
if (este_curador) then --> checagem por causa do total e do garbage collector que não limpa os nomes que deram dano
local alvos = este_curador.targets
local este_alvo = alvos._ActorTable[alvos._NameIndexTable[self.nome]]
if (este_alvo and este_alvo.total > 0) then
meus_curadores [#meus_curadores+1] = {nome, este_alvo.total, este_curador.classe}
local este_alvo = alvos [self.nome]
if (este_alvo and este_alvo > 0) then
meus_curadores [#meus_curadores+1] = {nome, este_alvo, este_curador.classe}
end
end
end
@@ -1051,7 +1036,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
local ActorHealingTable = {}
local ActorHealingTargets = {}
local ActorSkillsContainer = self.spell_tables._ActorTable
local ActorSkillsContainer = self.spells._ActorTable
local actor_key, skill_key = "total", "total"
if (instancia.sub_atributo == 3) then
@@ -1078,10 +1063,10 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
_table_sort (ActorHealingTable, _detalhes.Sort2)
--> TOP Curados
ActorSkillsContainer = self.targets._ActorTable
for _, TargetTable in _ipairs (ActorSkillsContainer) do
if (TargetTable.total > 0) then
_table_insert (ActorHealingTargets, {TargetTable.nome, TargetTable.total, TargetTable.total/ActorTotal*100})
ActorSkillsContainer = self.targets
for target_name, amount in _pairs (ActorSkillsContainer) do
if (amount > 0) then
_table_insert (ActorHealingTargets, {target_name, amount, amount / ActorTotal * 100})
end
end
_table_sort (ActorHealingTargets, _detalhes.Sort2)
@@ -1203,7 +1188,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
if (my_self) then
local meu_total = my_self.total_without_pet
local tabela = my_self.spell_tables._ActorTable
local tabela = my_self.spells._ActorTable
local meus_danos = {}
local meu_tempo
@@ -1222,9 +1207,9 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
danos [nome] = meus_danos
local meus_inimigos = {}
tabela = my_self.targets._ActorTable
for _, tabela in _ipairs (tabela) do
_table_insert (meus_inimigos, {tabela.nome, tabela.total, tabela.total/meu_total*100})
tabela = my_self.targets
for target_name, amount in _pairs (tabela) do
_table_insert (meus_inimigos, {target_name, amount, amount / meu_total * 100})
end
_table_sort (meus_inimigos,_detalhes.Sort2)
alvos [nome] = meus_inimigos
@@ -1349,9 +1334,9 @@ function atributo_heal:MontaInfoHealTaken()
este_curandeiro = showing._ActorTable[showing._NameIndexTable[nome]]
if (este_curandeiro) then
local alvos = este_curandeiro.targets
local este_alvo = alvos._ActorTable[alvos._NameIndexTable[self.nome]]
local este_alvo = alvos [self.nome]
if (este_alvo) then
meus_curandeiros [#meus_curandeiros+1] = {nome, este_alvo.total, este_alvo.total/healing_taken*100, este_curandeiro.classe}
meus_curandeiros [#meus_curandeiros+1] = {nome, este_alvo, este_alvo/healing_taken*100, este_curandeiro.classe}
end
end
end
@@ -1362,7 +1347,7 @@ function atributo_heal:MontaInfoHealTaken()
return true
end
_table_sort (meus_curandeiros, function (a, b) return a[2] > b[2] end)
_table_sort (meus_curandeiros, _detalhes.Sort2)
gump:JI_AtualizaContainerBarras (amt)
@@ -1387,62 +1372,6 @@ function atributo_heal:MontaInfoHealTaken()
self:UpdadeInfoBar (barra, index, tabela[1], tabela[1], tabela[2], _detalhes:comma_value (tabela[2]), max_, tabela[3], "Interface\\AddOns\\Details\\images\\classes_small", true, texCoords)
end
--[[
for index, tabela in _ipairs (meus_curandeiros) do
local barra = barras [index]
if (not barra) then
barra = gump:CriaNovaBarraInfo1 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra.on_focus = false
end
if (not info.mostrando_mouse_over) then
if (tabela[1] == self.detalhes) then --> tabela [1] = NOME = NOME que esta na caixa da direita
if (not barra.on_focus) then --> se a barra não tiver no foco
barra.textura:SetStatusBarColor (129/255, 125/255, 69/255, 1)
barra.on_focus = true
if (not info.mostrando) then
info.mostrando = barra
end
end
else
if (barra.on_focus) then
barra.textura:SetStatusBarColor (1, 1, 1, 1) --> volta a cor antiga
barra:SetAlpha (.9) --> volta a alfa antiga
barra.on_focus = false
end
end
end
if (index == 1) then
barra.textura:SetValue (100)
else
barra.textura:SetValue (tabela[2]/max_*100) --> muito mais rapido...
end
barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda
barra.texto_direita:SetText (tabela[2] .." ".. instancia.divisores.abre .._cstr("%.1f", tabela[3]) .."%".. instancia.divisores.fecha) --seta o texto da direita
local classe = tabela[4]
if (not classe) then
classe = "monster"
end
barra.icone:SetTexture ("Interface\\AddOns\\Details\\images\\"..classe:lower().."_small")
barra.minha_tabela = self
barra.show = tabela[1]
barra:Show()
if (self.detalhes and self.detalhes == barra.show) then
self:MontaDetalhes (self.detalhes, barra)
end
end
--]]
end
function atributo_heal:MontaInfoOverHealing()
@@ -1450,7 +1379,7 @@ function atributo_heal:MontaInfoOverHealing()
local instancia = info.instancia
local total = self.totalover
local tabela = self.spell_tables._ActorTable
local tabela = self.spells._ActorTable
local minhas_curas = {}
local barras = info.barras1
@@ -1459,7 +1388,7 @@ function atributo_heal:MontaInfoOverHealing()
_table_insert (minhas_curas, {spellid, tabela.overheal, tabela.overheal/total*100, nome, icone})
end
_table_sort (minhas_curas, function(a, b) return a[2] > b[2] end)
_table_sort (minhas_curas, _detalhes.Sort2)
local amt = #minhas_curas
gump:JI_AtualizaContainerBarras (amt)
@@ -1516,17 +1445,17 @@ function atributo_heal:MontaInfoOverHealing()
--> TOP OVERHEALED
local jogadores_overhealed = {}
tabela = self.targets._ActorTable
tabela = self.targets_overheal
local heal_container = instancia.showing[2]
for _, tabela in _ipairs (tabela) do
for target_name, amount in _pairs (tabela) do
local classe = "UNKNOW"
local actor_object = heal_container._ActorTable [heal_container._NameIndexTable [tabela.nome]]
if (actor_object) then
classe = actor_object.classe
end
_table_insert (jogadores_overhealed, {tabela.nome, tabela.overheal, tabela.overheal/total*100, classe})
_table_insert (jogadores_overhealed, {target_name, amount, amount/total*100, classe})
end
_table_sort (jogadores_overhealed, function(a, b) return a[2] > b[2] end )
_table_sort (jogadores_overhealed, _detalhes.Sort2)
local amt_alvos = #jogadores_overhealed
gump:JI_AtualizaContainerAlvos (amt_alvos)
@@ -1563,14 +1492,8 @@ function atributo_heal:MontaInfoOverHealing()
barra.minha_tabela = self
barra.nome_inimigo = tabela [1]
-- no lugar do spell id colocar o que?
--barra.spellid = tabela[5]
barra:Show()
--if (self.detalhes and self.detalhes == barra.spellid) then
-- self:MontaDetalhes (self.detalhes, barra)
--end
end
end
@@ -1580,7 +1503,7 @@ function atributo_heal:MontaInfoHealingDone()
local instancia = info.instancia
local total = self.total
local tabela = self.spell_tables._ActorTable
local tabela = self.spells._ActorTable
local minhas_curas = {}
local barras = info.barras1
@@ -1604,12 +1527,11 @@ function atributo_heal:MontaInfoHealingDone()
for _, PetName in _ipairs (ActorPets) do
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spell_tables._ActorTable
local PetSkillsContainer = PetActor.spells._ActorTable
for _spellid, _skill in _pairs (PetSkillsContainer) do --> da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo (_spellid)
_table_insert (minhas_curas, {_spellid, _skill.total, _skill.total/total*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
end
--_table_insert (ActorSkillsSortTable, {PetName, PetActor.total, PetActor.total/ActorTotalDamage*100, PetName:gsub ((" <.*"), ""), "Interface\\AddOns\\Details\\images\\classes_small"})
end
end
@@ -1652,11 +1574,11 @@ function atributo_heal:MontaInfoHealingDone()
--> TOP CURADOS
local meus_inimigos = {}
tabela = self.targets._ActorTable
for _, tabela in _ipairs (tabela) do
_table_insert (meus_inimigos, {tabela.nome, tabela.total, tabela.total/total*100})
tabela = self.targets
for target_name, amount in _pairs (tabela) do
_table_insert (meus_inimigos, {target_name, amount, amount / total*100})
end
_table_sort (meus_inimigos, function(a, b) return a[2] > b[2] end )
_table_sort (meus_inimigos, _detalhes.Sort2)
local amt_alvos = #meus_inimigos
gump:JI_AtualizaContainerAlvos (amt_alvos)
@@ -1686,50 +1608,39 @@ function atributo_heal:MontaInfoHealingDone()
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita
end
-- o que mostrar no local do ícone?
--barra.icone:SetTexture (tabela[4][3])
barra.minha_tabela = self
barra.nome_inimigo = tabela [1]
-- no lugar do spell id colocar o que?
barra.spellid = tabela[5]
barra:Show()
--if (self.detalhes and self.detalhes == barra.spellid) then
-- self:MontaDetalhes (self.detalhes, barra)
--end
end
end
function atributo_heal:MontaTooltipAlvos (esta_barra, index, instancia)
-- eu ja sei quem é o alvo a mostrar os detalhes
-- dar foreach no container de habilidades -- pegar os alvos da habilidade -- e ver se dentro do container tem o meu alvo.
local inimigo = esta_barra.nome_inimigo
local container = self.spell_tables._ActorTable
local container = self.spells._ActorTable
local habilidades = {}
local total
local sub_atributo = info.instancia.sub_atributo
local targets_key = ""
if (sub_atributo == 3) then --> overheal
total = self.totalover
targets_key = "_overheal"
else
total = self.total
end
--> add spells
for spellid, tabela in _pairs (container) do
local alvos = tabela.targets._ActorTable
for _, tabela in _ipairs (alvos) do
if (tabela.nome == inimigo) then
for target_name, amount in _pairs (tabela ["targets" .. targets_key]) do
if (target_name == inimigo) then
local nome, _, icone = _GetSpellInfo (spellid)
if (sub_atributo == 3) then --> overheal
habilidades [#habilidades+1] = {nome, tabela.overheal, icone}
else
habilidades [#habilidades+1] = {nome, tabela.total, icone}
end
habilidades [#habilidades+1] = {nome, amount, icone}
end
end
end
@@ -1739,24 +1650,21 @@ function atributo_heal:MontaTooltipAlvos (esta_barra, index, instancia)
for _, PetName in _ipairs (ActorPets) do
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spell_tables._ActorTable
local PetSkillsContainer = PetActor.spells._ActorTable
for _spellid, _skill in _pairs (PetSkillsContainer) do
local alvos = _skill.targets._ActorTable
for _, tabela in _ipairs (alvos) do
if (tabela.nome == inimigo) then
for target_name, amount in _pairs (_skill ["targets" .. targets_key]) do
if (target_name == inimigo) then
local nome, _, icone = _GetSpellInfo (_spellid)
if (sub_atributo == 3) then --> overheal
habilidades [#habilidades+1] = {nome .. " (" .. PetName:gsub ((" <.*"), "") .. ")", tabela.overheal, icone}
else
habilidades [#habilidades+1] = {nome .. " (" .. PetName:gsub ((" <.*"), "") .. ")", tabela.total, icone}
end
habilidades [#habilidades+1] = {nome, amount, icone}
end
end
end
end
end
_table_sort (habilidades, function (a, b) return a[2] > b[2] end)
_table_sort (habilidades, _detalhes.Sort2)
--get time type
local meu_tempo
@@ -1796,7 +1704,6 @@ function atributo_heal:MontaTooltipAlvos (esta_barra, index, instancia)
end
return true
--GameTooltip:AddDoubleLine (minhas_curas[i][4][1]..": ", minhas_curas[i][2].." (".._cstr ("%.1f", minhas_curas[i][3]).."%)", 1, 1, 1, 1, 1, 1)
end
@@ -1822,32 +1729,22 @@ function atributo_heal:MontaDetalhesHealingTaken (nome, barra)
local showing = tabela_do_combate [class_type] --> o que esta sendo mostrado -> [1] - dano [2] - cura --> pega o container com ._NameIndexTable ._ActorTable
local este_curandeiro = showing._ActorTable[showing._NameIndexTable[nome]]
local conteudo = este_curandeiro.spell_tables._ActorTable --> _pairs[] com os IDs das magias
local conteudo = este_curandeiro.spells._ActorTable --> _pairs[] com os IDs das magias
local actor = info.jogador.nome
local total = este_curandeiro.targets._ActorTable [este_curandeiro.targets._NameIndexTable [actor]].total
local total = este_curandeiro.targets [actor]
local minhas_magias = {}
for spellid, tabela in _pairs (conteudo) do --> da foreach em cada spellid do container
--> preciso pegar os alvos que esta magia atingiu
local alvos = tabela.targets
local index = alvos._NameIndexTable[actor]
if (index) then --> esta magia deu dano no actor
local este_alvo = alvos._ActorTable[index] --> pega a classe_target
local spell_nome, rank, icone = _GetSpellInfo (spellid)
_table_insert (minhas_magias, {spellid, este_alvo.total, este_alvo.total/total*100, spell_nome, icone})
if (tabela.targets [actor]) then
local spell_nome, _, icone = _GetSpellInfo (spellid)
_table_insert (minhas_magias, {spellid, tabela.targets [actor], tabela.targets [actor] / total*100, spell_nome, icone})
end
end
_table_sort (minhas_magias, function(a, b) return a[2] > b[2] end)
--local amt = #minhas_magias
--gump:JI_AtualizaContainerBarras (amt)
_table_sort (minhas_magias, _detalhes.Sort2)
local max_ = minhas_magias[1] and minhas_magias[1][2] or 0 --> dano que a primeiro magia vez
@@ -1892,9 +1789,9 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
local esta_magia
if (barra.other_actor) then
esta_magia = barra.other_actor.spell_tables._ActorTable [spellid]
esta_magia = barra.other_actor.spells._ActorTable [spellid]
else
esta_magia = self.spell_tables._ActorTable [spellid]
esta_magia = self.spells._ActorTable [spellid]
end
if (not esta_magia) then
@@ -2048,27 +1945,6 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
_table_sort (data, _detalhes.Sort1)
--[[
local absorbed = esta_magia.absorbed
if (absorbed > 0) then
local porcentagem_absorbed = absorbed/esta_magia.total*100
data[#data+1] = t3
absorbed_table.p = porcentagem_absorbed
t3[1] = absorbed
t3[2] = absorbed_table
t3[3] = Loc ["STRING_HEAL_ABSORBED"]
t3[4] = ""
t3[5] = ""
t3[6] = ""
t3[7] = ""
t3[8] = absorbed .. " / " .. _cstr ("%.1f", porcentagem_absorbed).."%"
end
--]]
for i = #data+1, 3 do --> para o overheal aparecer na ultima barra
data[i] = nil
@@ -2109,10 +1985,6 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
end
end
--for i = #data+2, 5 do
-- gump:HidaDetalheInfo (i)
--end
end
--controla se o dps do jogador esta travado ou destravado
@@ -2188,27 +2060,38 @@ end
_detalhes.refresh:r_atributo_heal (actor, shadow)
--> copia o container de alvos (captura de dados)
for index, alvo in _ipairs (actor.targets._ActorTable) do
--> cria e soma o valor do total
local alvo_shadow = shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
--> refresh no alvo
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets)
for target_name, amount in _pairs (actor.targets) do
shadow.targets [target_name] = 0
end
for target_name, amount in _pairs (actor.targets_overheal) do
shadow.targets_overheal [target_name] = 0
end
for target_name, amount in _pairs (actor.targets_absorbs) do
shadow.targets_absorbs [target_name] = 0
end
--> copia o container de habilidades (captura de dados)
for spellid, habilidade in _pairs (actor.spell_tables._ActorTable) do
for spellid, habilidade in _pairs (actor.spells._ActorTable) do
--> cria e soma o valor
local habilidade_shadow = shadow.spell_tables:PegaHabilidade (spellid, true, nil, true)
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, nil, true)
--> refresh e soma os valores dos alvos
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
--> cria e soma o valor do total
local alvo_shadow = habilidade_shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
--> refresh no alvo da habilidade
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade_shadow.targets)
end
--> refresh na habilidade
_detalhes.refresh:r_habilidade_cura (habilidade, shadow.spell_tables)
for target_name, amount in _pairs (habilidade.targets) do
if (not habilidade_shadow.targets [target_name]) then
habilidade_shadow.targets [target_name] = 0
end
end
for target_name, amount in _pairs (habilidade.targets_overheal) do
if (not habilidade_shadow.targets_overheal [target_name]) then
habilidade_shadow.targets_overheal [target_name] = 0
end
end
for target_name, amount in _pairs (habilidade.targets_absorbs) do
if (not habilidade_shadow.targets_absorbs [target_name]) then
habilidade_shadow.targets_absorbs [target_name] = 0
end
end
end
return shadow
@@ -2274,34 +2157,32 @@ end
end
--> copia o container de alvos (captura de dados)
for index, alvo in _ipairs (actor.targets._ActorTable) do
--> cria e soma o valor do total
local alvo_shadow = shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
alvo_shadow.total = alvo_shadow.total + alvo.total
alvo_shadow.overheal = alvo_shadow.overheal + alvo.overheal
alvo_shadow.absorbed = alvo_shadow.absorbed + alvo.absorbed
--> refresh no alvo
if (not no_refresh) then
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets)
end
for target_name, amount in _pairs (actor.targets) do
shadow.targets [target_name] = (shadow.targets [target_name] or 0) + amount
end
for target_name, amount in _pairs (actor.targets_overheal) do
shadow.targets_overheal [target_name] = (shadow.targets_overheal [target_name] or 0) + amount
end
for target_name, amount in _pairs (actor.targets_absorbs) do
shadow.targets_absorbs [target_name] = (shadow.targets_absorbs [target_name] or 0) + amount
end
--> copia o container de habilidades (captura de dados)
for spellid, habilidade in _pairs (actor.spell_tables._ActorTable) do
for spellid, habilidade in _pairs (actor.spells._ActorTable) do
--> cria e soma o valor
local habilidade_shadow = shadow.spell_tables:PegaHabilidade (spellid, true, nil, true)
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, nil, true)
--> refresh e soma os valores dos alvos
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
--> cria e soma o valor do total
local alvo_shadow = habilidade_shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
alvo_shadow.total = alvo_shadow.total + alvo.total
alvo_shadow.overheal = alvo_shadow.overheal + alvo.overheal
alvo_shadow.absorbed = alvo_shadow.absorbed + alvo.absorbed
--> refresh no alvo da habilidade
if (not no_refresh) then
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade_shadow.targets)
end
for target_name, amount in _pairs (habilidade.targets) do
habilidade_shadow.targets [target_name] = (habilidade_shadow.targets [target_name] or 0) + amount
end
for target_name, amount in _pairs (habilidade.targets_overheal) do
habilidade_shadow.targets_overheal [target_name] = (habilidade_shadow.targets_overheal [target_name] or 0) + amount
end
for target_name, amount in _pairs (habilidade.targets_absorbs) do
habilidade_shadow.targets_absorbs [target_name] = (habilidade_shadow.targets_absorbs [target_name] or 0) + amount
end
--> soma todos os demais valores
for key, value in _pairs (habilidade) do
if (_type (value) == "number") then
@@ -2313,11 +2194,7 @@ end
end
end
end
--> refresh na habilidade
if (not no_refresh) then
_detalhes.refresh:r_habilidade_cura (habilidade, shadow.spell_tables)
end
end
return shadow
@@ -2327,31 +2204,6 @@ function atributo_heal:ColetarLixo (lastevent)
return _detalhes:ColetarLixo (class_type, lastevent)
end
function _detalhes.refresh:r_atributo_heal (este_jogador, shadow)
_setmetatable (este_jogador, atributo_heal)
este_jogador.__index = atributo_heal
if (shadow ~= -1) then
este_jogador.shadow = shadow
_detalhes.refresh:r_container_combatentes (este_jogador.targets, shadow.targets)
_detalhes.refresh:r_container_habilidades (este_jogador.spell_tables, shadow.spell_tables)
else
_detalhes.refresh:r_container_combatentes (este_jogador.targets, -1)
_detalhes.refresh:r_container_habilidades (este_jogador.spell_tables, -1)
end
end
function _detalhes.clear:c_atributo_heal (este_jogador)
--este_jogador.__index = {}
este_jogador.__index = nil
este_jogador.shadow = nil
este_jogador.links = nil
este_jogador.minha_barra = nil
_detalhes.clear:c_container_combatentes (este_jogador.targets)
_detalhes.clear:c_container_habilidades (este_jogador.spell_tables)
end
atributo_heal.__add = function (tabela1, tabela2)
--> tempo decorrido
@@ -2387,25 +2239,29 @@ atributo_heal.__add = function (tabela1, tabela2)
end
--> somar o container de alvos
for index, alvo in _ipairs (tabela2.targets._ActorTable) do
--> pega o alvo no ator
local alvo_tabela1 = tabela1.targets:PegarCombatente (nil, alvo.nome, nil, true)
--> soma os valores
alvo_tabela1.total = alvo_tabela1.total + alvo.total
alvo_tabela1.overheal = alvo_tabela1.overheal + alvo.overheal
alvo_tabela1.absorbed = alvo_tabela1.absorbed + alvo.absorbed
for target_name, amount in _pairs (tabela2.targets) do
tabela1.targets [target_name] = (tabela1.targets [target_name] or 0) + amount
end
for target_name, amount in _pairs (tabela2.targets_overheal) do
tabela1.targets_overheal [target_name] = (tabela1.targets_overheal [target_name] or 0) + amount
end
for target_name, amount in _pairs (tabela2.targets_absorbs) do
tabela1.targets_absorbs [target_name] = (tabela1.targets_absorbs [target_name] or 0) + amount
end
--> soma o container de habilidades
for spellid, habilidade in _pairs (tabela2.spell_tables._ActorTable) do
for spellid, habilidade in _pairs (tabela2.spells._ActorTable) do
--> pega a habilidade no primeiro ator
local habilidade_tabela1 = tabela1.spell_tables:PegaHabilidade (spellid, true, "SPELL_HEAL", false)
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_HEAL", false)
--> soma os alvos
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
local alvo_tabela1 = habilidade_tabela1.targets:PegarCombatente (nil, alvo.nome, nil, true)
alvo_tabela1.total = alvo_tabela1.total + alvo.total
alvo_tabela1.overheal = alvo_tabela1.overheal + alvo.overheal
alvo_tabela1.absorbed = alvo_tabela1.absorbed + alvo.absorbed
for target_name, amount in _pairs (habilidade.targets) do
habilidade_tabela1.targets = (habilidade_tabela1.targets [target_name] or 0) + amount
end
for target_name, amount in _pairs (habilidade.targets_overheal) do
habilidade_tabela1.targets_overheal = (habilidade_tabela1.targets_overheal [target_name] or 0) + amount
end
for target_name, amount in _pairs (habilidade.targets_absorbs) do
habilidade_tabela1.targets_absorbs = (habilidade_tabela1.targets_absorbs [target_name] or 0) + amount
end
--> soma os valores da habilidade
for key, value in _pairs (habilidade) do
@@ -2453,26 +2309,43 @@ atributo_heal.__sub = function (tabela1, tabela2)
end
--> reduz o container de alvos
for index, alvo in _ipairs (tabela2.targets._ActorTable) do
--> pega o alvo no ator
local alvo_tabela1 = tabela1.targets:PegarCombatente (nil, alvo.nome, nil, true)
--> soma os valores
alvo_tabela1.total = alvo_tabela1.total - alvo.total
alvo_tabela1.overheal = alvo_tabela1.overheal - alvo.overheal
alvo_tabela1.absorbed = alvo_tabela1.absorbed - alvo.absorbed
for target_name, amount in _pairs (tabela2.targets) do
if (tabela1.targets [target_name]) then
tabela1.targets [target_name] = tabela1.targets [target_name] - amount
end
end
for target_name, amount in _pairs (tabela2.targets_overheal) do
if (tabela1.targets_overheal [target_name]) then
tabela1.targets_overheal [target_name] = tabela1.targets_overheal [target_name] - amount
end
end
for target_name, amount in _pairs (tabela2.targets_absorbs) do
if (tabela1.targets_absorbs [target_name]) then
tabela1.targets_absorbs [target_name] = tabela1.targets_absorbs [target_name] - amount
end
end
--> reduz o container de habilidades
for spellid, habilidade in _pairs (tabela2.spell_tables._ActorTable) do
for spellid, habilidade in _pairs (tabela2.spells._ActorTable) do
--> pega a habilidade no primeiro ator
local habilidade_tabela1 = tabela1.spell_tables:PegaHabilidade (spellid, true, "SPELL_HEAL", false)
--> soma os alvos
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
local alvo_tabela1 = habilidade_tabela1.targets:PegarCombatente (nil, alvo.nome, nil, true)
alvo_tabela1.total = alvo_tabela1.total - alvo.total
alvo_tabela1.overheal = alvo_tabela1.overheal - alvo.overheal
alvo_tabela1.absorbed = alvo_tabela1.absorbed - alvo.absorbed
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_HEAL", false)
--> alvos
for target_name, amount in _pairs (habilidade.targets) do
if (habilidade_tabela1.targets [target_name]) then
habilidade_tabela1.targets [target_name] = habilidade_tabela1.targets [target_name] - amount
end
end
for target_name, amount in _pairs (habilidade.targets_overheal) do
if (habilidade_tabela1.targets_overheal [target_name]) then
habilidade_tabela1.targets_overheal [target_name] = habilidade_tabela1.targets_overheal [target_name] - amount
end
end
for target_name, amount in _pairs (habilidade.targets_absorbs) do
if (habilidade_tabela1.targets_absorbs [target_name]) then
habilidade_tabela1.targets_absorbs [target_name] = habilidade_tabela1.targets_absorbs [target_name] - amount
end
end
--> soma os valores da habilidade
for key, value in _pairs (habilidade) do
if (_type (value) == "number") then
@@ -2488,3 +2361,20 @@ atributo_heal.__sub = function (tabela1, tabela2)
return tabela1
end
function _detalhes.refresh:r_atributo_heal (este_jogador, shadow)
_setmetatable (este_jogador, atributo_heal)
este_jogador.__index = atributo_heal
este_jogador.shadow = shadow
_detalhes.refresh:r_container_habilidades (este_jogador.spells, shadow.spells)
end
function _detalhes.clear:c_atributo_heal (este_jogador)
este_jogador.__index = nil
este_jogador.shadow = nil
este_jogador.links = nil
este_jogador.minha_barra = nil
_detalhes.clear:c_container_habilidades (este_jogador.spells)
end
+14 -70
View File
@@ -2,11 +2,6 @@
local _detalhes = _G._detalhes
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
local _setmetatable = setmetatable --lua local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
@@ -23,11 +18,15 @@
function habilidade_cura:NovaTabela (id, link)
local _newHealSpell = {
id = id,
counter = 0,
--> totals
total = 0,
totalabsorb = 0,
counter = 0,
id = id,
absorbed = 0,
overheal = 0,
--> multistrike
m_amt = 0,
@@ -46,18 +45,12 @@
c_amt = 0,
c_curado = 0,
absorbed = 0,
overheal = 0,
targets = container_combatentes:NovoContainer (container_heal_target)
--> targets containers
targets = {},
targets_overheal = {},
targets_absorbs = {}
}
_setmetatable (_newHealSpell, habilidade_cura)
if (link) then
_newHealSpell.targets.shadow = link.targets
end
return _newHealSpell
end
@@ -65,12 +58,7 @@
self.counter = self.counter + 1
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
self.targets [nome] = (self.targets [nome] or 0) + amount
if (multistrike) then
self.m_amt = self.m_amt + 1
@@ -80,21 +68,20 @@
if (absorbed and absorbed > 0) then
self.absorbed = self.absorbed + absorbed
alvo.absorbed = alvo.absorbed + absorbed
end
if (overhealing and overhealing > 0) then
self.overheal = self.overheal + overhealing
alvo.overheal = alvo.overheal + overhealing
self.targets_overheal [nome] = (self.targets_overheal [nome] or 0) + amount
end
if (amount and amount > 0) then
self.total = self.total + amount
alvo.total = alvo.total + amount
if (is_shield) then
self.totalabsorb = self.totalabsorb + amount
self.targets_absorbs [nome] = (self.targets_absorbs [nome] or 0) + amount
end
if (critical) then
@@ -120,46 +107,3 @@
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
function _detalhes.refresh:r_habilidade_cura (habilidade, shadow)
_setmetatable (habilidade, habilidade_cura)
habilidade.__index = habilidade_cura
if (shadow ~= -1) then
habilidade.shadow = shadow._ActorTable[habilidade.id]
_detalhes.refresh:r_container_combatentes (habilidade.targets, habilidade.shadow.targets)
else
_detalhes.refresh:r_container_combatentes (habilidade.targets, -1)
end
end
function _detalhes.clear:c_habilidade_cura (habilidade)
--habilidade.__index = {}
habilidade.__index = nil
habilidade.shadow = nil
_detalhes.clear:c_container_combatentes (habilidade.targets)
end
habilidade_cura.__sub = function (tabela1, tabela2)
tabela1.total = tabela1.total - tabela2.total
tabela1.totalabsorb = tabela1.totalabsorb - tabela2.totalabsorb
tabela1.counter = tabela1.counter - tabela2.counter
tabela1.n_min = tabela1.n_min - tabela2.n_min
tabela1.n_max = tabela1.n_max - tabela2.n_max
tabela1.n_amt = tabela1.n_amt - tabela2.n_amt
tabela1.n_curado = tabela1.n_curado - tabela2.n_curado
tabela1.c_min = tabela1.c_min - tabela2.c_min
tabela1.c_max = tabela1.c_max - tabela2.c_max
tabela1.c_amt = tabela1.c_amt - tabela2.c_amt
tabela1.c_curado = tabela1.c_curado - tabela2.c_curado
tabela1.absorbed = tabela1.absorbed - tabela2.absorbed
tabela1.overheal = tabela1.overheal - tabela2.overheal
return tabela1
end
+4
View File
@@ -198,6 +198,10 @@ function _detalhes:IsNormalMode()
end
end
function _detalhes:GetShowingCombat()
return self.showing
end
function _detalhes:GetCustomObject()
return _detalhes.custom [self.sub_atributo]
end
+561 -847
View File
File diff suppressed because it is too large Load Diff
+16 -120
View File
@@ -26,7 +26,7 @@
local _newMiscSpell = {
id = id,
counter = 0,
targets = container_combatentes:NovoContainer (container_misc_target)
targets = {}
}
if (token == "BUFF_UPTIME" or token == "DEBUFF_UPTIME") then
@@ -40,12 +40,6 @@
elseif (token == "SPELL_AURA_BROKEN" or token == "SPELL_AURA_BROKEN_SPELL") then
_newMiscSpell.cc_break_oque = {}
end
_setmetatable (_newMiscSpell, habilidade_misc)
if (link) then
_newMiscSpell.targets.shadow = link.targets
end
return _newMiscSpell
end
@@ -56,15 +50,8 @@
if (spellName == "COOLDOWN") then
self.counter = self.counter + 1
--> alvo
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
alvo.total = alvo.total + 1
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (spellName == "BUFF_UPTIME_REFRESH") then
if (self.actived_at and self.actived) then
@@ -122,45 +109,23 @@
elseif (token == "SPELL_INTERRUPT") then
self.counter = self.counter + 1
if (not self.interrompeu_oque [spellID]) then --> interrompeu_oque a NIL value
if (not self.interrompeu_oque [spellID]) then
self.interrompeu_oque [spellID] = 1
else
self.interrompeu_oque [spellID] = self.interrompeu_oque [spellID] + 1
end
--alvo
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
alvo.total = alvo.total + 1
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (token == "SPELL_RESURRECT") then
if (not self.ress) then
self.ress = 1
else
self.ress = self.ress + 1
end
--alvo
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
alvo.total = alvo.total + 1
self.ress = (self.ress or 0) + 1
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (token == "SPELL_DISPEL" or token == "SPELL_STOLEN") then
if (not self.dispell) then
self.dispell = 1
else
self.dispell = self.dispell + 1
end
self.dispell = (self.dispell or 0) + 1
if (not self.dispell_oque [spellID]) then
self.dispell_oque [spellID] = 1
@@ -168,23 +133,11 @@
self.dispell_oque [spellID] = self.dispell_oque [spellID] + 1
end
--alvo
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
alvo.total = alvo.total + 1
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (token == "SPELL_AURA_BROKEN_SPELL" or token == "SPELL_AURA_BROKEN") then
if (not self.cc_break) then
self.cc_break = 1
else
self.cc_break = self.cc_break + 1
end
self.cc_break = (self.cc_break or 0) + 1
if (not self.cc_break_oque [spellID]) then
self.cc_break_oque [spellID] = 1
@@ -192,65 +145,8 @@
self.cc_break_oque [spellID] = self.cc_break_oque [spellID] + 1
end
--alvo
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
alvo.total = alvo.total + 1
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
end
end
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
function _detalhes.refresh:r_habilidade_misc (habilidade, shadow) --recebeu o container shadow
_setmetatable (habilidade, habilidade_misc)
habilidade.__index = habilidade_misc
if (shadow ~= -1) then
habilidade.shadow = shadow._ActorTable[habilidade.id]
_detalhes.refresh:r_container_combatentes (habilidade.targets, habilidade.shadow.targets)
else
_detalhes.refresh:r_container_combatentes (habilidade.targets, -1)
end
end
function _detalhes.clear:c_habilidade_misc (habilidade)
--habilidade.__index = {}
habilidade.__index = nil
habilidade.shadow = nil
_detalhes.clear:c_container_combatentes (habilidade.targets)
end
habilidade_misc.__sub = function (tabela1, tabela2)
--interrupts & cooldowns
tabela1.counter = tabela1.counter - tabela2.counter
--buff uptime ou debuff uptime
if (tabela1.uptime and tabela2.uptime) then
tabela1.uptime = tabela1.uptime - tabela2.uptime
end
--ressesrs
if (tabela1.ress and tabela2.ress) then
tabela1.ress = tabela1.ress - tabela2.ress
end
--dispells
if (tabela1.dispell and tabela2.dispell) then
tabela1.dispell = tabela1.dispell - tabela2.dispell
end
--cc_breaks
if (tabela1.cc_break and tabela2.cc_break) then
tabela1.cc_break = tabela1.cc_break - tabela2.cc_break
end
return tabela1
end
+1 -18
View File
@@ -294,7 +294,7 @@
end
end
local novo_objeto = self.funcao_de_criacao (_, serial, nome, shadow_objeto) --> shadow_objeto passa para o classe_damage gravar no .targets e .spell_tables, mas não grava nele mesmo
local novo_objeto = self.funcao_de_criacao (_, serial, nome, shadow_objeto) --> shadow_objeto passa para o classe_damage gravar no .targets e .spells, mas não grava nele mesmo
novo_objeto.nome = nome
-- tipo do container
@@ -311,7 +311,6 @@
if (shadow_objeto) then
novo_objeto.shadow = shadow_objeto
novo_objeto:CriaLink (shadow_objeto) --> criando o link
if (novo_objeto.grupo and _detalhes.in_combat) then
_detalhes.cache_damage_group [#_detalhes.cache_damage_group+1] = novo_objeto
end
@@ -343,7 +342,6 @@
if (shadow_objeto) then
novo_objeto.shadow = shadow_objeto
novo_objeto:CriaLink (shadow_objeto) --> criando o link
if (novo_objeto.grupo and _detalhes.in_combat) then
_detalhes.cache_healing_group [#_detalhes.cache_healing_group+1] = novo_objeto
end
@@ -372,7 +370,6 @@
if (shadow_objeto) then
novo_objeto.shadow = shadow_objeto
novo_objeto:CriaLink (shadow_objeto) --> criando o link
end
if (novo_objeto.classe == "UNGROUPPLAYER") then --> is a player
@@ -399,7 +396,6 @@
if (shadow_objeto) then
novo_objeto.shadow = shadow_objeto
novo_objeto:CriaLink (shadow_objeto) --> criando o link
end
if (novo_objeto.classe == "UNGROUPPLAYER") then --> is a player
@@ -414,17 +410,7 @@
end
elseif (self.tipo == container_damage_target) then --> CONTAINER ALVO DO DAMAGE
if (shadow_objeto) then
novo_objeto.shadow = shadow_objeto
end
elseif (self.tipo == container_heal_target) then --> CONTAINER ALVOS DO HEALING
novo_objeto.overheal = 0
novo_objeto.absorbed = 0
if (shadow_objeto) then
novo_objeto.shadow = shadow_objeto
end
elseif (self.tipo == container_energy_target) then --> CONTAINER ALVOS DO ENERGY
novo_objeto.mana = 0
@@ -489,9 +475,6 @@
elseif (tipo == container_heal) then
return atributo_heal.NovaTabela
elseif (tipo == container_friendlyfire) then
return atributo_damage.FF_funcao_de_criacao
elseif (tipo == container_enemydebufftarget_target) then
return alvo_da_habilidade.NovaTabela
-22
View File
@@ -57,29 +57,7 @@ local _
else
if (criar) then
if (cria_shadow) then
local novo_objeto = self.funcao_de_criacao (nil, id, nil, "")
self._ActorTable [id] = novo_objeto
return novo_objeto
end
local shadow = self.shadow
local shadow_objeto = nil
if (shadow) then
--> apenas verifica se ele existe ou não
shadow_objeto = shadow:PegaHabilidade (id)
--> se não existir, cria-lo
if (not shadow_objeto) then
shadow_objeto = shadow:PegaHabilidade (id, true, token)
end
end
local novo_objeto = self.funcao_de_criacao (nil, id, shadow_objeto, token)
if (shadow_objeto) then
novo_objeto.shadow = shadow_objeto
end
self._ActorTable [id] = novo_objeto
+134 -79
View File
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> attributes functions for customs
--> DAMAGE DONE
--> DAMAGEDONE
--> customized display script
@@ -49,9 +49,59 @@
TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> damage done tooltip
local temp_table = {}
local target_func = function (main_table)
local i = 1
for name, amount in _pairs (main_table) do
local t = temp_table [i]
if (not t) then
t = {"", 0}
temp_table [i] = t
end
t[1] = name
t[2] = amount
i = i + 1
end
end
local spells_used_func = function (main_table, target)
local i = 1
for spellid, spell_table in _pairs (main_table) do
local target_amount = spell_table.targets [target]
if (target_amount) then
local t = temp_table [i]
if (not t) then
t = {"", 0}
temp_table [i] = t
end
t[1] = spellid
t[2] = target_amount
i = i + 1
end
end
end
local function SortOrder (main_table, func, ...)
for i = 1, #temp_table do
temp_table [i][1] = ""
temp_table [i][2] = 0
end
func (main_table, ...)
_table_sort (temp_table, _detalhes.Sort2)
return temp_table
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> damagedone tooltip
function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, instance)
if (spellid) then
@@ -64,12 +114,11 @@
for name, _ in _pairs (this_actor.damage_from) do
local aggressor = combat (1, name)
if (aggressor) then
local spell = aggressor.spell_tables._ActorTable [spellid]
local spell = aggressor.spells._ActorTable [spellid]
if (spell) then
local on_me = spell.targets._NameIndexTable [targetname]
local on_me = spell.targets [targetname]
if (on_me) then
on_me = spell.targets._ActorTable [on_me]
GameCooltip:AddLine (aggressor.nome, FormatTooltipNumber (_, on_me.total))
GameCooltip:AddLine (aggressor.nome, FormatTooltipNumber (_, on_me))
end
end
end
@@ -90,52 +139,56 @@
elseif (target) then
if (target == "[all]") then
actor.targets:SortByKey ("total")
for _, target_object in _ipairs (actor.targets._ActorTable) do
GameCooltip:AddLine (target_object.nome, FormatTooltipNumber (_, target_object.total))
SortOrder (actor.targets, target_func)
for i = 1, #temp_table do
local t = temp_table [i]
if (t[2] < 1) then
break
end
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\FriendsFrame\StatusIcon-Offline]], 1, 1, 14, 14)
end
elseif (target == "[raid]") then
local roster = combat.raid_roster
actor.targets:SortByKey ("total")
for _, target_object in _ipairs (actor.targets._ActorTable) do
if (roster [target_object.nome]) then
GameCooltip:AddLine (target_object.nome, FormatTooltipNumber (_, target_object.total))
SortOrder (actor.targets, target_func)
for i = 1, #temp_table do
local t = temp_table [i]
if (t[2] < 1) then
break
end
if (roster [t[1]]) then
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
end
end
elseif (target == "[player]") then
local targetactor = actor.targets._NameIndexTable [_detalhes.playername]
if (targetactor) then
targetactor = actor.targets._ActorTable [targetactor]
GameCooltip:AddLine (targetactor.nome, FormatTooltipNumber (_, targetactor.total))
local target_amount = actor.targets [_detalhes.playername]
if (target_amount) then
GameCooltip:AddLine (targetactor.nome, FormatTooltipNumber (_, target_amount))
end
else
local spells_used = {}
SortOrder (actor.spells._ActorTable, spells_used_func, target)
for i = 1, #temp_table do
for spellid, spelltable in _pairs (actor.spell_tables._ActorTable) do
local this_target = spelltable.targets._NameIndexTable [target]
if (this_target) then
this_target = spelltable.targets._ActorTable [this_target]
_table_insert (spells_used, {spellid, this_target.total})
local t = temp_table [i]
if (t[2] < 1) then
break
end
end
_table_sort (spells_used, _detalhes.Sort2)
for index, spell in _ipairs (spells_used) do
local name, _, icon = _GetSpellInfo (spell [1])
GameCooltip:AddLine (name, FormatTooltipNumber (_, spell [2]))
local name, _, icon = _GetSpellInfo (t[1])
GameCooltip:AddLine (name, FormatTooltipNumber (_, t[2]))
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
--local targetactor = actor.targets._NameIndexTable [target]
--if (targetactor) then
-- targetactor = actor.targets._ActorTable [targetactor]
-- GameCooltip:AddLine (target, FormatTooltipNumber (_, targetactor.total))
--end
end
else
@@ -144,22 +197,25 @@
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> damage done search
--> damagedone search
function atributo_custom:damagedone (actor, source, target, spellid, combat, instance_container)
if (spellid) then --> spell is always damage done
local spell = actor.spell_tables._ActorTable [spellid]
if (spellid) then --> spell is always damagedone
local spell = actor.spells._ActorTable [spellid]
if (spell) then
if (target) then
if (target == "[all]") then
for _, targetactor in _ipairs (spell.targets._ActorTable) do
for target_name, amount in _pairs (spell.targets) do
--> add amount
instance_container:AddValue (targetactor, targetactor.total, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
--> we need to pass a object here in order to get name and class, so we just get the main damage actor from the combat
instance_container:AddValue (combat (1, target_name), amount, true)
--
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
if (not atributo_custom._TargetActorsProcessed [target_name]) then
atributo_custom._TargetActorsProcessed [target_name] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
@@ -167,14 +223,14 @@
elseif (target == "[raid]") then
local roster = combat.raid_roster
for _, targetactor in _ipairs (spell.targets._ActorTable) do
if (roster [targetactor.nome]) then
for target_name, amount in _pairs (spell.targets) do
if (roster [target_name]) then
--> add amount
instance_container:AddValue (targetactor, targetactor.total, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
instance_container:AddValue (combat (1, target_name), amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
if (not atributo_custom._TargetActorsProcessed [target_name]) then
atributo_custom._TargetActorsProcessed [target_name] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
@@ -182,30 +238,28 @@
return 0, true
elseif (target == "[player]") then
local targetactor = spell.targets._NameIndexTable [_detalhes.playername]
if (targetactor) then
targetactor = spell.targets._ActorTable [targetactor]
local target_amount = spell.targets [_detalhes.playername]
if (target_amount) then
--> add amount
instance_container:AddValue (targetactor, targetactor.total, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
instance_container:AddValue (combat (1, _detalhes.playername), target_amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
if (not atributo_custom._TargetActorsProcessed [_detalhes.playername]) then
atributo_custom._TargetActorsProcessed [_detalhes.playername] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
return 0, true
else
local targetactor = actor.targets._NameIndexTable [target]
if (targetactor) then
targetactor = spell.targets._ActorTable [targetactor]
local target_amount = actor.targets [target]
if (target_amount) then
--> add amount
instance_container:AddValue (targetactor, targetactor.total, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
instance_container:AddValue (combat (1, target), target_amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
if (not atributo_custom._TargetActorsProcessed [target]) then
atributo_custom._TargetActorsProcessed [target] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
@@ -221,26 +275,27 @@
elseif (target) then
if (target == "[all]") then
return actor.targets:GetTotal()
local total = 0
for target_name, amount in _pairs (actor.targets) do
total = total + amount
end
return total
elseif (target == "[raid]") then
return actor.targets:GetTotalOnRaid (nil, combat)
local total = 0
for target_name, amount in _pairs (actor.targets) do
if (combat.raid_roster [target_name]) then
total = total + amount
end
end
return total
elseif (target == "[player]") then
local targetactor = actor.targets._NameIndexTable [_detalhes.playername]
if (targetactor) then
return actor.targets._ActorTable [targetactor].total
else
return 0
end
return actor.targets [_detalhes.playername] or 0
else
local targetactor = actor.targets._NameIndexTable [target]
if (targetactor) then
return actor.targets._ActorTable [targetactor].total
else
return 0
end
return actor.targets [targetactor] or 0
end
else
return actor.total or 0
+135 -61
View File
@@ -49,9 +49,60 @@
TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
end
local temp_table = {}
local target_func = function (main_table)
local i = 1
for name, amount in _pairs (main_table) do
local t = temp_table [i]
if (not t) then
t = {"", 0}
temp_table [i] = t
end
t[1] = name
t[2] = amount
i = i + 1
end
end
local spells_used_func = function (main_table, target)
local i = 1
for spellid, spell_table in _pairs (main_table) do
local target_amount = spell_table.targets [target]
if (target_amount) then
local t = temp_table [i]
if (not t) then
t = {"", 0}
temp_table [i] = t
end
t[1] = spellid
t[2] = target_amount
i = i + 1
end
end
end
local function SortOrder (main_table, func, ...)
for i = 1, #temp_table do
temp_table [i][1] = ""
temp_table [i][2] = 0
end
func (main_table, ...)
_table_sort (temp_table, _detalhes.Sort2)
return temp_table
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> healing done tooltip
function atributo_custom:healdoneTooltip (actor, target, spellid, combat, instance)
if (spellid) then
@@ -64,12 +115,11 @@
for name, _ in _pairs (this_actor.healing_from) do
local healer = combat (2, name)
if (healer) then
local spell = healer.spell_tables._ActorTable [spellid]
local spell = healer.spells._ActorTable [spellid]
if (spell) then
local on_me = spell.targets._NameIndexTable [targetname]
local on_me = spell.targets [targetname]
if (on_me) then
on_me = spell.targets._ActorTable [on_me]
GameCooltip:AddLine (healer.nome, FormatTooltipNumber (_, on_me.total))
GameCooltip:AddLine (healer.nome, FormatTooltipNumber (_, on_me))
end
end
end
@@ -90,38 +140,61 @@
elseif (target) then
if (target == "[all]") then
actor.targets:SortByKey ("total")
for _, target_object in _ipairs (actor.targets._ActorTable) do
GameCooltip:AddLine (target_object.nome, FormatTooltipNumber (_, target_object.total))
SortOrder (actor.targets, target_func)
for i = 1, #temp_table do
local t = temp_table [i]
if (t[2] < 1) then
break
end
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\FriendsFrame\StatusIcon-Offline]], 1, 1, 14, 14)
end
elseif (target == "[raid]") then
local roster = combat.raid_roster
actor.targets:SortByKey ("total")
for _, target_object in _ipairs (actor.targets._ActorTable) do
if (roster [target_object.nome]) then
GameCooltip:AddLine (target_object.nome, FormatTooltipNumber (_, target_object.total))
SortOrder (actor.targets, target_func)
for i = 1, #temp_table do
local t = temp_table [i]
if (t[2] < 1) then
break
end
if (roster [t[1]]) then
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
end
end
elseif (target == "[player]") then
local targetactor = actor.targets._NameIndexTable [_detalhes.playername]
if (targetactor) then
targetactor = actor.targets._ActorTable [targetactor]
GameCooltip:AddLine (targetactor.nome, FormatTooltipNumber (_, targetactor.total))
local target_amount = actor.targets [_detalhes.playername]
if (target_amount) then
GameCooltip:AddLine (targetactor.nome, FormatTooltipNumber (_, target_amount))
end
else
local targetactor = actor.targets._NameIndexTable [target]
if (targetactor) then
targetactor = actor.targets._ActorTable [targetactor]
GameCooltip:AddLine (target, FormatTooltipNumber (_, targetactor.total))
SortOrder (actor.spells._ActorTable, spells_used_func, target)
for i = 1, #temp_table do
local t = temp_table [i]
if (t[2] < 1) then
break
end
local name, _, icon = _GetSpellInfo (t[1])
GameCooltip:AddLine (name, FormatTooltipNumber (_, t[2]))
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
end
else
actor:ToolTip_DamageDone (instance)
actor:ToolTip_HealingDone (instance)
end
end
@@ -131,18 +204,21 @@
function atributo_custom:healdone (actor, source, target, spellid, combat, instance_container)
if (spellid) then --> spell is always healing done
local spell = actor.spell_tables._ActorTable [spellid]
local melee = actor.spell_tables._ActorTable [1]
local spell = actor.spells._ActorTable [spellid]
local melee = actor.spells._ActorTable [1]
if (spell) then
if (target) then
if (target == "[all]") then
for _, targetactor in _ipairs (spell.targets._ActorTable) do
for target_name, amount in _pairs (spell.targets) do
--> add amount
instance_container:AddValue (targetactor, targetactor.total, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
--> we need to pass a object here in order to get name and class, so we just get the main heal actor from the combat
instance_container:AddValue (combat (1, target_name), amount, true)
--
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
if (not atributo_custom._TargetActorsProcessed [target_name]) then
atributo_custom._TargetActorsProcessed [target_name] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
@@ -150,14 +226,14 @@
elseif (target == "[raid]") then
local roster = combat.raid_roster
for _, targetactor in _ipairs (spell.targets._ActorTable) do
if (roster [targetactor.nome]) then
for target_name, amount in _pairs (spell.targets) do
if (roster [target_name]) then
--> add amount
instance_container:AddValue (targetactor, targetactor.total, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
instance_container:AddValue (combat (1, target_name), amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
if (not atributo_custom._TargetActorsProcessed [target_name]) then
atributo_custom._TargetActorsProcessed [target_name] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
@@ -165,30 +241,28 @@
return 0, true
elseif (target == "[player]") then
local targetactor = spell.targets._NameIndexTable [_detalhes.playername]
if (targetactor) then
targetactor = spell.targets._ActorTable [targetactor]
local target_amount = spell.targets [_detalhes.playername]
if (target_amount) then
--> add amount
instance_container:AddValue (targetactor, targetactor.total, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
instance_container:AddValue (combat (1, _detalhes.playername), target_amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
if (not atributo_custom._TargetActorsProcessed [_detalhes.playername]) then
atributo_custom._TargetActorsProcessed [_detalhes.playername] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
return 0, true
else
local targetactor = actor.targets._NameIndexTable [target]
if (targetactor) then
targetactor = spell.targets._ActorTable [targetactor]
local target_amount = actor.targets [target]
if (target_amount) then
--> add amount
instance_container:AddValue (targetactor, targetactor.total, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
instance_container:AddValue (combat (1, target), target_amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
if (not atributo_custom._TargetActorsProcessed [target]) then
atributo_custom._TargetActorsProcessed [target] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
@@ -204,26 +278,26 @@
elseif (target) then
if (target == "[all]") then
return actor.targets:GetTotal()
local total = 0
for target_name, amount in _pairs (actor.targets) do
total = total + amount
end
return total
elseif (target == "[raid]") then
return actor.targets:GetTotalOnRaid (nil, combat)
local total = 0
for target_name, amount in _pairs (actor.targets) do
if (combat.raid_roster [target_name]) then
total = total + amount
end
end
return total
elseif (target == "[player]") then
local targetactor = actor.targets._NameIndexTable [_detalhes.playername]
if (targetactor) then
return actor.targets._ActorTable [targetactor].total
else
return 0
end
return actor.targets [_detalhes.playername] or 0
else
local targetactor = actor.targets._NameIndexTable [target]
if (targetactor) then
return actor.targets._ActorTable [targetactor].total
else
return 0
end
return actor.targets [targetactor] or 0
end
else
return actor.total or 0