Merging Seal of Command on Wrath classic

This commit is contained in:
Tercio Jose
2022-10-10 16:51:56 -03:00
parent 1ed29008aa
commit 69899679e7
63 changed files with 1655 additions and 1638 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
local ipairs = ipairs -- lua local
local _pairs = pairs -- lua local
local pairs = pairs -- lua local
local _bit_band = bit.band -- lua local
local _date = date -- lua local
local tremove = table.remove -- lua local
+6 -6
View File
@@ -12,11 +12,11 @@
local _cstr = string.format --lua local
local _math_floor = math.floor --lua local
local _table_sort = table.sort --lua local
local _table_insert = table.insert --lua local
local tinsert = table.insert --lua local
local _table_size = table.getn --lua local
local _setmetatable = setmetatable --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local pairs = pairs --lua local
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
@@ -26,9 +26,9 @@
local _pcall = pcall -- lua local
local _GetSpellInfo = _detalhes.getspellinfo -- api local
local _IsInRaid = IsInRaid -- api local
local _IsInGroup = IsInGroup -- api local
local _GetNumGroupMembers = GetNumGroupMembers -- api local
local IsInRaid = IsInRaid -- api local
local IsInGroup = IsInGroup -- api local
local GetNumGroupMembers = GetNumGroupMembers -- api local
local _GetNumPartyMembers = GetNumPartyMembers or GetNumSubgroupMembers -- api local
local _GetNumRaidMembers = GetNumRaidMembers or GetNumGroupMembers -- api local
local _GetUnitName = GetUnitName -- api local
@@ -394,7 +394,7 @@
local use_total_bar = false
if (instance.total_bar.enabled) then
use_total_bar = true
if (instance.total_bar.only_in_group and (not _IsInGroup() and not _IsInRaid())) then
if (instance.total_bar.only_in_group and (not IsInGroup() and not IsInRaid())) then
use_total_bar = false
end
end
+86 -86
View File
@@ -12,12 +12,12 @@
local format = string.format --lua local
local _math_floor = math.floor --lua local
local _table_sort = table.sort --lua local
local _table_insert = table.insert --lua local
local tinsert = table.insert --lua local
local _table_size = table.getn --lua local
local _setmetatable = setmetatable --lua local
local _getmetatable = getmetatable --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local pairs = pairs --lua local
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
@@ -26,8 +26,8 @@
local unpack = unpack --lua local
local type = type --lua local
local GameTooltip = GameTooltip --api local
local _IsInRaid = IsInRaid --api local
local _IsInGroup = IsInGroup --api local
local IsInRaid = IsInRaid --api local
local IsInGroup = IsInGroup --api local
local GetSpellInfo = GetSpellInfo --api local
local _GetSpellInfo = Details.getspellinfo --details api
@@ -1038,7 +1038,7 @@ end
local total_damage_taken = frag_actor.damage_taken
local total = 0
for aggressor, _ in _pairs(took_damage_from) do
for aggressor, _ in pairs(took_damage_from) do
local damager_actor = damage_container._ActorTable [damage_container._NameIndexTable [ aggressor ]]
@@ -1423,7 +1423,7 @@ end
local container = actor.debuff_uptime_targets
for target_name, debuff_table in _pairs(container) do
for target_name, debuff_table in pairs(container) do
if (alvos) then
local damage_alvo = alvos [target_name]
if (damage_alvo) then
@@ -1444,7 +1444,7 @@ end
end
local i = 1
for target_name, debuff_table in _pairs(container) do
for target_name, debuff_table in pairs(container) do
local t = tooltip_void_zone_temp [i]
if (not t) then
t = {}
@@ -1469,7 +1469,7 @@ end
Details:AddTooltipHeaderStatusbar (1, 1, 1, 0.5)
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, Details.tooltip_key_size_width, Details.tooltip_key_size_height, 0, 1, 0, 0.640625, Details.tooltip_key_overlay2)
--for target_name, debuff_table in _pairs(container) do
--for target_name, debuff_table in pairs(container) do
local first = tooltip_void_zone_temp [1] and tooltip_void_zone_temp [1][3]
if (type(first) == "table") then
first = first.damage
@@ -1729,7 +1729,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
local frags_total_kills = 0
local index = 0
for fragName, fragAmount in _pairs(frags) do
for fragName, fragAmount in pairs(frags) do
index = index + 1
@@ -1965,7 +1965,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
--fix spell, sometimes there is two spells with the same name, one is the cast and other is the debuff
if (spell.total == 0 and not actor.damage_spellid_fixed) then
local curname = _GetSpellInfo(actor.damage_spellid)
for spellid, spelltable in _pairs(twin_damage_actor.spells._ActorTable) do
for spellid, spelltable in pairs(twin_damage_actor.spells._ActorTable) do
if (spelltable.total > spell.total) then
local name = _GetSpellInfo(spellid)
if (name == curname) then
@@ -1984,7 +1984,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
--fix spell, if the spellid passed for debuff uptime is actully the spell id of a ability and not if the aura it self
actor.damage_spellid_fixed = true
local found = false
for spellid, spelltable in _pairs(twin_damage_actor.spells._ActorTable) do
for spellid, spelltable in pairs(twin_damage_actor.spells._ActorTable) do
local name = _GetSpellInfo(spellid)
if (actor.damage_twin:find (name)) then
actor.damage = spelltable.total
@@ -2231,7 +2231,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
if (instancia.total_bar.enabled) then
useTotalBar = true
if (instancia.total_bar.only_in_group and (not _IsInGroup() and not _IsInRaid())) then
if (instancia.total_bar.only_in_group and (not IsInGroup() and not IsInRaid())) then
useTotalBar = false
end
@@ -3186,7 +3186,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
end
--add actor spells
for _spellid, _skill in _pairs(ActorSkillsContainer) do
for _spellid, _skill in pairs(ActorSkillsContainer) do
ActorSkillsSortTable [#ActorSkillsSortTable+1] = {_spellid, _skill.total, _skill.total/meu_tempo}
if (_skill.isReflection) then
reflectionSpells[#reflectionSpells+1] = _skill
@@ -3197,7 +3197,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
for petIndex, petName in ipairs(self:Pets()) do
local petActor = instancia.showing[class_type]:PegarCombatente (nil, petName)
if (petActor) then
for _spellid, _skill in _pairs(petActor:GetActorSpells()) do
for _spellid, _skill in pairs(petActor:GetActorSpells()) do
ActorSkillsSortTable [#ActorSkillsSortTable+1] = {_spellid, _skill.total, _skill.total/meu_tempo, petName:gsub ((" <.*"), "")}
end
end
@@ -3210,7 +3210,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
local ActorTargetsSortTable = {}
--add
for target_name, amount in _pairs(self.targets) do
for target_name, amount in pairs(self.targets) do
ActorTargetsSortTable [#ActorTargetsSortTable+1] = {target_name, amount}
end
--sort
@@ -3364,17 +3364,17 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
end
totais [#totais+1] = {nome, my_self.total_without_pet, my_self.total_without_pet/meu_tempo}
for spellid, tabela in _pairs(tabela) do
for spellid, tabela in pairs(tabela) do
local nome, rank, icone = _GetSpellInfo(spellid)
_table_insert (meus_danos, {spellid, tabela.total, tabela.total/meu_total*100, {nome, rank, icone}})
tinsert (meus_danos, {spellid, tabela.total, tabela.total/meu_total*100, {nome, rank, icone}})
end
_table_sort(meus_danos, Details.Sort2)
danos [nome] = meus_danos
local meus_inimigos = {}
tabela = my_self.targets
for target_name, amount in _pairs(tabela) do
_table_insert (meus_inimigos, {target_name, amount, amount/meu_total*100})
for target_name, amount in pairs(tabela) do
tinsert (meus_inimigos, {target_name, amount, amount/meu_total*100})
end
_table_sort(meus_inimigos,Details.Sort2)
alvos [nome] = meus_inimigos
@@ -3690,7 +3690,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
else
--aggressors
for nome, _ in _pairs(agressores) do --who damaged the player
for nome, _ in pairs(agressores) do --who damaged the player
--get the aggressor
local este_agressor = showing._ActorTable [showing._NameIndexTable [nome]]
if (este_agressor) then --checagem por causa do total e do garbage collector que no limpa os nomes que deram dano
@@ -3775,7 +3775,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
local all_spells = {}
for spellid, spell in _pairs(aggressor.spells._ActorTable) do
for spellid, spell in pairs(aggressor.spells._ActorTable) do
local on_target = spell.targets [self.nome]
if (on_target) then
tinsert(all_spells, {spellid, on_target, aggressor.nome})
@@ -3785,7 +3785,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
--friendly fire
local friendlyFire = aggressor.friendlyfire [self.nome]
if (friendlyFire) then
for spellid, amount in _pairs(friendlyFire.spells) do
for spellid, amount in pairs(friendlyFire.spells) do
tinsert(all_spells, {spellid, amount, aggressor.nome})
end
end
@@ -3865,11 +3865,11 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra, keydown
local DamagedPlayers = {}
local Skills = {}
for target_name, ff_table in _pairs(FriendlyFire) do
for target_name, ff_table in pairs(FriendlyFire) do
local actor = combat (1, target_name)
if (actor) then
DamagedPlayers [#DamagedPlayers+1] = {target_name, ff_table.total, actor.classe}
for spellid, amount in _pairs(ff_table.spells) do
for spellid, amount in pairs(ff_table.spells) do
Skills [spellid] = (Skills [spellid] or 0) + amount
end
end
@@ -3937,7 +3937,7 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra, keydown
--spells usadas no friendly fire
local SpellsInOrder = {}
for spellID, amount in _pairs(Skills) do
for spellID, amount in pairs(Skills) do
SpellsInOrder [#SpellsInOrder+1] = {spellID, amount}
end
_table_sort(SpellsInOrder, Details.Sort2)
@@ -3999,13 +3999,13 @@ function atributo_damage:MontaInfoFriendlyFire()
local DamagedPlayers = {}
local Skills = {}
for target_name, ff_table in _pairs(self.friendlyfire) do
for target_name, ff_table in pairs(self.friendlyfire) do
local actor = combat (1, target_name)
if (actor) then
_table_insert (DamagedPlayers, {target_name, ff_table.total, ff_table.total / FriendlyFireTotal * 100, actor.classe})
tinsert (DamagedPlayers, {target_name, ff_table.total, ff_table.total / FriendlyFireTotal * 100, actor.classe})
for spellid, amount in _pairs(ff_table.spells) do
for spellid, amount in pairs(ff_table.spells) do
Skills [spellid] = (Skills [spellid] or 0) + amount
end
end
@@ -4084,7 +4084,7 @@ function atributo_damage:MontaInfoFriendlyFire()
end
local SkillTable = {}
for spellid, amt in _pairs(Skills) do
for spellid, amt in pairs(Skills) do
local nome, _, icone = _GetSpellInfo(spellid)
SkillTable [#SkillTable+1] = {nome, amt, amt/FriendlyFireTotal*100, icone}
end
@@ -4137,7 +4137,7 @@ function atributo_damage:MontaInfoDamageTaken()
local meus_agressores = {}
local este_agressor
for nome, _ in _pairs(agressores) do
for nome, _ in pairs(agressores) do
este_agressor = showing._ActorTable[showing._NameIndexTable[nome]]
if (este_agressor) then
local alvos = este_agressor.targets
@@ -4306,10 +4306,10 @@ function atributo_damage:MontaInfoDamageDone()
meu_tempo = info.instancia.showing:GetCombatTime()
end
for _spellid, _skill in _pairs(ActorSkillsContainer) do --da foreach em cada spellid do container
for _spellid, _skill in pairs(ActorSkillsContainer) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(_spellid)
if (nome) then
_table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome, icone, nil, _skill.spellschool})
tinsert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome, icone, nil, _skill.spellschool})
end
end
@@ -4347,11 +4347,11 @@ function atributo_damage:MontaInfoDamageDone()
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spells._ActorTable
for _spellid, _skill in _pairs(PetSkillsContainer) do --da foreach em cada spellid do container
for _spellid, _skill in pairs(PetSkillsContainer) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(_spellid)
--_table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " |TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:0:128:128:33:64:96:128|t|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r", icone, PetActor, _skill.spellschool})
--tinsert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " |TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:0:128:128:33:64:96:128|t|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r", icone, PetActor, _skill.spellschool})
if (nome) then
_table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor, _skill.spellschool})
tinsert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor, _skill.spellschool})
end
end
end
@@ -4411,7 +4411,7 @@ function atributo_damage:MontaInfoDamageDone()
local meus_agressores = {}
local este_agressor
for nome, _ in _pairs(agressores) do
for nome, _ in pairs(agressores) do
este_agressor = showing._ActorTable[showing._NameIndexTable[nome]]
if (este_agressor) then
local este_alvo = este_agressor.targets [self.nome]
@@ -4493,8 +4493,8 @@ function atributo_damage:MontaInfoDamageDone()
--my target container
conteudo = self.targets
for target_name, amount in _pairs(conteudo) do
_table_insert (meus_inimigos, {target_name, amount, amount/total*100})
for target_name, amount in pairs(conteudo) do
tinsert (meus_inimigos, {target_name, amount, amount/total*100})
end
--sort
@@ -4590,9 +4590,9 @@ function atributo_damage:MontaDetalhesFriendlyFire (nome, barra)
local minhas_magias = {}
for spellid, amount in _pairs(ff_table.spells) do --da foreach em cada spellid do container
for spellid, amount in pairs(ff_table.spells) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(spellid)
_table_insert (minhas_magias, {spellid, amount, amount / total * 100, nome, icone})
tinsert (minhas_magias, {spellid, amount, amount / total * 100, nome, icone})
end
_table_sort(minhas_magias, Details.Sort2)
@@ -4658,7 +4658,7 @@ function atributo_damage:MontaDetalhesEnemy (spellid, barra)
local targets = spell.targets
local target_pool = {}
for target_name, amount in _pairs(targets) do
for target_name, amount in pairs(targets) do
local classe
local this_actor = info.instancia.showing (1, target_name)
if (this_actor) then
@@ -4741,7 +4741,7 @@ function atributo_damage:MontaDetalhesDamageTaken (nome, barra)
return
end
local conteudo = este_agressor.spells._ActorTable --_pairs[] com os IDs das magias
local conteudo = este_agressor.spells._ActorTable --pairs[] com os IDs das magias
local actor = info.jogador.nome
@@ -4749,11 +4749,11 @@ function atributo_damage:MontaDetalhesDamageTaken (nome, barra)
local minhas_magias = {}
for spellid, tabela in _pairs(conteudo) do --da foreach em cada spellid do container
for spellid, tabela in pairs(conteudo) do --da foreach em cada spellid do container
local este_alvo = tabela.targets [actor]
if (este_alvo) then --esta magia deu dano no actor
local spell_nome, rank, icone = _GetSpellInfo(spellid)
_table_insert (minhas_magias, {spellid, este_alvo, este_alvo/total*100, spell_nome, icone})
tinsert (minhas_magias, {spellid, este_alvo, este_alvo/total*100, spell_nome, icone})
end
end
@@ -4941,7 +4941,7 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
if (not spell_cast and misc_actor.spell_cast) then
local spellname = GetSpellInfo(spellid)
for casted_spellid, amount in _pairs(misc_actor.spell_cast) do
for casted_spellid, amount in pairs(misc_actor.spell_cast) do
local casted_spellname = GetSpellInfo(casted_spellid)
if (casted_spellname == spellname) then
spell_cast = amount .. " (|cFFFFFF00?|r)"
@@ -5145,8 +5145,8 @@ function atributo_damage:MontaTooltipDamageTaken (thisLine, index)
local total = 0
for spellid, spell in _pairs(container) do
for target_name, amount in _pairs(spell.targets) do
for spellid, spell in pairs(container) do
for target_name, amount in pairs(spell.targets) do
if (target_name == self.nome) then
total = total + amount
habilidades [#habilidades+1] = {spellid, amount}
@@ -5185,11 +5185,11 @@ function atributo_damage:MontaTooltipAlvos (thisLine, index, instancia)
GameCooltip:SetOwner(thisLine, "bottom", "top", 4, -2)
GameCooltip:SetOption("MinWidth", _math_max (230, thisLine:GetWidth()*0.98))
for spellid, spell in _pairs(self.spells._ActorTable) do
for spellid, spell in pairs(self.spells._ActorTable) do
if (spell.isReflection) then
for target_name, amount in _pairs(spell.targets) do
for target_name, amount in pairs(spell.targets) do
if (target_name == inimigo) then
for reflectedSpellId, amount in _pairs(spell.extra) do
for reflectedSpellId, amount in pairs(spell.extra) do
local spellName, _, spellIcon = _GetSpellInfo(reflectedSpellId)
local t = habilidades [i]
if (not t) then
@@ -5203,7 +5203,7 @@ function atributo_damage:MontaTooltipAlvos (thisLine, index, instancia)
end
end
else
for target_name, amount in _pairs(spell.targets) do
for target_name, amount in pairs(spell.targets) do
if (target_name == inimigo) then
local nome, _, icone = _GetSpellInfo(spellid)
@@ -5225,10 +5225,10 @@ function atributo_damage:MontaTooltipAlvos (thisLine, index, instancia)
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spells._ActorTable
for _spellid, _skill in _pairs(PetSkillsContainer) do
for _spellid, _skill in pairs(PetSkillsContainer) do
local alvos = _skill.targets
for target_name, amount in _pairs(alvos) do
for target_name, amount in pairs(alvos) do
if (target_name == inimigo) then
local t = habilidades [i]
@@ -5393,7 +5393,7 @@ end
Details.refresh:r_atributo_damage (actor, shadow)
--copia o container de alvos (captura de dados)
for target_name, amount in _pairs(actor.targets) do
for target_name, amount in pairs(actor.targets) do
--cria e soma o valor do total
if (not shadow.targets [target_name]) then
shadow.targets [target_name] = 0
@@ -5401,19 +5401,19 @@ end
end
--copia o container de habilidades (captura de dados)
for spellid, habilidade in _pairs(actor.spells._ActorTable) do
for spellid, habilidade in pairs(actor.spells._ActorTable) do
--cria e soma o valor
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, nil, true)
--create the target value
for target_name, amount in _pairs(habilidade.targets) do
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
--create the extra value
for spellId, amount in _pairs(habilidade.extra) do
for spellId, amount in pairs(habilidade.extra) do
if (not habilidade_shadow.extra [spellId]) then
habilidade_shadow.extra [spellId] = 0
end
@@ -5422,11 +5422,11 @@ end
end
--copia o container de friendly fire (captura de dados)
for target_name, ff_table in _pairs(actor.friendlyfire) do
for target_name, ff_table in pairs(actor.friendlyfire) do
--cria ou pega a shadow
local friendlyFire_shadow = shadow.friendlyfire [target_name] or shadow:CreateFFTable (target_name)
--some as spells
for spellid, amount in _pairs(ff_table.spells) do
for spellid, amount in pairs(ff_table.spells) do
friendlyFire_shadow.spells [spellid] = 0
end
end
@@ -5511,38 +5511,38 @@ end
end
--copia o damage_from (captura de dados)
for nome, _ in _pairs(actor.damage_from) do
for nome, _ in pairs(actor.damage_from) do
shadow.damage_from [nome] = true
end
--copia o container de alvos (captura de dados)
for target_name, amount in _pairs(actor.targets) do
for target_name, amount in pairs(actor.targets) do
shadow.targets [target_name] = (shadow.targets [target_name] or 0) + amount
end
--copiar o container de raid targets
for flag, amount in _pairs(actor.raid_targets) do
for flag, amount in pairs(actor.raid_targets) do
shadow.raid_targets = shadow.raid_targets or {} --deu invalido noutro dia
shadow.raid_targets [flag] = (shadow.raid_targets [flag] or 0) + amount
end
--copia o container de habilidades (captura de dados)
for spellid, habilidade in _pairs(actor.spells._ActorTable) do
for spellid, habilidade in pairs(actor.spells._ActorTable) do
--cria e soma o valor
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, nil, true)
--refresh e soma os valores dos alvos
for target_name, amount in _pairs(habilidade.targets) do
for target_name, amount in pairs(habilidade.targets) do
habilidade_shadow.targets [target_name] = (habilidade_shadow.targets [target_name] or 0) + amount
end
--refresh and add extra values
for spellId, amount in _pairs(habilidade.extra) do
for spellId, amount in pairs(habilidade.extra) do
habilidade_shadow.extra [spellId] = (habilidade_shadow.extra [spellId] or 0) + amount
end
--soma todos os demais valores
for key, value in _pairs(habilidade) do
for key, value in pairs(habilidade) do
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
if (not habilidade_shadow [key]) then
@@ -5567,13 +5567,13 @@ end
end
--copia o container de friendly fire (captura de dados)
for target_name, ff_table in _pairs(actor.friendlyfire) do
for target_name, ff_table in pairs(actor.friendlyfire) do
--cria ou pega a shadow
local friendlyFire_shadow = shadow.friendlyfire [target_name] or shadow:CreateFFTable (target_name)
--soma o total
friendlyFire_shadow.total = friendlyFire_shadow.total + ff_table.total
--some as spells
for spellid, amount in _pairs(ff_table.spells) do
for spellid, amount in pairs(ff_table.spells) do
friendlyFire_shadow.spells [spellid] = (friendlyFire_shadow.spells [spellid] or 0) + amount
end
end
@@ -5690,7 +5690,7 @@ atributo_damage.__add = function(tabela1, tabela2)
tabela1.friendlyfire_total = tabela1.friendlyfire_total + tabela2.friendlyfire_total
--soma o damage_from
for nome, _ in _pairs(tabela2.damage_from) do
for nome, _ in pairs(tabela2.damage_from) do
tabela1.damage_from [nome] = true
end
@@ -5710,32 +5710,32 @@ atributo_damage.__add = function(tabela1, tabela2)
end
--soma os containers de alvos
for target_name, amount in _pairs(tabela2.targets) do
for target_name, amount in pairs(tabela2.targets) do
tabela1.targets [target_name] = (tabela1.targets [target_name] or 0) + amount
end
--soma o container de raid targets
for flag, amount in _pairs(tabela2.raid_targets) do
for flag, amount in pairs(tabela2.raid_targets) do
tabela1.raid_targets [flag] = (tabela1.raid_targets [flag] or 0) + amount
end
--soma o container de habilidades
for spellid, habilidade in _pairs(tabela2.spells._ActorTable) do
for spellid, habilidade in pairs(tabela2.spells._ActorTable) do
--pega a habilidade no primeiro ator
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_DAMAGE", false)
--soma os alvos
for target_name, amount in _pairs(habilidade.targets) do
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount
end
--soma os extras
for spellId, amount in _pairs(habilidade.extra) do
for spellId, amount in pairs(habilidade.extra) do
habilidade_tabela1.extra = (habilidade_tabela1.extra [spellId] or 0) + amount
end
--soma os valores da habilidade
for key, value in _pairs(habilidade) do
for key, value in pairs(habilidade) do
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
if (not habilidade_tabela1 [key]) then
@@ -5760,14 +5760,14 @@ atributo_damage.__add = function(tabela1, tabela2)
end
--soma o container de friendly fire
for target_name, ff_table in _pairs(tabela2.friendlyfire) do
for target_name, ff_table in pairs(tabela2.friendlyfire) do
--pega o ator ff no ator principal
local friendlyFire_tabela1 = tabela1.friendlyfire [target_name] or tabela1:CreateFFTable (target_name)
--soma o total
friendlyFire_tabela1.total = friendlyFire_tabela1.total + ff_table.total
--soma as habilidades
for spellid, amount in _pairs(ff_table.spells) do
for spellid, amount in pairs(ff_table.spells) do
friendlyFire_tabela1.spells [spellid] = (friendlyFire_tabela1.spells [spellid] or 0) + amount
end
end
@@ -5793,7 +5793,7 @@ atributo_damage.__sub = function(tabela1, tabela2)
tabela1.friendlyfire_total = tabela1.friendlyfire_total - tabela2.friendlyfire_total
--reduz os containers de alvos
for target_name, amount in _pairs(tabela2.targets) do
for target_name, amount in pairs(tabela2.targets) do
local alvo_tabela1 = tabela1.targets [target_name]
if (alvo_tabela1) then
tabela1.targets [target_name] = tabela1.targets [target_name] - amount
@@ -5801,19 +5801,19 @@ atributo_damage.__sub = function(tabela1, tabela2)
end
--reduz o container de raid targets
for flag, amount in _pairs(tabela2.raid_targets) do
for flag, amount in pairs(tabela2.raid_targets) do
if (tabela1.raid_targets [flag]) then
tabela1.raid_targets [flag] = _math_max (tabela1.raid_targets [flag] - amount, 0)
end
end
--reduz o container de habilidades
for spellid, habilidade in _pairs(tabela2.spells._ActorTable) do
for spellid, habilidade in pairs(tabela2.spells._ActorTable) do
--get the spell from the first actor
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_DAMAGE", false)
--subtract targets
for target_name, amount in _pairs(habilidade.targets) do
for target_name, amount in pairs(habilidade.targets) do
local alvo_tabela1 = habilidade_tabela1.targets [target_name]
if (alvo_tabela1) then
habilidade_tabela1.targets [target_name] = habilidade_tabela1.targets [target_name] - amount
@@ -5821,7 +5821,7 @@ atributo_damage.__sub = function(tabela1, tabela2)
end
--subtract extra table
for spellId, amount in _pairs(habilidade.extra) do
for spellId, amount in pairs(habilidade.extra) do
local extra_tabela1 = habilidade_tabela1.extra [spellId]
if (extra_tabela1) then
habilidade_tabela1.extra [spellId] = habilidade_tabela1.extra [spellId] - amount
@@ -5829,7 +5829,7 @@ atributo_damage.__sub = function(tabela1, tabela2)
end
--subtrai os valores da habilidade
for key, value in _pairs(habilidade) do
for key, value in pairs(habilidade) do
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
if (not habilidade_tabela1 [key]) then
@@ -5852,12 +5852,12 @@ atributo_damage.__sub = function(tabela1, tabela2)
end
--reduz o container de friendly fire
for target_name, ff_table in _pairs(tabela2.friendlyfire) do
for target_name, ff_table in pairs(tabela2.friendlyfire) do
--pega o ator ff no ator principal
local friendlyFire_tabela1 = tabela1.friendlyfire [target_name]
if (friendlyFire_tabela1) then
friendlyFire_tabela1.total = friendlyFire_tabela1.total - ff_table.total
for spellid, amount in _pairs(ff_table.spells) do
for spellid, amount in pairs(ff_table.spells) do
if (friendlyFire_tabela1.spells [spellid]) then
friendlyFire_tabela1.spells [spellid] = friendlyFire_tabela1.spells [spellid] - amount
end
@@ -5895,7 +5895,7 @@ end
local damage_done = 0
--get targets
for target_name, amount in _pairs(enemy.targets) do
for target_name, amount in pairs(enemy.targets) do
local player = combat (1, target_name)
if (player and player.grupo) then
local t = tooltip_temp_table [i]
+87 -87
View File
@@ -3,23 +3,23 @@
local _cstr = string.format
local _math_floor = math.floor
local _setmetatable = setmetatable
local _pairs = pairs
local pairs = pairs
local ipairs = ipairs
local _unpack = unpack
local type = type
local _table_sort = table.sort
local _cstr = string.format
local _table_insert = table.insert
local tinsert = table.insert
local _bit_band = bit.band
local _math_min = math.min
local _math_ceil = math.ceil
--api locals
local GetSpellInfo = GetSpellInfo
local _GetSpellInfo = _detalhes.getspellinfo
local _IsInRaid = IsInRaid
local _IsInGroup = IsInGroup
local IsInRaid = IsInRaid
local IsInGroup = IsInGroup
local _UnitName = UnitName
local _GetNumGroupMembers = GetNumGroupMembers
local GetNumGroupMembers = GetNumGroupMembers
local _string_replace = _detalhes.string.replace --details api
@@ -419,7 +419,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
if (instancia.total_bar.enabled) then
use_total_bar = true
if (instancia.total_bar.only_in_group and (not _IsInGroup() and not _IsInRaid())) then
if (instancia.total_bar.only_in_group and (not IsInGroup() and not IsInRaid())) then
use_total_bar = false
end
end
@@ -970,15 +970,15 @@ function _detalhes:CloseShields(combat)
local parser = _detalhes.parser
local GetSpellInfo = GetSpellInfo --no colocar no cache de spells
for alvo_name, spellid_table in _pairs(escudos) do
for alvo_name, spellid_table in pairs(escudos) do
local tgt = container:PegarCombatente (_, alvo_name)
if (tgt) then
for spellid, owner_table in _pairs(spellid_table) do
for spellid, owner_table in pairs(spellid_table) do
local spellname = GetSpellInfo(spellid)
for owner, amount in _pairs(owner_table) do
for owner, amount in pairs(owner_table) do
if (amount > 0) then
local obj = container:PegarCombatente (_, owner)
@@ -1045,23 +1045,23 @@ function atributo_heal:ToolTip_HealingDenied (instancia, numero, barra, keydown)
local icon_size = _detalhes.tooltip.icon_size
local icon_border = _detalhes.tooltip.icon_border_texcoord
for spellID, spell in _pairs(self.spells._ActorTable) do
for spellID, spell in pairs(self.spells._ActorTable) do
if (spell.totaldenied > 0 and spell.heal_denied) then
--my spells which denied heal
tinsert(spellList, {spell, spell.totaldenied})
--players affected
for playerName, amount in _pairs(spell.targets) do
for playerName, amount in pairs(spell.targets) do
targetList [playerName] = (targetList [playerName] or 0) + amount
end
--spells with heal denied
for spellID, amount in _pairs(spell.heal_denied) do
for spellID, amount in pairs(spell.heal_denied) do
spellsDenied [spellID] = (spellsDenied [spellID] or 0) + amount
end
--healers denied
for healerName, amount in _pairs(spell.heal_denied_healers) do
for healerName, amount in pairs(spell.heal_denied_healers) do
healersDenied [healerName] = (healersDenied [healerName] or 0) + amount
end
end
@@ -1106,7 +1106,7 @@ function atributo_heal:ToolTip_HealingDenied (instancia, numero, barra, keydown)
--Target Players
local playerSorted = {}
for playerName, amount in _pairs(targetList) do
for playerName, amount in pairs(targetList) do
tinsert(playerSorted, {playerName, amount})
end
table.sort (playerSorted, _detalhes.Sort2)
@@ -1152,7 +1152,7 @@ function atributo_heal:ToolTip_HealingDenied (instancia, numero, barra, keydown)
-- Spells Affected
local spellsSorted = {}
for spellID, amount in _pairs(spellsDenied) do
for spellID, amount in pairs(spellsDenied) do
tinsert(spellsSorted, {spellID, amount})
end
table.sort (spellsSorted, _detalhes.Sort2)
@@ -1189,7 +1189,7 @@ function atributo_heal:ToolTip_HealingDenied (instancia, numero, barra, keydown)
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
local healersSorted = {}
for healerName, amount in _pairs(healersDenied) do
for healerName, amount in pairs(healersDenied) do
tinsert(healersSorted, {healerName, amount})
end
table.sort (healersSorted, _detalhes.Sort2)
@@ -1235,7 +1235,7 @@ function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra, keydown)
local meus_curadores = {}
for nome, _ in _pairs(curadores) do --agressores seria a lista de nomes
for nome, _ in pairs(curadores) do --agressores seria a lista de nomes
local este_curador = showing._ActorTable[showing._NameIndexTable[nome]]
if (este_curador) then --checagem por causa do total e do garbage collector que no limpa os nomes que deram dano
local alvos = este_curador.targets
@@ -1337,10 +1337,10 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
local ActorTotal = self [actor_key]
--add actor spells
for _spellid, _skill in _pairs(ActorSkillsContainer) do
for _spellid, _skill in pairs(ActorSkillsContainer) do
local SkillName, _, SkillIcon = _GetSpellInfo(_spellid)
if (_skill [skill_key] > 0 or _skill.anti_heal) then
_table_insert (ActorHealingTable, {
tinsert (ActorHealingTable, {
_spellid,
_skill [skill_key],
_skill [skill_key]/ActorTotal*100,
@@ -1357,7 +1357,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
for petIndex, petName in ipairs(self:Pets()) do
local petActor = instancia.showing[class_type]:PegarCombatente (nil, petName)
if (petActor) then
for _spellid, _skill in _pairs(petActor:GetActorSpells()) do
for _spellid, _skill in pairs(petActor:GetActorSpells()) do
if (_skill [skill_key] > 0) then
local SkillName, _, SkillIcon = _GetSpellInfo(_spellid)
local petName = petName:gsub ((" <.*"), "")
@@ -1379,7 +1379,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
--TOP Curados
ActorSkillsContainer = self.targets
for target_name, amount in _pairs(ActorSkillsContainer) do
for target_name, amount in pairs(ActorSkillsContainer) do
if (amount > 0) then
--translate cyrillic alphabet to western alphabet by Vardex (https://github.com/Vardex May 22, 2019)
@@ -1387,7 +1387,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
target_name = Translit:Transliterate(target_name, "!")
end
_table_insert (ActorHealingTargets, {target_name, amount, amount / ActorTotal * 100})
tinsert (ActorHealingTargets, {target_name, amount, amount / ActorTotal * 100})
end
end
_table_sort (ActorHealingTargets, _detalhes.Sort2)
@@ -1683,7 +1683,7 @@ function atributo_heal:MontaInfoHealTaken()
local meus_curandeiros = {}
local este_curandeiro
for nome, _ in _pairs(curandeiros) do
for nome, _ in pairs(curandeiros) do
este_curandeiro = showing._ActorTable[showing._NameIndexTable[nome]]
if (este_curandeiro) then
local alvos = este_curandeiro.targets
@@ -1737,9 +1737,9 @@ function atributo_heal:MontaInfoOverHealing()
local minhas_curas = {}
local barras = info.barras1
for spellid, tabela in _pairs(tabela) do
for spellid, tabela in pairs(tabela) do
local nome, _, icone = _GetSpellInfo(spellid)
_table_insert (minhas_curas, {spellid, tabela.overheal, tabela.overheal/total*100, nome, icone})
tinsert (minhas_curas, {spellid, tabela.overheal, tabela.overheal/total*100, nome, icone})
end
--add pets
@@ -1749,9 +1749,9 @@ function atributo_heal:MontaInfoOverHealing()
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spells._ActorTable
for _spellid, _skill in _pairs(PetSkillsContainer) do --da foreach em cada spellid do container
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.overheal, _skill.overheal/total*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
tinsert (minhas_curas, {_spellid, _skill.overheal, _skill.overheal/total*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
end
end
end
@@ -1818,13 +1818,13 @@ function atributo_heal:MontaInfoOverHealing()
local jogadores_overhealed = {}
tabela = self.targets_overheal
local heal_container = instancia.showing[2]
for target_name, amount in _pairs(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, {target_name, amount, amount/total*100, classe})
tinsert (jogadores_overhealed, {target_name, amount, amount/total*100, classe})
end
_table_sort (jogadores_overhealed, _detalhes.Sort2)
@@ -1886,9 +1886,9 @@ function atributo_heal:MontaInfoHealingDone()
meu_tempo = info.instancia.showing:GetCombatTime()
end
for spellid, tabela in _pairs(tabela) do
for spellid, tabela in pairs(tabela) do
local nome, rank, icone = _GetSpellInfo(spellid)
_table_insert (minhas_curas, {
tinsert (minhas_curas, {
spellid,
tabela.total,
tabela.total/total*100,
@@ -1909,9 +1909,9 @@ function atributo_heal:MontaInfoHealingDone()
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spells._ActorTable
for _spellid, _skill in _pairs(PetSkillsContainer) do --da foreach em cada spellid do container
for _spellid, _skill in pairs(PetSkillsContainer) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(_spellid)
_table_insert (minhas_curas, {
tinsert (minhas_curas, {
_spellid,
_skill.total,
_skill.total/total*100,
@@ -1970,8 +1970,8 @@ function atributo_heal:MontaInfoHealingDone()
--TOP CURADOS
local healedTargets = {}
tabela = self.targets
for target_name, amount in _pairs(tabela) do
_table_insert (healedTargets, {target_name, amount, amount / total*100})
for target_name, amount in pairs(tabela) do
tinsert (healedTargets, {target_name, amount, amount / total*100})
end
_table_sort(healedTargets, _detalhes.Sort2)
@@ -2045,8 +2045,8 @@ function atributo_heal:MontaTooltipAlvos (thisLine, index, instancia)
GameCooltip:SetOption("MinWidth", max(230, thisLine:GetWidth()*0.98))
--add spells
for spellid, tabela in _pairs(container) do
for target_name, amount in _pairs(tabela ["targets" .. targets_key]) do
for spellid, tabela in pairs(container) do
for target_name, amount in pairs(tabela ["targets" .. targets_key]) do
if (target_name == inimigo) then
local nome, _, icone = _GetSpellInfo(spellid)
habilidades [#habilidades+1] = {nome, amount, icone}
@@ -2060,9 +2060,9 @@ function atributo_heal:MontaTooltipAlvos (thisLine, index, instancia)
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spells._ActorTable
for _spellid, _skill in _pairs(PetSkillsContainer) do
for _spellid, _skill in pairs(PetSkillsContainer) do
for target_name, amount in _pairs(_skill ["targets" .. targets_key]) do
for target_name, amount in pairs(_skill ["targets" .. targets_key]) do
if (target_name == inimigo) then
local nome, _, icone = _GetSpellInfo(_spellid)
habilidades [#habilidades+1] = {nome, amount, icone}
@@ -2150,7 +2150,7 @@ 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.spells._ActorTable --_pairs[] com os IDs das magias
local conteudo = este_curandeiro.spells._ActorTable --pairs[] com os IDs das magias
local actor = info.jogador.nome
@@ -2158,10 +2158,10 @@ function atributo_heal:MontaDetalhesHealingTaken (nome, barra)
local minhas_magias = {}
for spellid, tabela in _pairs(conteudo) do --da foreach em cada spellid do container
for spellid, tabela in pairs(conteudo) do --da foreach em cada spellid do container
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})
tinsert (minhas_magias, {spellid, tabela.targets [actor], tabela.targets [actor] / total*100, spell_nome, icone})
end
end
@@ -2278,7 +2278,7 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
if (not spell_cast and misc_actor.spell_cast) then
local spellname = GetSpellInfo(spellid)
for casted_spellid, amount in _pairs(misc_actor.spell_cast) do
for casted_spellid, amount in pairs(misc_actor.spell_cast) do
local casted_spellname = GetSpellInfo(casted_spellid)
if (casted_spellname == spellname) then
spell_cast = amount .. " (|cFFFFFF00?|r)"
@@ -2493,33 +2493,33 @@ end
_detalhes.refresh:r_atributo_heal (actor, shadow)
--copia o container de alvos (captura de dados)
for target_name, amount in _pairs(actor.targets) do
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
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
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.spells._ActorTable) do
for spellid, habilidade in pairs(actor.spells._ActorTable) do
--cria e soma o valor
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, nil, true)
--refresh e soma os valores dos alvos
for target_name, amount in _pairs(habilidade.targets) do
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
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
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
@@ -2531,12 +2531,12 @@ end
habilidade_shadow.heal_denied = habilidade_shadow.heal_denied or {}
habilidade_shadow.heal_denied_healers = habilidade_shadow.heal_denied_healers or {}
--copia
for spellID, amount in _pairs(habilidade.heal_denied) do
for spellID, amount in pairs(habilidade.heal_denied) do
if (not habilidade_shadow.heal_denied [spellID]) then
habilidade_shadow.heal_denied [spellID] = 0
end
end
for healerName, amount in _pairs(habilidade.heal_denied_healers) do
for healerName, amount in pairs(habilidade.heal_denied_healers) do
if (not habilidade_shadow.heal_denied_healers [healerName]) then
habilidade_shadow.heal_denied_healers [healerName] = 0
end
@@ -2614,12 +2614,12 @@ end
end
--copia o healing_from (captura de dados)
for nome, _ in _pairs(actor.healing_from) do
for nome, _ in pairs(actor.healing_from) do
shadow.healing_from [nome] = true
end
--copia o heal_enemy (captura de dados)
for spellid, amount in _pairs(actor.heal_enemy) do
for spellid, amount in pairs(actor.heal_enemy) do
if (shadow.heal_enemy [spellid]) then
shadow.heal_enemy [spellid] = shadow.heal_enemy [spellid] + amount
else
@@ -2628,29 +2628,29 @@ end
end
--copia o container de alvos (captura de dados)
for target_name, amount in _pairs(actor.targets) do
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
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
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.spells._ActorTable) do
for spellid, habilidade in pairs(actor.spells._ActorTable) do
--cria e soma o valor
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, nil, true)
--refresh e soma os valores dos alvos
for target_name, amount in _pairs(habilidade.targets) do
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
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
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
@@ -2660,16 +2660,16 @@ end
habilidade_shadow.heal_denied = habilidade_shadow.heal_denied or {}
habilidade_shadow.heal_denied_healers = habilidade_shadow.heal_denied_healers or {}
--copia
for spellID, amount in _pairs(habilidade.heal_denied) do
for spellID, amount in pairs(habilidade.heal_denied) do
habilidade_shadow.heal_denied [spellID] = (habilidade_shadow.heal_denied [spellID] or 0) + amount
end
for healerName, amount in _pairs(habilidade.heal_denied_healers) do
for healerName, amount in pairs(habilidade.heal_denied_healers) do
habilidade_shadow.heal_denied_healers [healerName] = (habilidade_shadow.heal_denied_healers [healerName] or 0) + amount
end
end
--soma todos os demais valores
for key, value in _pairs(habilidade) do
for key, value in pairs(habilidade) do
if (type(value) == "number") then
if (key ~= "id") then
if (not habilidade_shadow [key]) then
@@ -2725,12 +2725,12 @@ atributo_heal.__add = function(tabela1, tabela2)
tabela1.healing_taken = tabela1.healing_taken + tabela2.healing_taken
--soma o healing_from
for nome, _ in _pairs(tabela2.healing_from) do
for nome, _ in pairs(tabela2.healing_from) do
tabela1.healing_from [nome] = true
end
--somar o heal_enemy
for spellid, amount in _pairs(tabela2.heal_enemy) do
for spellid, amount in pairs(tabela2.heal_enemy) do
if (tabela1.heal_enemy [spellid]) then
tabela1.heal_enemy [spellid] = tabela1.heal_enemy [spellid] + amount
else
@@ -2739,28 +2739,28 @@ atributo_heal.__add = function(tabela1, tabela2)
end
--somar o container de alvos
for target_name, amount in _pairs(tabela2.targets) do
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
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
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.spells._ActorTable) do
for spellid, habilidade in pairs(tabela2.spells._ActorTable) do
--pega a habilidade no primeiro ator
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_HEAL", false)
--soma os alvos
for target_name, amount in _pairs(habilidade.targets) do
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
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
for target_name, amount in pairs(habilidade.targets_absorbs) do
habilidade_tabela1.targets_absorbs = (habilidade_tabela1.targets_absorbs [target_name] or 0) + amount
end
@@ -2770,16 +2770,16 @@ atributo_heal.__add = function(tabela1, tabela2)
habilidade_tabela1.heal_denied = habilidade_tabela1.heal_denied or {}
habilidade_tabela1.heal_denied_healers = habilidade_tabela1.heal_denied_healers or {}
--copia
for spellID, amount in _pairs(habilidade.heal_denied) do
for spellID, amount in pairs(habilidade.heal_denied) do
habilidade_tabela1.heal_denied [spellID] = (habilidade_tabela1.heal_denied [spellID] or 0) + amount
end
for healerName, amount in _pairs(habilidade.heal_denied_healers) do
for healerName, amount in pairs(habilidade.heal_denied_healers) do
habilidade_tabela1.heal_denied_healers [healerName] = (habilidade_tabela1.heal_denied_healers [healerName] or 0) + amount
end
end
--soma os valores da habilidade
for key, value in _pairs(habilidade) do
for key, value in pairs(habilidade) do
if (type(value) == "number") then
if (key ~= "id") then
if (not habilidade_tabela1 [key]) then
@@ -2828,7 +2828,7 @@ atributo_heal.__sub = function(tabela1, tabela2)
tabela1.healing_taken = tabela1.healing_taken - tabela2.healing_taken
--reduz o heal_enemy
for spellid, amount in _pairs(tabela2.heal_enemy) do
for spellid, amount in pairs(tabela2.heal_enemy) do
if (tabela1.heal_enemy [spellid]) then
tabela1.heal_enemy [spellid] = tabela1.heal_enemy [spellid] - amount
else
@@ -2837,38 +2837,38 @@ atributo_heal.__sub = function(tabela1, tabela2)
end
--reduz o container de alvos
for target_name, amount in _pairs(tabela2.targets) do
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
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
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.spells._ActorTable) do
for spellid, habilidade in pairs(tabela2.spells._ActorTable) do
--pega a habilidade no primeiro ator
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_HEAL", false)
--alvos
for target_name, amount in _pairs(habilidade.targets) do
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
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
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
@@ -2880,16 +2880,16 @@ atributo_heal.__sub = function(tabela1, tabela2)
habilidade_tabela1.heal_denied = habilidade_tabela1.heal_denied or {}
habilidade_tabela1.heal_denied_healers = habilidade_tabela1.heal_denied_healers or {}
--copia
for spellID, amount in _pairs(habilidade.heal_denied) do
for spellID, amount in pairs(habilidade.heal_denied) do
habilidade_tabela1.heal_denied [spellID] = (habilidade_tabela1.heal_denied [spellID] or 0) - amount
end
for healerName, amount in _pairs(habilidade.heal_denied_healers) do
for healerName, amount in pairs(habilidade.heal_denied_healers) do
habilidade_tabela1.heal_denied_healers [healerName] = (habilidade_tabela1.heal_denied_healers [healerName] or 0) - amount
end
end
--soma os valores da habilidade
for key, value in _pairs(habilidade) do
for key, value in pairs(habilidade) do
if (type(value) == "number") then
if (key ~= "id") then
if (not habilidade_tabela1 [key]) then
+10 -10
View File
@@ -4,7 +4,7 @@ local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
local type= type --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local pairs = pairs --lua local
local _math_floor = math.floor --lua local
local abs = math.abs --lua local
local _table_remove = table.remove --lua local
@@ -755,7 +755,7 @@ end
--break snaps of previous and next window
local left_instance = _detalhes:GetInstance(id-1)
if (left_instance) then
for snap_side, instance_id in _pairs(left_instance.snap) do
for snap_side, instance_id in pairs(left_instance.snap) do
if (instance_id == id) then --snap na proxima instancia
left_instance.snap [snap_side] = nil
end
@@ -763,7 +763,7 @@ end
end
local right_instance = _detalhes:GetInstance(id+1)
if (right_instance) then
for snap_side, instance_id in _pairs(right_instance.snap) do
for snap_side, instance_id in pairs(right_instance.snap) do
if (instance_id == id) then --snap na proxima instancia
right_instance.snap [snap_side] = nil
end
@@ -774,7 +774,7 @@ end
for i = id+1, #_detalhes.tabela_instancias do
local this_instance = _detalhes:GetInstance(i)
--fix the snaps
for snap_side, instance_id in _pairs(this_instance.snap) do
for snap_side, instance_id in pairs(this_instance.snap) do
if (instance_id == i+1) then --snap na proxima instancia
this_instance.snap [snap_side] = i
elseif (instance_id == i-1 and i-2 > 0) then --snap na instancia anterior
@@ -944,7 +944,7 @@ function _detalhes:BaseFrameSnap()
end
local my_baseframe = self.baseframe
for lado, snap_to in _pairs(self.snap) do
for lado, snap_to in pairs(self.snap) do
local instancia_alvo = _detalhes.tabela_instancias [snap_to]
if (instancia_alvo) then
@@ -982,7 +982,7 @@ function _detalhes:BaseFrameSnap()
local inicio_retro = self.meu_id - 1
for meu_id = inicio_retro, 1, -1 do
local instancia = _detalhes.tabela_instancias [meu_id]
for lado, snap_to in _pairs(instancia.snap) do
for lado, snap_to in pairs(instancia.snap) do
if (snap_to < instancia.meu_id and snap_to ~= self.meu_id) then --se o lado que esta grudado for menor que o meu id... EX instnacia #2 grudada na #1
--ento tenho que pegar a instncia do snap
@@ -1036,7 +1036,7 @@ function _detalhes:BaseFrameSnap()
for meu_id, instancia in ipairs(_detalhes.tabela_instancias) do
if (meu_id > self.meu_id) then
for lado, snap_to in _pairs(instancia.snap) do
for lado, snap_to in pairs(instancia.snap) do
if (snap_to > instancia.meu_id and snap_to ~= self.meu_id) then
local instancia_alvo = _detalhes.tabela_instancias [snap_to]
@@ -1075,7 +1075,7 @@ function _detalhes:agrupar_janelas(lados)
local instancia = self
for lado, esta_instancia in _pairs(lados) do
for lado, esta_instancia in pairs(lados) do
if (esta_instancia) then
instancia.baseframe:ClearAllPoints()
esta_instancia = _detalhes.tabela_instancias [esta_instancia]
@@ -1206,7 +1206,7 @@ function _detalhes:Desagrupar (instancia, lado, lado2)
local ID = instancia.meu_id
for id, esta_instancia in ipairs(_detalhes.tabela_instancias) do
for index, iid in _pairs(esta_instancia.snap) do -- index = 1 left , 3 right, 2 bottom, 4 top
for index, iid in pairs(esta_instancia.snap) do -- index = 1 left , 3 right, 2 bottom, 4 top
if (iid and (iid == ID or id == ID)) then -- iid = instancia.meu_id
esta_instancia.snap [index] = nil
@@ -3005,7 +3005,7 @@ function _detalhes:FormatReportLines (report_table, data, f1, f2, f3)
f3 = f3 or default_format_value3
if (not _detalhes.fontstring_len) then
_detalhes.fontstring_len = _detalhes.listener:CreateFontString (nil, "background", "GameFontNormal")
_detalhes.fontstring_len = _detalhes.listener:CreateFontString(nil, "background", "GameFontNormal")
end
local _, fontSize = FCF_GetChatWindowInfo (1)
if (fontSize < 1) then
+22 -22
View File
@@ -3,10 +3,10 @@
local _cstr = string.format
local _math_floor = math.floor
local _table_sort = table.sort
local _table_insert = table.insert
local tinsert = table.insert
local _setmetatable = setmetatable
local ipairs = ipairs
local _pairs = pairs
local pairs = pairs
local _rawget= rawget
local _math_min = math.min
local _math_max = math.max
@@ -16,8 +16,8 @@ local type = type
--api locals
local _GetSpellInfo = _detalhes.getspellinfo
local GameTooltip = GameTooltip
local _IsInRaid = IsInRaid
local _IsInGroup = IsInGroup
local IsInRaid = IsInRaid
local IsInGroup = IsInGroup
local _string_replace = _detalhes.string.replace --details api
@@ -507,7 +507,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
if (instancia.total_bar.enabled) then
use_total_bar = true
if (instancia.total_bar.only_in_group and (not _IsInGroup() and not _IsInRaid())) then
if (instancia.total_bar.only_in_group and (not IsInGroup() and not IsInRaid())) then
use_total_bar = false
end
end
@@ -839,7 +839,7 @@ local reset_tooltips_table = function()
t[1], t[2], t[3] = "", 0, ""
end
for k, v in _pairs(energy_tooltips_hash) do
for k, v in pairs(energy_tooltips_hash) do
energy_tooltips_hash [k] = nil
end
end
@@ -867,7 +867,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
for index, actor in ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
for spellid, spell in _pairs(actor.spells._ActorTable) do
for spellid, spell in pairs(actor.spells._ActorTable) do
local on_self = spell.targets [name]
if (on_self) then
local already_tracked = energy_tooltips_hash [spellid]
@@ -1001,7 +1001,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
--player generators
local allGeneratorSpells = {}
local allGenerated = 0
for spellid, spellObject in _pairs(self.spells._ActorTable) do
for spellid, spellObject in pairs(self.spells._ActorTable) do
tinsert(allGeneratorSpells, {spellObject, spellObject.total, spellObject.totalover})
allGenerated = allGenerated + spellObject.total
end
@@ -1069,7 +1069,7 @@ function atributo_energy:MontaInfoRegenRecebido()
for index, actor in ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
for spellid, spell in _pairs(actor.spells._ActorTable) do
for spellid, spell in pairs(actor.spells._ActorTable) do
local on_self = spell.targets [my_name]
if (on_self) then
@@ -1320,7 +1320,7 @@ function atributo_energy:MontaTooltipAlvos (esta_barra, index)
--spells:
local i = 1
for spellid, spell in _pairs(actor.spells._ActorTable) do
for spellid, spell in pairs(actor.spells._ActorTable) do
local on_self = spell.targets [my_name]
if (on_self) then
local t = energy_tooltips_table [i]
@@ -1423,15 +1423,15 @@ end
end
--targets
for target_name, amount in _pairs(actor.targets) do
for target_name, amount in pairs(actor.targets) do
shadow.targets [target_name] = 0
end
--spells
for spellid, habilidade in _pairs(actor.spells._ActorTable) do
for spellid, habilidade in pairs(actor.spells._ActorTable) do
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
--spell targets
for target_name, amount in _pairs(habilidade.targets) do
for target_name, amount in pairs(habilidade.targets) do
habilidade_shadow.targets [target_name] = 0
end
end
@@ -1496,12 +1496,12 @@ end
end
--targets
for target_name, amount in _pairs(actor.targets) do
for target_name, amount in pairs(actor.targets) do
shadow.targets [target_name] = (shadow.targets [target_name] or 0) + amount
end
--spells
for spellid, habilidade in _pairs(actor.spells._ActorTable) do
for spellid, habilidade in pairs(actor.spells._ActorTable) do
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
@@ -1509,7 +1509,7 @@ end
habilidade_shadow.counter = habilidade_shadow.counter + habilidade.counter
--spell targets
for target_name, amount in _pairs(habilidade.targets) do
for target_name, amount in pairs(habilidade.targets) do
habilidade_shadow.targets [target_name] = (habilidade_shadow.targets [target_name] or 0) + amount
end
@@ -1558,12 +1558,12 @@ atributo_energy.__add = function(tabela1, tabela2)
tabela1.alternatepower = tabela1.alternatepower + tabela2.alternatepower
--targets
for target_name, amount in _pairs(tabela2.targets) do
for target_name, amount in pairs(tabela2.targets) do
tabela1.targets [target_name] = (tabela1.targets [target_name] or 0) + amount
end
--spells
for spellid, habilidade in _pairs(tabela2.spells._ActorTable) do
for spellid, habilidade in pairs(tabela2.spells._ActorTable) do
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
@@ -1571,7 +1571,7 @@ atributo_energy.__add = function(tabela1, tabela2)
habilidade_tabela1.counter = habilidade_tabela1.counter + habilidade.counter
--spell targets
for target_name, amount in _pairs(habilidade.targets) do
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount
end
@@ -1596,14 +1596,14 @@ atributo_energy.__sub = function(tabela1, tabela2)
tabela1.alternatepower = tabela1.alternatepower - tabela2.alternatepower
--targets
for target_name, amount in _pairs(tabela2.targets) do
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
--spells
for spellid, habilidade in _pairs(tabela2.spells._ActorTable) do
for spellid, habilidade in pairs(tabela2.spells._ActorTable) do
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
@@ -1611,7 +1611,7 @@ atributo_energy.__sub = function(tabela1, tabela2)
habilidade_tabela1.counter = habilidade_tabela1.counter - habilidade.counter
--spell targets
for target_name, amount in _pairs(habilidade.targets) do
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
+2 -2
View File
@@ -6,7 +6,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
local ipairs = ipairs--lua local
local _pairs = pairs--lua local
local pairs = pairs--lua local
local _UnitAura = UnitAura--api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -168,7 +168,7 @@
else
for BuffName, _ in _pairs(_detalhes.Buffs.BuffsTable) do
for BuffName, _ in pairs(_detalhes.Buffs.BuffsTable) do
local name = _UnitAura ("player", BuffName)
if (name ~= nil) then
local buff_info = SpellBuffDetails [name] or {["counter"] = 0, ["total"] = 0, ["critico"] = 0, ["critico_dano"] = 0}
+28 -28
View File
@@ -1,7 +1,7 @@
--lua locals
local _cstr = string.format
local _math_floor = math.floor
local _table_insert = table.insert
local tinsert = table.insert
local _table_size = table.getn
local ipairs = ipairs
local pairs = pairs
@@ -15,12 +15,12 @@ local type = type
--api locals
local _GetSpellInfo = _detalhes.getspellinfo
local GameTooltip = GameTooltip
local _IsInRaid = IsInRaid
local _IsInGroup = IsInGroup
local _GetNumGroupMembers = GetNumGroupMembers
local IsInRaid = IsInRaid
local IsInGroup = IsInGroup
local GetNumGroupMembers = GetNumGroupMembers
local _GetNumSubgroupMembers = GetNumSubgroupMembers
local _UnitAura = UnitAura
local _UnitGUID = UnitGUID
local UnitGUID = UnitGUID
local _UnitName = UnitName
local format = _G.format
@@ -406,7 +406,7 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
do
if (not _detalhes.fontstring_len) then
_detalhes.fontstring_len = _detalhes.listener:CreateFontString (nil, "background", "GameFontNormal")
_detalhes.fontstring_len = _detalhes.listener:CreateFontString(nil, "background", "GameFontNormal")
end
local _, fontSize = FCF_GetChatWindowInfo (1)
if (fontSize < 1) then
@@ -1328,14 +1328,14 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
local cacheGetTime = GetTime()
if (_IsInRaid()) then
if (IsInRaid()) then
local checked = {}
for raidIndex = 1, _GetNumGroupMembers() do
for raidIndex = 1, GetNumGroupMembers() do
local target = "raid"..raidIndex.."target"
local his_target = _UnitGUID(target)
local his_target = UnitGUID(target)
if (his_target and not checked [his_target]) then
local rect = UnitReaction (target, "player")
@@ -1346,7 +1346,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
for debuffIndex = 1, 41 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff (target, debuffIndex)
if (name and unitCaster) then
local playerGUID = _UnitGUID(unitCaster)
local playerGUID = UnitGUID(unitCaster)
if (playerGUID) then
local playerName, realmName = _UnitName (unitCaster)
@@ -1362,12 +1362,12 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
end
end
elseif (_IsInGroup()) then
elseif (IsInGroup()) then
local checked = {}
for raidIndex = 1, _GetNumGroupMembers()-1 do
local his_target = _UnitGUID("party"..raidIndex.."target")
for raidIndex = 1, GetNumGroupMembers()-1 do
local his_target = UnitGUID("party"..raidIndex.."target")
local rect = UnitReaction ("party"..raidIndex.."target", "player")
if (his_target and not checked [his_target] and rect and rect <= 4) then
@@ -1377,7 +1377,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("party"..raidIndex.."target", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = _UnitGUID(unitCaster)
local playerGUID = UnitGUID(unitCaster)
if (playerGUID) then
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
@@ -1390,14 +1390,14 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
end
end
local his_target = _UnitGUID("playertarget")
local his_target = UnitGUID("playertarget")
local rect = UnitReaction ("playertarget", "player")
if (his_target and not checked [his_target] and rect and rect <= 4) then
for debuffIndex = 1, 40 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = _UnitGUID(unitCaster)
local playerGUID = UnitGUID(unitCaster)
if (playerGUID) then
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
@@ -1409,7 +1409,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
end
else
local his_target = _UnitGUID("playertarget")
local his_target = UnitGUID("playertarget")
if (his_target) then
local reaction = UnitReaction ("playertarget", "player")
if (reaction and reaction <= 4) then
@@ -1417,7 +1417,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = _UnitGUID(unitCaster)
local playerGUID = UnitGUID(unitCaster)
if (playerGUID) then
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
@@ -1441,7 +1441,7 @@ local runes_id = {
--called from control on leave / enter combat
function _detalhes:CatchRaidBuffUptime (in_or_out)
if (_IsInRaid()) then
if (IsInRaid()) then
local pot_usage = {}
local focus_augmentation = {}
@@ -1449,9 +1449,9 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
--raid groups
local cacheGetTime = GetTime()
for raidIndex = 1, _GetNumGroupMembers() do
for raidIndex = 1, GetNumGroupMembers() do
local RaidIndex = "raid" .. raidIndex
local playerGUID = _UnitGUID(RaidIndex)
local playerGUID = UnitGUID(RaidIndex)
if (playerGUID) then
@@ -1496,19 +1496,19 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
_detalhes:SendEvent("COMBAT_PREPOTION_UPDATED", nil, pot_usage, focus_augmentation)
end
elseif (_IsInGroup()) then
elseif (IsInGroup()) then
local pot_usage = {}
local focus_augmentation = {}
--party members
for groupIndex = 1, _GetNumGroupMembers() - 1 do
for groupIndex = 1, GetNumGroupMembers() - 1 do
for buffIndex = 1, 41 do
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("party"..groupIndex, buffIndex, nil, "HELPFUL")
if (name and unitCaster and UnitExists (unitCaster) and UnitExists ("party" .. groupIndex) and UnitIsUnit (unitCaster, "party" .. groupIndex)) then
local playerName, realmName = _UnitName ("party"..groupIndex)
local playerGUID = _UnitGUID("party"..groupIndex)
local playerGUID = UnitGUID("party"..groupIndex)
if (playerGUID) then
if (realmName and realmName ~= "") then
@@ -1535,7 +1535,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster and UnitExists (unitCaster) and UnitIsUnit (unitCaster, "player")) then
local playerName = _UnitName ("player")
local playerGUID = _UnitGUID("player")
local playerGUID = UnitGUID("player")
if (playerGUID) then
if (in_or_out == "BUFF_UPTIME_IN") then
if (_detalhes.PotionList [spellid]) then
@@ -1576,7 +1576,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster and UnitExists (unitCaster) and UnitIsUnit (unitCaster, "player")) then
local playerName = _UnitName ("player")
local playerGUID = _UnitGUID("player")
local playerGUID = UnitGUID("player")
if (playerGUID) then
if (in_or_out == "BUFF_UPTIME_IN") then
@@ -2048,7 +2048,7 @@ function atributo_misc:MontaInfoInterrupt()
--player
for _spellid, _tabela in pairs(minha_tabela) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(_spellid)
_table_insert (meus_interrupts, {_spellid, _tabela.counter, _tabela.counter/meu_total*100, nome, icone})
tinsert (meus_interrupts, {_spellid, _tabela.counter, _tabela.counter/meu_total*100, nome, icone})
end
--pet
local ActorPets = self.pets
@@ -2059,7 +2059,7 @@ function atributo_misc:MontaInfoInterrupt()
local PetSkillsContainer = PetActor.interrupt_spells._ActorTable
for _spellid, _skill in pairs(PetSkillsContainer) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(_spellid)
_table_insert (meus_interrupts, {_spellid, _skill.counter, _skill.counter/meu_total*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
tinsert (meus_interrupts, {_spellid, _skill.counter, _skill.counter/meu_total*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
end
end
end
+5 -5
View File
@@ -12,7 +12,7 @@
local _UnitClass = UnitClass --api local
local _IsInInstance = IsInInstance --api local
local _UnitGUID = UnitGUID --api local
local UnitGUID = UnitGUID --api local
local strsplit = strsplit --api local
local _setmetatable = setmetatable --lua local
@@ -20,7 +20,7 @@
local _bit_band = bit.band --lua local
local _table_sort = table.sort --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local pairs = pairs --lua local
local AddUnique = DetailsFramework.table.addunique --framework
local UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned --framework
@@ -437,7 +437,7 @@
local follower_text_object = _G ["DetailsPetOwnerFinderTextLeft3"] --not in use
local find_pet_found_owner = function(ownerName, serial, nome, flag, self)
local ownerGuid = _UnitGUID(ownerName)
local ownerGuid = UnitGUID(ownerName)
if (ownerGuid) then
_detalhes.tabela_pets:Adicionar (serial, nome, flag, ownerGuid, ownerName, 0x00000417)
local nome_dele, dono_nome, dono_serial, dono_flag = _detalhes.tabela_pets:PegaDono (serial, nome, flag)
@@ -483,7 +483,7 @@
local text1 = line1 and line1:GetText()
if (text1 and text1 ~= "") then
--for _, playerName in ipairs(Details.tabela_vigente.raid_roster_indexed) do
for playerName, _ in _pairs(_detalhes.tabela_vigente.raid_roster) do
for playerName, _ in pairs(_detalhes.tabela_vigente.raid_roster) do
local pName = playerName
playerName = playerName:gsub ("%-.*", "") --remove realm name
@@ -510,7 +510,7 @@
local line2 = _G ["DetailsPetOwnerFinderTextLeft3"]
local text2 = line2 and line2:GetText()
if (text2 and text2 ~= "") then
for playerName, _ in _pairs(_detalhes.tabela_vigente.raid_roster) do
for playerName, _ in pairs(_detalhes.tabela_vigente.raid_roster) do
--for _, playerName in ipairs(Details.tabela_vigente.raid_roster_indexed) do
local pName = playerName
playerName = playerName:gsub ("%-.*", "") --remove realm name
+33 -33
View File
@@ -3,19 +3,19 @@ local gump = _detalhes.gump
local container_pets = _detalhes.container_pets
-- api locals
local _UnitGUID = _G.UnitGUID
local UnitGUID = _G.UnitGUID
local _UnitName = _G.UnitName
local _GetUnitName = _G.GetUnitName
local _IsInRaid = _G.IsInRaid
local _IsInGroup = _G.IsInGroup
local _GetNumGroupMembers = _G.GetNumGroupMembers
local IsInRaid = _G.IsInRaid
local IsInGroup = _G.IsInGroup
local GetNumGroupMembers = _G.GetNumGroupMembers
-- lua locals
local _setmetatable = setmetatable
local _bit_band = bit.band --lua local
local _pairs = pairs
local pairs = pairs
local ipairs = ipairs
local _table_wipe = table.wipe
local wipe = table.wipe
--details locals
local is_ignored = _detalhes.pets_ignored
@@ -59,10 +59,10 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
--buscar pelo pet na raide
local dono_nome, dono_serial, dono_flags
if (_IsInRaid()) then
for i = 1, _GetNumGroupMembers() do
if (pet_serial == _UnitGUID("raidpet"..i)) then
dono_serial = _UnitGUID("raid"..i)
if (IsInRaid()) then
for i = 1, GetNumGroupMembers() do
if (pet_serial == UnitGUID("raidpet"..i)) then
dono_serial = UnitGUID("raid"..i)
dono_flags = 0x00000417 --emulate sourceflag flag
local nome, realm = _UnitName ("raid"..i)
@@ -73,10 +73,10 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
end
end
elseif (_IsInGroup()) then
for i = 1, _GetNumGroupMembers()-1 do
if (pet_serial == _UnitGUID("partypet"..i)) then
dono_serial = _UnitGUID("party"..i)
elseif (IsInGroup()) then
for i = 1, GetNumGroupMembers()-1 do
if (pet_serial == UnitGUID("partypet"..i)) then
dono_serial = UnitGUID("party"..i)
dono_flags = 0x00000417 --emulate sourceflag flag
local nome, realm = _UnitName ("party"..i)
@@ -90,10 +90,10 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
end
if (not dono_nome) then
if (pet_serial == _UnitGUID("pet")) then
if (pet_serial == UnitGUID("pet")) then
dono_nome = _GetUnitName ("player")
dono_serial = _UnitGUID("player")
if (_IsInGroup() or _IsInRaid()) then
dono_serial = UnitGUID("player")
if (IsInGroup() or IsInRaid()) then
dono_flags = 0x00000417 --emulate sourceflag flag
else
dono_flags = 0x00000411 --emulate sourceflag flag
@@ -126,7 +126,7 @@ end
function container_pets:Unpet (...)
local unitid = ...
local owner_serial = _UnitGUID(unitid)
local owner_serial = UnitGUID(unitid)
if (owner_serial) then
--tira o pet existente da tabela de pets e do cache do core
@@ -137,7 +137,7 @@ function container_pets:Unpet (...)
_detalhes.pets_players [owner_serial] = nil
end
--verifica se h um pet novo deste jogador
local pet_serial = _UnitGUID(unitid .. "pet")
local pet_serial = UnitGUID(unitid .. "pet")
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
local nome, realm = _UnitName (unitid)
@@ -157,16 +157,16 @@ function container_pets:PlayerPet (player_serial, pet_serial)
end
function container_pets:BuscarPets()
if (_IsInRaid()) then
for i = 1, _GetNumGroupMembers(), 1 do
local pet_serial = _UnitGUID("raidpet"..i)
if (IsInRaid()) then
for i = 1, GetNumGroupMembers(), 1 do
local pet_serial = UnitGUID("raidpet"..i)
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
local nome, realm = _UnitName ("raid"..i)
if (realm and realm ~= "") then
nome = nome.."-"..realm
end
local owner_serial = _UnitGUID("raid"..i)
local owner_serial = UnitGUID("raid"..i)
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("raidpet"..i), 0x1114, owner_serial, nome, 0x514)
_detalhes.parser:RevomeActorFromCache (pet_serial)
container_pets:PlayerPet (owner_serial, pet_serial)
@@ -174,9 +174,9 @@ function container_pets:BuscarPets()
end
end
elseif (_IsInGroup()) then
for i = 1, _GetNumGroupMembers()-1, 1 do
local pet_serial = _UnitGUID("partypet"..i)
elseif (IsInGroup()) then
for i = 1, GetNumGroupMembers()-1, 1 do
local pet_serial = UnitGUID("partypet"..i)
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
local nome, realm = _UnitName ("party"..i)
@@ -184,24 +184,24 @@ function container_pets:BuscarPets()
if (realm and realm ~= "") then
nome = nome.."-"..realm
end
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("partypet"..i), 0x1114, _UnitGUID("party"..i), nome, 0x514)
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("partypet"..i), 0x1114, UnitGUID("party"..i), nome, 0x514)
end
end
end
local pet_serial = _UnitGUID("pet")
local pet_serial = UnitGUID("pet")
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, _UnitGUID("player"), _detalhes.playername, 0x514)
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, UnitGUID("player"), _detalhes.playername, 0x514)
end
end
else
local pet_serial = _UnitGUID("pet")
local pet_serial = UnitGUID("pet")
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, _UnitGUID("player"), _detalhes.playername, 0x514)
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, UnitGUID("player"), _detalhes.playername, 0x514)
end
end
end
@@ -223,14 +223,14 @@ function container_pets:Adicionar (pet_serial, pet_nome, pet_flags, dono_serial,
end
function _detalhes:WipePets()
return _table_wipe(_detalhes.tabela_pets.pets)
return wipe(_detalhes.tabela_pets.pets)
end
function _detalhes:LimparPets()
--erase old pet table by creating a new one
local newPetTable = {}
--minimum of 90 minutes to clean a pet from the pet table data
for PetSerial, PetTable in _pairs(_detalhes.tabela_pets.pets) do
for PetSerial, PetTable in pairs(_detalhes.tabela_pets.pets) do
if ( (PetTable[4] + 5400 > _detalhes._tempo + 1) or (PetTable[5] and PetTable[4] + 43200 > _detalhes._tempo) ) then
newPetTable [PetSerial] = PetTable
end
+1 -1
View File
@@ -514,7 +514,7 @@ function segmentClass:resetar()
wipe(Details.cache_healing_group)
Details:UpdateParserGears()
if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
if (not InCombatLockdown() and not UnitAffectingCombat("player")) then
--workarround for the "script run too long" issue while outside the combat lockdown
local cleargarbage = function()
collectgarbage()
+12 -12
View File
@@ -19,11 +19,11 @@ local _
local _cstr = string.format --lua local
local _math_floor = math.floor --lua local
local _table_sort = table.sort --lua local
local _table_insert = table.insert --lua local
local tinsert = table.insert --lua local
local _table_size = table.getn --lua local
local _setmetatable = setmetatable --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local pairs = pairs --lua local
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
@@ -32,9 +32,9 @@ local _unpack = unpack --lua local
local type = type --lua local
local _GetSpellInfo = _detalhes.getspellinfo -- api local
local _IsInRaid = IsInRaid -- api local
local _IsInGroup = IsInGroup -- api local
local _GetNumGroupMembers = GetNumGroupMembers -- api local
local IsInRaid = IsInRaid -- api local
local IsInGroup = IsInGroup -- api local
local GetNumGroupMembers = GetNumGroupMembers -- api local
local _GetNumPartyMembers = GetNumPartyMembers or GetNumSubgroupMembers -- api local
local _GetNumRaidMembers = GetNumRaidMembers or GetNumGroupMembers -- api local
local _GetUnitName = GetUnitName -- api local
@@ -59,7 +59,7 @@ local temp_table = {}
local target_func = function(main_table)
local i = 1
for name, amount in _pairs(main_table) do
for name, amount in pairs(main_table) do
local t = temp_table [i]
if (not t) then
t = {"", 0}
@@ -75,7 +75,7 @@ end
local spells_used_func = function(main_table, target)
local i = 1
for spellid, spell_table in _pairs(main_table) do
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]
@@ -117,7 +117,7 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
local this_actor = combat (1, targetname)
if (this_actor) then
for name, _ in _pairs(this_actor.damage_from) do
for name, _ in pairs(this_actor.damage_from) do
local aggressor = combat (1, name)
if (aggressor) then
local spell = aggressor.spells._ActorTable [spellid]
@@ -219,7 +219,7 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
if (spell) then
if (target) then
if (target == "[all]") then
for target_name, amount in _pairs(spell.targets) do
for target_name, amount in pairs(spell.targets) do
--add amount
--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
@@ -236,7 +236,7 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
elseif (target == "[raid]") then
local roster = combat.raid_roster
for target_name, amount in _pairs(spell.targets) do
for target_name, amount in pairs(spell.targets) do
if (roster [target_name]) then
--add amount
instance_container:AddValue (combat (1, target_name), amount, true)
@@ -289,14 +289,14 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
if (target == "[all]") then
local total = 0
for target_name, amount in _pairs(actor.targets) do
for target_name, amount in pairs(actor.targets) do
total = total + amount
end
return total
elseif (target == "[raid]") then
local total = 0
for target_name, amount in _pairs(actor.targets) do
for target_name, amount in pairs(actor.targets) do
if (combat.raid_roster [target_name]) then
total = total + amount
end
+12 -12
View File
@@ -12,11 +12,11 @@
local _cstr = string.format --lua local
local _math_floor = math.floor --lua local
local _table_sort = table.sort --lua local
local _table_insert = table.insert --lua local
local tinsert = table.insert --lua local
local _table_size = table.getn --lua local
local _setmetatable = setmetatable --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local pairs = pairs --lua local
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
@@ -25,9 +25,9 @@
local type = type --lua local
local _GetSpellInfo = _detalhes.getspellinfo -- api local
local _IsInRaid = IsInRaid -- api local
local _IsInGroup = IsInGroup -- api local
local _GetNumGroupMembers = GetNumGroupMembers -- api local
local IsInRaid = IsInRaid -- api local
local IsInGroup = IsInGroup -- api local
local GetNumGroupMembers = GetNumGroupMembers -- api local
local _GetNumPartyMembers = GetNumPartyMembers or GetNumSubgroupMembers -- api local
local _GetNumRaidMembers = GetNumRaidMembers or GetNumGroupMembers -- api local
local _GetUnitName = GetUnitName -- api local
@@ -52,7 +52,7 @@
local target_func = function(main_table)
local i = 1
for name, amount in _pairs(main_table) do
for name, amount in pairs(main_table) do
local t = temp_table [i]
if (not t) then
t = {"", 0}
@@ -68,7 +68,7 @@
local spells_used_func = function(main_table, target)
local i = 1
for spellid, spell_table in _pairs(main_table) do
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]
@@ -111,7 +111,7 @@
local this_actor = combat (2, targetname)
if (this_actor) then
for name, _ in _pairs(this_actor.healing_from) do
for name, _ in pairs(this_actor.healing_from) do
local healer = combat (2, name)
if (healer) then
local spell = healer.spells._ActorTable [spellid]
@@ -208,7 +208,7 @@
if (spell) then
if (target) then
if (target == "[all]") then
for target_name, amount in _pairs(spell.targets) do
for target_name, amount in pairs(spell.targets) do
--add amount
--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
@@ -225,7 +225,7 @@
elseif (target == "[raid]") then
local roster = combat.raid_roster
for target_name, amount in _pairs(spell.targets) do
for target_name, amount in pairs(spell.targets) do
if (roster [target_name]) then
--add amount
instance_container:AddValue (combat (1, target_name), amount, true)
@@ -278,14 +278,14 @@
if (target == "[all]") then
local total = 0
for target_name, amount in _pairs(actor.targets) do
for target_name, amount in pairs(actor.targets) do
total = total + amount
end
return total
elseif (target == "[raid]") then
local total = 0
for target_name, amount in _pairs(actor.targets) do
for target_name, amount in pairs(actor.targets) do
if (combat.raid_roster [target_name]) then
total = total + amount
end