Updated LibOpenRaid and DetailsFramework

This commit is contained in:
Tercio Jose
2022-10-09 19:47:56 -03:00
parent 9974a87119
commit 944178f76f
126 changed files with 15502 additions and 15495 deletions
+85 -85
View File
@@ -7,7 +7,7 @@
--[[global]] DETAILS_TOTALS_ONLYGROUP = true
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
--local pointers
local _setmetatable = setmetatable -- lua local
local _ipairs = ipairs -- lua local
@@ -21,7 +21,7 @@
local _GetTime = GetTime
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
--constants
local combate = _detalhes.combate
local container_combatentes = _detalhes.container_combatentes
@@ -37,7 +37,7 @@
local _tempo = _GetTime()
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> api functions
--api functions
--combat (container type, actor name)
_detalhes.call_combate = function(self, class_type, name)
@@ -202,7 +202,7 @@
--[[global]] DETAILS_SEGMENTTYPE_PVP_BATTLEGROUND = 21
function combate:GetCombatType()
--> mythic dungeon
--mythic dungeon
local isMythicDungeon = is_mythic_dungeon_segment
if (isMythicDungeon) then
local isMythicDungeonTrash = self.is_mythic_dungeon_trash
@@ -226,19 +226,19 @@
end
end
--> arena
--arena
local arenaInfo = self.is_arena
if (arenaInfo) then
return DETAILS_SEGMENTTYPE_PVP_ARENA
end
--> battleground
--battleground
local battlegroundInfo = self.is_pvp
if (battlegroundInfo) then
return DETAILS_SEGMENTTYPE_PVP_BATTLEGROUND
end
--> dungeon or raid
--dungeon or raid
local instanceType = self.instance_type
if (instanceType == "party") then
@@ -258,7 +258,7 @@
end
end
--> overall data
--overall data
if (self == _detalhes.tabela_overall) then
return DETAILS_SEGMENTTYPE_OVERALL
end
@@ -282,7 +282,7 @@
--return the combat time in seconds
function combate:GetFormatedCombatTime()
local time = self:GetCombatTime()
local m, s = _math_floor (time/60), _math_floor (time%60)
local m, s = _math_floor(time/60), _math_floor(time%60)
return m, s
end
@@ -322,7 +322,7 @@
end
elseif (attribute == 3) then
if (subAttribute == 5) then --> resources
if (subAttribute == 5) then --resources
return self.totals.resources or 0
end
if (onlyGroup) then
@@ -435,7 +435,7 @@
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
--internals
function combate:CreateNewCombatTable()
return combate:NovaTabela()
@@ -446,72 +446,72 @@
local esta_tabela = {true, true, true, true, true}
esta_tabela [1] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_DAMAGE_CLASS, esta_tabela, combatId) --> Damage
esta_tabela [2] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_HEAL_CLASS, esta_tabela, combatId) --> Healing
esta_tabela [3] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_ENERGY_CLASS, esta_tabela, combatId) --> Energies
esta_tabela [4] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS, esta_tabela, combatId) --> Misc
esta_tabela [5] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_DAMAGE_CLASS, esta_tabela, combatId) --> place holder for customs
esta_tabela [1] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_DAMAGE_CLASS, esta_tabela, combatId) --Damage
esta_tabela [2] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_HEAL_CLASS, esta_tabela, combatId) --Healing
esta_tabela [3] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_ENERGY_CLASS, esta_tabela, combatId) --Energies
esta_tabela [4] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS, esta_tabela, combatId) --Misc
esta_tabela [5] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_DAMAGE_CLASS, esta_tabela, combatId) --place holder for customs
_setmetatable (esta_tabela, combate)
_detalhes.combat_counter = _detalhes.combat_counter + 1
esta_tabela.combat_counter = _detalhes.combat_counter
--> try discover if is a pvp combat
--try discover if is a pvp combat
local who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags = ...
if (who_serial) then --> aqui ir identificar o boss ou o oponente
if (alvo_name and _bit_band (alvo_flags, REACTION_HOSTILE) ~= 0) then --> tentando pegar o inimigo pelo alvo
if (who_serial) then --aqui ir identificar o boss ou o oponente
if (alvo_name and _bit_band (alvo_flags, REACTION_HOSTILE) ~= 0) then --tentando pegar o inimigo pelo alvo
esta_tabela.contra = alvo_name
if (_bit_band (alvo_flags, CONTROL_PLAYER) ~= 0) then
esta_tabela.pvp = true --> o alvo da faco oposta ou foi dado mind control
esta_tabela.pvp = true --o alvo da faco oposta ou foi dado mind control
end
elseif (who_name and _bit_band (who_flags, REACTION_HOSTILE) ~= 0) then --> tentando pegar o inimigo pelo who caso o mob quem deu o primeiro hit
elseif (who_name and _bit_band (who_flags, REACTION_HOSTILE) ~= 0) then --tentando pegar o inimigo pelo who caso o mob quem deu o primeiro hit
esta_tabela.contra = who_name
if (_bit_band (who_flags, CONTROL_PLAYER) ~= 0) then
esta_tabela.pvp = true --> o who da faco oposta ou foi dado mind control
esta_tabela.pvp = true --o who da faco oposta ou foi dado mind control
end
else
esta_tabela.pvp = true --> se ambos so friendly, seria isso um PVP entre jogadores da mesma faco?
esta_tabela.pvp = true --se ambos so friendly, seria isso um PVP entre jogadores da mesma faco?
end
end
--> start/end time (duration)
--start/end time (duration)
esta_tabela.data_fim = 0
esta_tabela.data_inicio = 0
esta_tabela.tempo_start = _tempo
--> record deaths
--record deaths
esta_tabela.last_events_tables = {}
--> last events from players
--last events from players
esta_tabela.player_last_events = {}
--> players in the raid
--players in the raid
esta_tabela.raid_roster = {}
esta_tabela.raid_roster_indexed = {}
--> frags
--frags
esta_tabela.frags = {}
esta_tabela.frags_need_refresh = false
--> alternate power
--alternate power
esta_tabela.alternate_power = {}
--> time data container
--time data container
esta_tabela.TimeData = _detalhes:TimeDataCreateCombatTables()
esta_tabela.PhaseData = {{1, 1}, damage = {}, heal = {}, damage_section = {}, heal_section = {}} --[1] phase number [2] phase started
--> for external plugin usage, these tables are guaranteed to be saved with the combat
--for external plugin usage, these tables are guaranteed to be saved with the combat
esta_tabela.spells_cast_timeline = {}
esta_tabela.aura_timeline = {}
esta_tabela.cleu_timeline = {}
--> cleu events
--cleu events
esta_tabela.cleu_events = {
n = 1 --event counter
}
--> Skill cache (not used)
--Skill cache (not used)
esta_tabela.CombatSkillCache = {}
-- a tabela sem o tempo de inicio a tabela descartavel do inicio do addon
@@ -531,7 +531,7 @@
esta_tabela[4].need_refresh = true
esta_tabela[5].need_refresh = true
if (_tabela_overall) then --> link a tabela de combate do overall
if (_tabela_overall) then --link a tabela de combate do overall
esta_tabela[1].shadow = _tabela_overall[1]
esta_tabela[2].shadow = _tabela_overall[2]
esta_tabela[3].shadow = _tabela_overall[3]
@@ -539,49 +539,49 @@
end
esta_tabela.totals = {
0, --> dano
0, --> cura
{--> e_energy
[0] = 0, --> mana
[1] = 0, --> rage
[3] = 0, --> energy (rogues cat)
[6] = 0, --> runepower (dk)
0, --dano
0, --cura
{--e_energy
[0] = 0, --mana
[1] = 0, --rage
[3] = 0, --energy (rogues cat)
[6] = 0, --runepower (dk)
alternatepower = 0,
},
{--> misc
cc_break = 0, --> armazena quantas quebras de CC
ress = 0, --> armazena quantos pessoas ele reviveu
interrupt = 0, --> armazena quantos interrupt a pessoa deu
dispell = 0, --> armazena quantos dispell esta pessoa recebeu
dead = 0, --> armazena quantas vezes essa pessia morreu
cooldowns_defensive = 0, --> armazena quantos cooldowns a raid usou
buff_uptime = 0, --> armazena quantos cooldowns a raid usou
debuff_uptime = 0 --> armazena quantos cooldowns a raid usou
{--misc
cc_break = 0, --armazena quantas quebras de CC
ress = 0, --armazena quantos pessoas ele reviveu
interrupt = 0, --armazena quantos interrupt a pessoa deu
dispell = 0, --armazena quantos dispell esta pessoa recebeu
dead = 0, --armazena quantas vezes essa pessia morreu
cooldowns_defensive = 0, --armazena quantos cooldowns a raid usou
buff_uptime = 0, --armazena quantos cooldowns a raid usou
debuff_uptime = 0 --armazena quantos cooldowns a raid usou
},
--> avoid using this values bellow, they aren't updated by the parser, only on demand by a user interaction.
--avoid using this values bellow, they aren't updated by the parser, only on demand by a user interaction.
voidzone_damage = 0,
frags_total = 0,
--> end
--end
}
esta_tabela.totals_grupo = {
0, --> dano
0, --> cura
{--> e_energy
[0] = 0, --> mana
[1] = 0, --> rage
[3] = 0, --> energy (rogues cat)
[6] = 0, --> runepower (dk)
0, --dano
0, --cura
{--e_energy
[0] = 0, --mana
[1] = 0, --rage
[3] = 0, --energy (rogues cat)
[6] = 0, --runepower (dk)
alternatepower = 0,
},
{--> misc
cc_break = 0, --> armazena quantas quebras de CC
ress = 0, --> armazena quantos pessoas ele reviveu
interrupt = 0, --> armazena quantos interrupt a pessoa deu
dispell = 0, --> armazena quantos dispell esta pessoa recebeu
dead = 0, --> armazena quantas vezes essa oessia morreu
cooldowns_defensive = 0, --> armazena quantos cooldowns a raid usou
{--misc
cc_break = 0, --armazena quantas quebras de CC
ress = 0, --armazena quantos pessoas ele reviveu
interrupt = 0, --armazena quantos interrupt a pessoa deu
dispell = 0, --armazena quantos dispell esta pessoa recebeu
dead = 0, --armazena quantas vezes essa oessia morreu
cooldowns_defensive = 0, --armazena quantos cooldowns a raid usou
buff_uptime = 0,
debuff_uptime = 0
}
@@ -591,7 +591,7 @@
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
--core
function combate:CreateLastEventsTable (player_name)
local t = {}
@@ -606,7 +606,7 @@
--trava o tempo dos jogadores aps o trmino do combate.
function combate:TravarTempos()
if (self [1]) then
for _, jogador in _ipairs (self [1]._ActorTable) do --> damage
for _, jogador in _ipairs(self [1]._ActorTable) do --damage
if (jogador:Iniciar()) then -- retorna se ele esta com o dps ativo
jogador:TerminarTempo()
jogador:Iniciar (false) --trava o dps do jogador
@@ -621,7 +621,7 @@
end
end
if (self [2]) then
for _, jogador in _ipairs (self [2]._ActorTable) do --> healing
for _, jogador in _ipairs(self [2]._ActorTable) do --healing
if (jogador:Iniciar()) then -- retorna se ele esta com o dps ativo
jogador:TerminarTempo()
jogador:Iniciar (false) --trava o dps do jogador
@@ -670,50 +670,50 @@
return
end
--> sub dano
for index, actor_T2 in _ipairs (combate2[1]._ActorTable) do
--sub dano
for index, actor_T2 in _ipairs(combate2[1]._ActorTable) do
local actor_T1 = combate1[1]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 - actor_T2
actor_T2:subtract_total (combate1)
end
combate1 [1].need_refresh = true
--> sub heal
for index, actor_T2 in _ipairs (combate2[2]._ActorTable) do
--sub heal
for index, actor_T2 in _ipairs(combate2[2]._ActorTable) do
local actor_T1 = combate1[2]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 - actor_T2
actor_T2:subtract_total (combate1)
end
combate1 [2].need_refresh = true
--> sub energy
for index, actor_T2 in _ipairs (combate2[3]._ActorTable) do
--sub energy
for index, actor_T2 in _ipairs(combate2[3]._ActorTable) do
local actor_T1 = combate1[3]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 - actor_T2
actor_T2:subtract_total (combate1)
end
combate1 [3].need_refresh = true
--> sub misc
for index, actor_T2 in _ipairs (combate2[4]._ActorTable) do
--sub misc
for index, actor_T2 in _ipairs(combate2[4]._ActorTable) do
local actor_T1 = combate1[4]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 - actor_T2
actor_T2:subtract_total (combate1)
end
combate1 [4].need_refresh = true
--> reduz o tempo
--reduz o tempo
combate1.start_time = combate1.start_time + combate2:GetCombatTime()
--> apaga as mortes da luta diminuida
local amt_mortes = #combate2.last_events_tables --> quantas mortes teve nessa luta
--apaga as mortes da luta diminuida
local amt_mortes = #combate2.last_events_tables --quantas mortes teve nessa luta
if (amt_mortes > 0) then
for i = #combate1.last_events_tables, #combate1.last_events_tables-amt_mortes, -1 do
_table_remove (combate1.last_events_tables, #combate1.last_events_tables)
end
end
--> frags
--frags
for fragName, fragAmount in pairs (combate2.frags) do
if (fragAmount) then
if (combate1.frags [fragName]) then
@@ -725,7 +725,7 @@
end
combate1.frags_need_refresh = true
--> alternate power
--alternate power
local overallPowerTable = combate1.alternate_power
for actorName, powerTable in pairs (combate2.alternate_power) do
local power = overallPowerTable [actorName]
@@ -747,8 +747,8 @@
custom_combat = combate1
end
for class_type, actor_container in ipairs (all_containers) do
for _, actor in ipairs (actor_container) do
for class_type, actor_container in ipairs(all_containers) do
for _, actor in ipairs(actor_container) do
local shadow
if (class_type == class_type_dano) then
@@ -767,7 +767,7 @@
end
end
--> alternate power
--alternate power
local overallPowerTable = combate1.alternate_power
for actorName, powerTable in pairs (combate2.alternate_power) do
local power = overallPowerTable [actorName]
+150 -150
View File
File diff suppressed because it is too large Load Diff
+328 -328
View File
File diff suppressed because it is too large Load Diff
+319 -319
View File
File diff suppressed because it is too large Load Diff
+389 -389
View File
File diff suppressed because it is too large Load Diff
+145 -145
View File
@@ -64,7 +64,7 @@ local keyName
function atributo_energy:NovaTabela (serial, nome, link)
--> constructor
--constructor
local alphabetical = _detalhes:GetOrderNumber(nome)
@@ -92,7 +92,7 @@ function atributo_energy:NovaTabela (serial, nome, link)
return _new_energyActor
end
--> resources sort
--resources sort
function _detalhes.SortGroupResource (container, keyName2)
keyName = keyName2
@@ -120,7 +120,7 @@ function _detalhes:ContainerSortResources (container, amount, keyName2)
_table_sort (container, _detalhes.SortKeySimpleResources)
if (amount) then
for i = amount, 1, -1 do --> de trs pra frente
for i = amount, 1, -1 do --de trs pra frente
if (container[i][keyName] < 1) then
amount = amount-1
else
@@ -132,7 +132,7 @@ function _detalhes:ContainerSortResources (container, amount, keyName2)
end
end
--> power types sort
--power types sort
local power_table = {0, 1, 3, 6}
local power_type
@@ -189,7 +189,7 @@ local sort_alternateenergy_group = function(t1, t2)
end
end
--> resource refresh
--resource refresh
local function RefreshBarraResources (tabela, barra, instancia)
tabela:AtualizarResources (tabela.minha_barra, barra.colocacao, instancia)
@@ -214,7 +214,7 @@ function atributo_energy:AtualizarResources (whichRowLine, colocacao, instancia)
local total = instancia.showing.totals.resources
local combat_time = instancia.showing:GetCombatTime()
local rps = _math_floor (self.resource / combat_time)
local rps = _math_floor(self.resource / combat_time)
local formated_resource = SelectedToKFunction (_, self.resource)
local formated_rps = _cstr ("%.2f", self.resource / combat_time)
@@ -245,39 +245,39 @@ function atributo_energy:AtualizarResources (whichRowLine, colocacao, instancia)
local rightText = formated_resource .. bars_brackets[1] .. formated_rps .. " r/s" .. bars_separator .. porcentagem .. bars_brackets[2]
if (UsingCustomRightText) then
esta_barra.lineText4:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_resource, formated_rps, porcentagem, self, instancia.showing, instancia, rightText))
esta_barra.lineText4:SetText(_string_replace (instancia.row_info.textR_custom_text, formated_resource, formated_rps, porcentagem, self, instancia.showing, instancia, rightText))
else
if (instancia.use_multi_fontstrings) then
instancia:SetInLineTexts(esta_barra, formated_resource, formated_rps .. " r/s", porcentagem .. "%")
else
esta_barra.lineText4:SetText (rightText)
esta_barra.lineText4:SetText(rightText)
end
end
esta_barra.lineText1:SetText (colocacao .. ". " .. self.nome)
esta_barra.lineText1:SetSize (esta_barra:GetWidth() - esta_barra.lineText4:GetStringWidth() - 20, 15)
esta_barra.lineText1:SetText(colocacao .. ". " .. self.nome)
esta_barra.lineText1:SetSize(esta_barra:GetWidth() - esta_barra.lineText4:GetStringWidth() - 20, 15)
esta_barra:SetValue (100)
esta_barra:SetValue(100)
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
Details.FadeHandler.Fader (esta_barra, "out")
Details.FadeHandler.Fader(esta_barra, "out")
end
--> texture color
--texture color
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
self:SetBarColors (esta_barra, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b)
--> icon
--icon
self:SetClassIcon (esta_barra.icone_classe, instancia, self.classe)
end
--> refresh function
--refresh function
function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, exportar)
local showing = tabela_do_combate [class_type]
if (#showing._ActorTable < 1) then --> no h barras para mostrar
if (#showing._ActorTable < 1) then --no h barras para mostrar
return _detalhes:EsconderBarrasNaoUsadas (instancia, showing), "", 0, 0
end
@@ -290,7 +290,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
local modo = instancia.modo
if (sub_atributo == 5) then
--> showing resources
--showing resources
keyName = "resource"
@@ -298,7 +298,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
amount = _detalhes:ContainerSortResources (conteudo, amount, "resource")
instancia.top = conteudo[1].resource
for index, player in _ipairs (conteudo) do
for index, player in _ipairs(conteudo) do
if (player.resource >= 1) then
total = total + player.resource
else
@@ -309,9 +309,9 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
elseif (modo == modo_GROUP) then
_table_sort (conteudo, _detalhes.SortKeyGroupResources)
for index, player in _ipairs (conteudo) do
if (player.grupo) then --> um player e esta em grupo
if (player.resource < 1) then --> dano menor que 1, interromper o loop
for index, player in _ipairs(conteudo) do
if (player.grupo) then -- um player e esta em grupo
if (player.resource < 1) then --dano menor que 1, interromper o loop
amount = index - 1
break
end
@@ -349,11 +349,11 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
whichRowLine = whichRowLine+1
end
--> beta, hidar barras no usadas durante um refresh forado
--beta, hidar barras no usadas durante um refresh forado
if (forcar) then
if (instancia.modo == 2) then --> group
if (instancia.modo == 2) then --group
for i = whichRowLine, instancia.rows_fit_in_window do
Details.FadeHandler.Fader (instancia.barras [i], "in", Details.fade_speed)
Details.FadeHandler.Fader(instancia.barras [i], "in", Details.fade_speed)
end
end
end
@@ -371,7 +371,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
if (exportar) then
if (_type (exportar) == "boolean") then
if (_type(exportar) == "boolean") then
--keyName = "received"
else
keyName = exportar.key
@@ -416,7 +416,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
_table_sort (conteudo, sort_alternateenergy_group)
for index, player in _ipairs (conteudo) do
for index, player in _ipairs(conteudo) do
if (player.grupo) then
if (player.alternatepower < 1) then
amount = index - 1
@@ -435,7 +435,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
_table_sort (conteudo, sort_energy_group)
for index, player in _ipairs (conteudo) do
for index, player in _ipairs(conteudo) do
if (player.grupo) then
if (player.received < 1) then
amount = index - 1
@@ -461,9 +461,9 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
return total, keyName, instancia.top, amount
end
if (amount < 1) then --> no h barras para mostrar
if (amount < 1) then --no h barras para mostrar
instancia:EsconderScrollBar()
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --retorna a tabela que precisa ganhar o refresh
end
instancia:RefreshScrollBar (amount)
@@ -488,7 +488,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
if (following) then
if (using_cache) then
local pname = _detalhes.playername
for i, actor in _ipairs (conteudo) do
for i, actor in _ipairs(conteudo) do
if (actor.nome == pname) then
myPos = i
break
@@ -524,49 +524,49 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
local row1 = barras_container [1]
row1.minha_tabela = nil
row1.lineText1:SetText (Loc ["STRING_TOTAL"])
row1.lineText1:SetText(Loc ["STRING_TOTAL"])
if (instancia.use_multi_fontstrings) then
instancia:SetInLineTexts(row1, "", _detalhes:ToK2 (total, _detalhes:ToK (total / combat_time)))
else
row1.lineText4:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
row1.lineText4:SetText(_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
end
row1:SetValue (100)
row1:SetValue(100)
local r, g, b = unpack (instancia.total_bar.color)
row1.textura:SetVertexColor (r, g, b)
row1.icone_classe:SetTexture (instancia.total_bar.icon)
row1.icone_classe:SetTexture(instancia.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
Details.FadeHandler.Fader (row1, "out")
Details.FadeHandler.Fader(row1, "out")
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
for i = instancia.barraS[1], iter_last-1, 1 do --> vai atualizar s o range que esta sendo mostrado
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instncia, index, total, valor da 1 barra
for i = instancia.barraS[1], iter_last-1, 1 do --vai atualizar s o range que esta sendo mostrado
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --instncia, index, total, valor da 1 barra
whichRowLine = whichRowLine+1
end
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instncia, index, total, valor da 1 barra
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --instncia, index, total, valor da 1 barra
whichRowLine = whichRowLine+1
else
for i = instancia.barraS[1], iter_last, 1 do --> vai atualizar s o range que esta sendo mostrado
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instncia, index, total, valor da 1 barra
for i = instancia.barraS[1], iter_last, 1 do --vai atualizar s o range que esta sendo mostrado
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --instncia, index, total, valor da 1 barra
whichRowLine = whichRowLine+1
end
end
else
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
for i = instancia.barraS[1], instancia.barraS[2]-1, 1 do --> vai atualizar s o range que esta sendo mostrado
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instncia, index, total, valor da 1 barra
for i = instancia.barraS[1], instancia.barraS[2]-1, 1 do --vai atualizar s o range que esta sendo mostrado
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --instncia, index, total, valor da 1 barra
whichRowLine = whichRowLine+1
end
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instncia, index, total, valor da 1 barra
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --instncia, index, total, valor da 1 barra
whichRowLine = whichRowLine+1
else
for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar s o range que esta sendo mostrado
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instncia, index, total, valor da 1 barra
for i = instancia.barraS[1], instancia.barraS[2], 1 do --vai atualizar s o range que esta sendo mostrado
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --instncia, index, total, valor da 1 barra
whichRowLine = whichRowLine+1
end
end
@@ -584,47 +584,47 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
local row1 = barras_container [1]
row1.minha_tabela = nil
row1.lineText1:SetText (Loc ["STRING_TOTAL"])
row1.lineText1:SetText(Loc ["STRING_TOTAL"])
if (instancia.use_multi_fontstrings) then
instancia:SetInLineTexts(row1, "", _detalhes:ToK2 (total), _detalhes:ToK (total / combat_time))
else
row1.lineText4:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
row1.lineText4:SetText(_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
end
row1:SetValue (100)
row1:SetValue(100)
local r, g, b = unpack (instancia.total_bar.color)
row1.textura:SetVertexColor (r, g, b)
row1.icone_classe:SetTexture (instancia.total_bar.icon)
row1.icone_classe:SetTexture(instancia.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
Details.FadeHandler.Fader (row1, "out")
Details.FadeHandler.Fader(row1, "out")
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instncia, index, total, valor da 1 barra
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --instncia, index, total, valor da 1 barra
whichRowLine = whichRowLine+1
for i = iter_last-1, instancia.barraS[1], -1 do --> vai atualizar s o range que esta sendo mostrado
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instncia, index, total, valor da 1 barra
for i = iter_last-1, instancia.barraS[1], -1 do --vai atualizar s o range que esta sendo mostrado
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --instncia, index, total, valor da 1 barra
whichRowLine = whichRowLine+1
end
else
for i = iter_last, instancia.barraS[1], -1 do --> vai atualizar s o range que esta sendo mostrado
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instncia, index, total, valor da 1 barra
for i = iter_last, instancia.barraS[1], -1 do --vai atualizar s o range que esta sendo mostrado
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --instncia, index, total, valor da 1 barra
whichRowLine = whichRowLine+1
end
end
else
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instncia, index, total, valor da 1 barra
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --instncia, index, total, valor da 1 barra
whichRowLine = whichRowLine+1
for i = instancia.barraS[2]-1, instancia.barraS[1], -1 do --> vai atualizar s o range que esta sendo mostrado
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instncia, index, total, valor da 1 barra
for i = instancia.barraS[2]-1, instancia.barraS[1], -1 do --vai atualizar s o range que esta sendo mostrado
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --instncia, index, total, valor da 1 barra
whichRowLine = whichRowLine+1
end
else
for i = instancia.barraS[2], instancia.barraS[1], -1 do --> vai atualizar s o range que esta sendo mostrado
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instncia, index, total, valor da 1 barra
for i = instancia.barraS[2], instancia.barraS[1], -1 do --vai atualizar s o range que esta sendo mostrado
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --instncia, index, total, valor da 1 barra
whichRowLine = whichRowLine+1
end
end
@@ -637,20 +637,20 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
if (forcar) then
if (instancia.modo == 2) then --> group
if (instancia.modo == 2) then --group
for i = whichRowLine, instancia.rows_fit_in_window do
Details.FadeHandler.Fader (instancia.barras [i], "in", Details.fade_speed)
Details.FadeHandler.Fader(instancia.barras [i], "in", Details.fade_speed)
end
end
end
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --retorna a tabela que precisa ganhar o refresh
end
function atributo_energy:RefreshLine (instancia, barras_container, whichRowLine, lugar, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
local esta_barra = instancia.barras[whichRowLine] --> pega a referncia da barra na janela
local esta_barra = instancia.barras[whichRowLine] --pega a referncia da barra na janela
if (not esta_barra) then
print ("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..lugar)
@@ -665,7 +665,7 @@ function atributo_energy:RefreshLine (instancia, barras_container, whichRowLine,
self.minha_barra = esta_barra
self.colocacao = lugar
local esta_e_energy_total = self [keyName] --> total de dano que este jogador deu
local esta_e_energy_total = self [keyName] --total de dano que este jogador deu
-- local porcentagem = esta_e_energy_total / total * 100
local porcentagem
@@ -675,7 +675,7 @@ function atributo_energy:RefreshLine (instancia, barras_container, whichRowLine,
porcentagem = _cstr ("%.1f", esta_e_energy_total / instancia.top * 100)
end
local esta_porcentagem = _math_floor ((esta_e_energy_total/instancia.top) * 100)
local esta_porcentagem = _math_floor((esta_e_energy_total/instancia.top) * 100)
local formated_energy = SelectedToKFunction (_, esta_e_energy_total)
@@ -690,16 +690,16 @@ function atributo_energy:RefreshLine (instancia, barras_container, whichRowLine,
local rightText = formated_energy .. bars_brackets[1] .. porcentagem .. bars_brackets[2]
if (UsingCustomRightText) then
esta_barra.lineText4:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_energy, "", porcentagem, self, instancia.showing, instancia, rightText))
esta_barra.lineText4:SetText(_string_replace (instancia.row_info.textR_custom_text, formated_energy, "", porcentagem, self, instancia.showing, instancia, rightText))
else
if (instancia.use_multi_fontstrings) then
instancia:SetInLineTexts(esta_barra, "", formated_energy, porcentagem)
else
esta_barra.lineText4:SetText (rightText)
esta_barra.lineText4:SetText(rightText)
end
end
if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --> precisa atualizar o tooltip
if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --precisa atualizar o tooltip
gump:UpdateTooltip (whichRowLine, esta_barra, instancia)
end
@@ -710,13 +710,13 @@ end
function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior, forcar, esta_porcentagem, whichRowLine, barras_container, use_animations)
--> primeiro colocado
--primeiro colocado
if (esta_barra.colocacao == 1) then
if (not tabela_anterior or tabela_anterior ~= esta_barra.minha_tabela or forcar) then
esta_barra:SetValue (100)
esta_barra:SetValue(100)
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
Details.FadeHandler.Fader (esta_barra, "out")
Details.FadeHandler.Fader(esta_barra, "out")
end
return self:RefreshBarra (esta_barra, instancia)
@@ -730,11 +730,11 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
if (use_animations) then
esta_barra.animacao_fim = esta_porcentagem
else
esta_barra:SetValue (esta_porcentagem)
esta_barra:SetValue(esta_porcentagem)
esta_barra.animacao_ignorar = true
end
Details.FadeHandler.Fader (esta_barra, "out")
Details.FadeHandler.Fader(esta_barra, "out")
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
@@ -746,26 +746,26 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
return self:RefreshBarra (esta_barra, instancia)
else
--> agora esta comparando se a tabela da barra diferente da tabela na atualizao anterior
if (not tabela_anterior or tabela_anterior ~= esta_barra.minha_tabela or forcar) then --> aqui diz se a barra do jogador mudou de posio ou se ela apenas ser atualizada
--agora esta comparando se a tabela da barra diferente da tabela na atualizao anterior
if (not tabela_anterior or tabela_anterior ~= esta_barra.minha_tabela or forcar) then --aqui diz se a barra do jogador mudou de posio ou se ela apenas ser atualizada
if (use_animations) then
esta_barra.animacao_fim = esta_porcentagem
else
esta_barra:SetValue (esta_porcentagem)
esta_barra:SetValue(esta_porcentagem)
esta_barra.animacao_ignorar = true
end
esta_barra.last_value = esta_porcentagem --> reseta o ultimo valor da barra
esta_barra.last_value = esta_porcentagem --reseta o ultimo valor da barra
return self:RefreshBarra (esta_barra, instancia)
elseif (esta_porcentagem ~= esta_barra.last_value) then --> continua mostrando a mesma tabela ento compara a porcentagem
--> apenas atualizar
elseif (esta_porcentagem ~= esta_barra.last_value) then --continua mostrando a mesma tabela ento compara a porcentagem
--apenas atualizar
if (use_animations) then
esta_barra.animacao_fim = esta_porcentagem
else
esta_barra:SetValue (esta_porcentagem)
esta_barra:SetValue(esta_porcentagem)
end
esta_barra.last_value = esta_porcentagem
@@ -785,14 +785,14 @@ function atributo_energy:RefreshBarra (esta_barra, instancia, from_resize)
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
end
--> icon
--icon
self:SetClassIcon (esta_barra.icone_classe, instancia, class)
--> texture color
--texture color
self:SetBarColors (esta_barra, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b)
--> left text
--left text
self:SetBarLeftText (esta_barra, instancia, enemy, arena_enemy, arena_ally, UsingCustomLeftText)
esta_barra.lineText1:SetSize (esta_barra:GetWidth() - esta_barra.lineText4:GetStringWidth() - 20, 15)
esta_barra.lineText1:SetSize(esta_barra:GetWidth() - esta_barra.lineText4:GetStringWidth() - 20, 15)
end
@@ -801,7 +801,7 @@ function atributo_energy:KeyNames (sub_atributo)
return "total"
end
---------> TOOLTIPS BIFURCAO ~tooltip
---------TOOLTIPS BIFURCAO ~tooltip
local resource_bg_color = {.1, .1, .1, 0.6}
local resource_bg_coords = {.6, 0.1, 0, 0.64453125}
@@ -826,7 +826,7 @@ function atributo_energy:ToolTip (instancia, numero, barra, keydown)
end
end
--> tooltip locals
--tooltip locals
local r, g, b
local barAlha = .6
@@ -861,10 +861,10 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
local total_regenerado = self.received
local name = self.nome
--> spells:
--spells:
local i = 1
for index, actor in _ipairs (container._ActorTable) do
for index, actor in _ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
for spellid, spell in _pairs (actor.spells._ActorTable) do
@@ -930,11 +930,11 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
_detalhes:AddTooltipBackgroundStatusbar (false, spell [2] / energy_tooltips_table [1][2] * 100)
end
--> players
--players
reset_tooltips_table()
i = 1
for index, actor in _ipairs (container._ActorTable) do
for index, actor in _ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
local on_self = actor.targets [name]
@@ -998,7 +998,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
end
--> player generators
--player generators
local allGeneratorSpells = {}
local allGenerated = 0
for spellid, spellObject in _pairs (self.spells._ActorTable) do
@@ -1032,14 +1032,14 @@ end
--------------------------------------------- // JANELA DETALHES // ---------------------------------------------
---------> DETALHES BIFURCAO
---------DETALHES BIFURCAO
function atributo_energy:MontaInfo()
if (info.sub_atributo <= 4) then
return self:MontaInfoRegenRecebido()
end
end
---------> DETALHES bloco da direita BIFURCAO
---------DETALHES bloco da direita BIFURCAO
function atributo_energy:MontaDetalhes (spellid, barra)
if (info.sub_atributo <= 4) then
return self:MontaDetalhesRegenRecebido (spellid, barra)
@@ -1063,10 +1063,10 @@ function atributo_energy:MontaInfoRegenRecebido()
local my_name = self.nome
local powertype = self.powertype
--> spells:
--spells:
local i = 1
for index, actor in _ipairs (container._ActorTable) do
for index, actor in _ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
for spellid, spell in _pairs (actor.spells._ActorTable) do
@@ -1106,7 +1106,7 @@ function atributo_energy:MontaInfoRegenRecebido()
gump:JI_AtualizaContainerBarras (amt)
local max_ = energy_tooltips_table [1][2]
for index, tabela in _ipairs (energy_tooltips_table) do
for index, tabela in _ipairs(energy_tooltips_table) do
if (tabela [2] < 1) then
break
@@ -1137,12 +1137,12 @@ function atributo_energy:MontaInfoRegenRecebido()
end
--> players:
--players:
reset_tooltips_table()
i = 1
for index, actor in _ipairs (container._ActorTable) do
for index, actor in _ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
local on_self = actor.targets [my_name]
@@ -1168,7 +1168,7 @@ function atributo_energy:MontaInfoRegenRecebido()
local max_fontes = energy_tooltips_table[1][2]
local barra
for index, tabela in _ipairs (energy_tooltips_table) do
for index, tabela in _ipairs(energy_tooltips_table) do
if (tabela [2] < 1) then
break
@@ -1182,15 +1182,15 @@ function atributo_energy:MontaInfoRegenRecebido()
end
if (index == 1) then
barra.textura:SetValue (100)
barra.textura:SetValue(100)
else
barra.textura:SetValue (tabela[2]/max_fontes*100)
barra.textura:SetValue(tabela[2]/max_fontes*100)
end
barra.lineText1:SetText (index..instancia.divisores.colocacao..tabela[1])
barra.lineText4:SetText (_detalhes:comma_value (tabela[2]) .. " (" .. _cstr("%.1f", tabela[2]/total_regenerado * 100) .. ")")
barra.lineText1:SetText(index..instancia.divisores.colocacao..tabela[1])
barra.lineText4:SetText(_detalhes:comma_value (tabela[2]) .. " (" .. _cstr("%.1f", tabela[2]/total_regenerado * 100) .. ")")
if (barra.mouse_over) then --> atualizar o tooltip
if (barra.mouse_over) then --atualizar o tooltip
if (barra.isAlvo) then
GameTooltip:Hide()
GameTooltip:SetOwner (barra, "ANCHOR_TOPRIGHT")
@@ -1213,7 +1213,7 @@ end
function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
for _, barra in _ipairs (info.barras3) do
for _, barra in _ipairs(info.barras3) do
barra:Hide()
end
@@ -1230,12 +1230,12 @@ function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
local spellid = nome
local who_name = self.nome
--> who is regenerating with the spell -> nome
--who is regenerating with the spell -> nome
--> spells:
--spells:
local i = 1
for index, actor in _ipairs (container._ActorTable) do
for index, actor in _ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
local spell = actor.spells._ActorTable [spellid]
if (spell) then
@@ -1264,7 +1264,7 @@ function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
local max_ = energy_tooltips_table [1][2]
local barra
for index, tabela in _ipairs (from) do
for index, tabela in _ipairs(from) do
if (tabela [2] < 1) then
break
@@ -1272,26 +1272,26 @@ function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
barra = barras [index]
if (not barra) then --> se a barra no existir, criar ela ento
if (not barra) then --se a barra no existir, criar ela ento
barra = gump:CriaNovaBarraInfo3 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
end
if (index == 1) then
barra.textura:SetValue (100)
barra.textura:SetValue(100)
else
barra.textura:SetValue (tabela[2] / max_ * 100)
barra.textura:SetValue(tabela[2] / max_ * 100)
end
barra.lineText1:SetText (index .. "." .. tabela [1])
barra.lineText4:SetText (_detalhes:comma_value (tabela[2]) .." (" .. _cstr("%.1f", tabela[2] / total_regenerado * 100) .."%)")
barra.lineText1:SetText(index .. "." .. tabela [1])
barra.lineText4:SetText(_detalhes:comma_value (tabela[2]) .." (" .. _cstr("%.1f", tabela[2] / total_regenerado * 100) .."%)")
barra.textura:SetStatusBarColor (_unpack (_detalhes.class_colors [tabela[3]]))
barra.icone:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small")
barra.icone:SetTexture("Interface\\AddOns\\Details\\images\\classes_small")
barra.icone:SetTexCoord (_unpack (_detalhes.class_coords [tabela[3]]))
barra:Show() --> mostra a barra
barra:Show() --mostra a barra
if (index == 15) then
break
@@ -1317,7 +1317,7 @@ function atributo_energy:MontaTooltipAlvos (esta_barra, index)
--print ("Mouse Over", actor, esta_barra.nome_inimigo, self.tipo)
if (actor) then
--> spells:
--spells:
local i = 1
for spellid, spell in _pairs (actor.spells._ActorTable) do
@@ -1338,7 +1338,7 @@ function atributo_energy:MontaTooltipAlvos (esta_barra, index)
--print (i, #energy_tooltips_table)
for index, spell in _ipairs (energy_tooltips_table) do
for index, spell in _ipairs(energy_tooltips_table) do
if (spell [2] < 1) then
break
end
@@ -1359,9 +1359,9 @@ function atributo_energy:Iniciar (iniciar)
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core functions
--core functions
--> atualize a funcao de abreviacao
--atualize a funcao de abreviacao
function atributo_energy:UpdateSelectedToKFunction()
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
FormatTooltipNumber = ToKFunctions [_detalhes.tooltip.abbreviation]
@@ -1369,7 +1369,7 @@ end
headerColor = _detalhes.tooltip.header_text_color
end
--> subtract total from a combat table
--subtract total from a combat table
function atributo_energy:subtract_total (combat_table)
--print ("reduce total:", combat_table.totals [class_type] [self.powertype], self.total, self.powertype, self.nome)
if (self.powertype and combat_table.totals [class_type] [self.powertype]) then
@@ -1391,11 +1391,11 @@ end
end
end
--> restaura e liga o ator com a sua shadow durante a inicializao
--restaura e liga o ator com a sua shadow durante a inicializao
function atributo_energy:r_onlyrefresh_shadow (actor)
--> criar uma shadow desse ator se ainda no tiver uma
--criar uma shadow desse ator se ainda no tiver uma
local overall_energy = _detalhes.tabela_overall [3]
local shadow = overall_energy._ActorTable [overall_energy._NameIndexTable [actor.nome]]
@@ -1413,7 +1413,7 @@ end
end
--> restaura a meta e indexes ao ator
--restaura a meta e indexes ao ator
_detalhes.refresh:r_atributo_energy (actor, shadow)
shadow.powertype = actor.powertype
@@ -1422,15 +1422,15 @@ end
shadow.resource_type = actor.resource_type
end
--> targets
--targets
for target_name, amount in _pairs (actor.targets) do
shadow.targets [target_name] = 0
end
--> spells
--spells
for spellid, habilidade in _pairs (actor.spells._ActorTable) do
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
--> spell targets
--spell targets
for target_name, amount in _pairs (habilidade.targets) do
habilidade_shadow.targets [target_name] = 0
end
@@ -1443,7 +1443,7 @@ end
local host_combat = combat_object or _detalhes.tabela_overall
--> criar uma shadow desse ator se ainda no tiver uma
--criar uma shadow desse ator se ainda no tiver uma
local overall_energy = host_combat [3]
local shadow = overall_energy._ActorTable [overall_energy._NameIndexTable [actor.nome]]
@@ -1461,17 +1461,17 @@ end
end
--> restaura a meta e indexes ao ator
--restaura a meta e indexes ao ator
if (not no_refresh) then
_detalhes.refresh:r_atributo_energy (actor, shadow)
end
--> pets (add unique pet names)
for _, petName in _ipairs (actor.pets) do
--pets (add unique pet names)
for _, petName in _ipairs(actor.pets) do
DetailsFramework.table.addunique (shadow.pets, petName)
end
--> total das energias (captura de dados)
--total das energias (captura de dados)
shadow.total = shadow.total + actor.total
shadow.received = shadow.received + actor.received
shadow.alternatepower = shadow.alternatepower + actor.alternatepower
@@ -1488,19 +1488,19 @@ end
shadow.resource_type = actor.resource_type
end
--> total no combate overall (captura de dados)
--total no combate overall (captura de dados)
host_combat.totals[3] [actor.powertype] = host_combat.totals[3] [actor.powertype] + actor.total
if (actor.grupo) then
host_combat.totals_grupo[3][actor.powertype] = host_combat.totals_grupo[3][actor.powertype] + actor.total
end
--> targets
--targets
for target_name, amount in _pairs (actor.targets) do
shadow.targets [target_name] = (shadow.targets [target_name] or 0) + amount
end
--> spells
--spells
for spellid, habilidade in _pairs (actor.spells._ActorTable) do
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
@@ -1508,7 +1508,7 @@ end
habilidade_shadow.total = habilidade_shadow.total + habilidade.total
habilidade_shadow.counter = habilidade_shadow.counter + habilidade.counter
--> spell targets
--spell targets
for target_name, amount in _pairs (habilidade.targets) do
habilidade_shadow.targets [target_name] = (habilidade_shadow.targets [target_name] or 0) + amount
end
@@ -1552,17 +1552,17 @@ atributo_energy.__add = function(tabela1, tabela2)
tabela1.resource = tabela1.resource + (tabela2.resource or 0)
end
--> total and received
--total and received
tabela1.total = tabela1.total + tabela2.total
tabela1.received = tabela1.received + tabela2.received
tabela1.alternatepower = tabela1.alternatepower + tabela2.alternatepower
--> targets
--targets
for target_name, amount in _pairs (tabela2.targets) do
tabela1.targets [target_name] = (tabela1.targets [target_name] or 0) + amount
end
--> spells
--spells
for spellid, habilidade in _pairs (tabela2.spells._ActorTable) do
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
@@ -1570,7 +1570,7 @@ atributo_energy.__add = function(tabela1, tabela2)
habilidade_tabela1.total = habilidade_tabela1.total + habilidade.total
habilidade_tabela1.counter = habilidade_tabela1.counter + habilidade.counter
--> spell targets
--spell targets
for target_name, amount in _pairs (habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount
end
@@ -1590,19 +1590,19 @@ atributo_energy.__sub = function(tabela1, tabela2)
tabela1.resource = tabela1.resource - (tabela2.resource or 0)
end
--> total and received
--total and received
tabela1.total = tabela1.total - tabela2.total
tabela1.received = tabela1.received - tabela2.received
tabela1.alternatepower = tabela1.alternatepower - tabela2.alternatepower
--> targets
--targets
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
--spells
for spellid, habilidade in _pairs (tabela2.spells._ActorTable) do
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
@@ -1610,7 +1610,7 @@ atributo_energy.__sub = function(tabela1, tabela2)
habilidade_tabela1.total = habilidade_tabela1.total - habilidade.total
habilidade_tabela1.counter = habilidade_tabela1.counter - habilidade.counter
--> spell targets
--spell targets
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
+22 -22
View File
@@ -4,13 +4,13 @@
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
--local pointers
local _ipairs = ipairs--lua local
local _pairs = pairs--lua local
local _UnitAura = UnitAura--api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
--constants
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
local habilidade_dano = _detalhes.habilidade_dano
@@ -21,7 +21,7 @@
local _recording_ability_with_buffs = false
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
--internals
function habilidade_dano:NovaTabela (id, link, token)
@@ -32,31 +32,31 @@
id = id, --spellid
successful_casted = 0, --successful casted times (only for enemies)
--> normal hits
--normal hits
n_min = 0,
n_max = 0,
n_amt = 0,
n_dmg = 0,
--> critical hits
--critical hits
c_min = 0,
c_max = 0,
c_amt = 0,
c_dmg = 0,
--> glacing hits
--glacing hits
g_amt = 0,
g_dmg = 0,
--> resisted
--resisted
r_amt = 0,
r_dmg = 0,
--> blocked
--blocked
b_amt = 0,
b_dmg = 0,
--> obsorved
--obsorved
a_amt = 0,
a_dmg = 0,
@@ -93,27 +93,27 @@
self.counter = self.counter + 1
if (resisted and resisted > 0) then
self.r_dmg = self.r_dmg+amount --> tabela.total o total de dano
self.r_amt = self.r_amt+1 --> tabela.total o total de dano
self.r_dmg = self.r_dmg+amount --tabela.total o total de dano
self.r_amt = self.r_amt+1 --tabela.total o total de dano
end
if (blocked and blocked > 0) then
self.b_dmg = self.b_dmg+amount --> amount o total de dano
self.b_amt = self.b_amt+1 --> amount o total de dano
self.b_dmg = self.b_dmg+amount --amount o total de dano
self.b_amt = self.b_amt+1 --amount o total de dano
end
if (absorbed and absorbed > 0) then
self.a_dmg = self.a_dmg+amount --> amount o total de dano
self.a_amt = self.a_amt+1 --> amount o total de dano
self.a_dmg = self.a_dmg+amount --amount o total de dano
self.a_amt = self.a_amt+1 --amount o total de dano
end
if (glacing) then
self.g_dmg = self.g_dmg+amount --> amount o total de dano
self.g_amt = self.g_amt+1 --> amount o total de dano
self.g_dmg = self.g_dmg+amount --amount o total de dano
self.g_amt = self.g_amt+1 --amount o total de dano
elseif (critical) then
self.c_dmg = self.c_dmg+amount --> amount o total de dano
self.c_amt = self.c_amt+1 --> amount o total de dano
self.c_dmg = self.c_dmg+amount --amount o total de dano
self.c_amt = self.c_amt+1 --amount o total de dano
if (amount > self.c_max) then
self.c_max = amount
end
@@ -145,14 +145,14 @@
end
if (token == "SPELL_PERIODIC_DAMAGE") then
--> precisa ver se ele tinha na hora que aplicou
--precisa ver se ele tinha na hora que aplicou
local SoloDebuffPower = _detalhes.tabela_vigente.SoloDebuffPower
if (SoloDebuffPower) then
local ThisDebuff = SoloDebuffPower [self.id]
if (ThisDebuff) then
local ThisDebuffOnTarget = ThisDebuff [serial]
if (ThisDebuffOnTarget) then
for index, buff_name in _ipairs (ThisDebuffOnTarget.buffs) do
for index, buff_name in _ipairs(ThisDebuffOnTarget.buffs) do
local buff_info = SpellBuffDetails [buff_name] or {["counter"] = 0, ["total"] = 0, ["critico"] = 0, ["critico_dano"] = 0}
buff_info.counter = buff_info.counter+1
buff_info.total = buff_info.total+amount
@@ -188,7 +188,7 @@
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
--core
function _detalhes:UpdateDamageAbilityGears()
_recording_ability_with_buffs = _detalhes.RecordPlayerAbilityWithBuffs
+8 -8
View File
@@ -4,7 +4,7 @@
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
--constants
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
local habilidade_cura = _detalhes.habilidade_cura
@@ -13,7 +13,7 @@
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
--internals
function habilidade_cura:NovaTabela (id, link)
@@ -22,26 +22,26 @@
id = id,
counter = 0,
--> totals
--totals
total = 0,
totalabsorb = 0,
absorbed = 0,
overheal = 0,
totaldenied = 0,
--> normal hits
--normal hits
n_min = 0,
n_max = 0,
n_amt = 0,
n_curado = 0,
--> critical hits
--critical hits
c_min = 0,
c_max = 0,
c_amt = 0,
c_curado = 0,
--> targets containers
--targets containers
targets = {},
targets_overheal = {},
targets_absorbs = {}
@@ -89,8 +89,8 @@
end
if (critical) then
self.c_curado = self.c_curado+amount --> amount o total de dano
self.c_amt = self.c_amt+1 --> amount o total de dano
self.c_curado = self.c_curado+amount --amount o total de dano
self.c_amt = self.c_amt+1 --amount o total de dano
if (amount > self.c_max) then
self.c_max = amount
end
+3 -3
View File
@@ -4,14 +4,14 @@
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
--local pointers
local _setmetatable = setmetatable --lua local
local _ipairs = ipairs --lua local
local _UnitAura = UnitAura --api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
--constants
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
local habilidade_energy = _detalhes.habilidade_e_energy
@@ -20,7 +20,7 @@
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
--internals
function habilidade_energy:NovaTabela (id, link, token)
+12 -12
View File
@@ -3,14 +3,14 @@
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
--local pointers
local _setmetatable = setmetatable --lua local
local _ipairs = ipairs --lua local
local _UnitAura = UnitAura --api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
--constants
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
local habilidade_misc = _detalhes.habilidade_misc
@@ -19,7 +19,7 @@
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
--internals
function habilidade_misc:NovaTabela (id, link, token)
@@ -58,14 +58,14 @@
if (spellName == "COOLDOWN") then
self.counter = self.counter + 1
--> target
--target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (spellName == "BUFF_UPTIME_REFRESH") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
self.refreshamt = self.refreshamt + 1
token.buff_uptime = token.buff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object
token.buff_uptime = token.buff_uptime + _detalhes._tempo - self.actived_at --token = actor misc object
end
self.actived_at = _detalhes._tempo
self.actived = true
@@ -73,7 +73,7 @@
elseif (spellName == "BUFF_UPTIME_OUT") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
token.buff_uptime = token.buff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object
token.buff_uptime = token.buff_uptime + _detalhes._tempo - self.actived_at --token = actor misc object
end
self.actived = false
self.actived_at = nil
@@ -84,7 +84,7 @@
self.appliedamt = self.appliedamt + 1
if (self.actived_at and self.actived and spellName == "DEBUFF_UPTIME_IN") then
--> ja esta ativo em outro mob e jogou num novo
--ja esta ativo em outro mob e jogou num novo
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
token.debuff_uptime = token.debuff_uptime + _detalhes._tempo - self.actived_at
end
@@ -103,7 +103,7 @@
elseif (spellName == "DEBUFF_UPTIME_OUT") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
token.debuff_uptime = token.debuff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object
token.debuff_uptime = token.debuff_uptime + _detalhes._tempo - self.actived_at --token = actor misc object
end
self.activedamt = self.activedamt - 1
@@ -126,12 +126,12 @@
self.interrompeu_oque [spellID] = self.interrompeu_oque [spellID] + 1
end
--> target
--target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (token == "SPELL_RESURRECT") then
self.ress = (self.ress or 0) + 1
--> target
--target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (token == "SPELL_DISPEL" or token == "SPELL_STOLEN") then
@@ -143,7 +143,7 @@
self.dispell_oque [spellID] = self.dispell_oque [spellID] + 1
end
--> target
--target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (token == "SPELL_AURA_BROKEN_SPELL" or token == "SPELL_AURA_BROKEN") then
@@ -155,7 +155,7 @@
self.cc_break_oque [spellID] = self.cc_break_oque [spellID] + 1
end
--> target
--target
self.targets [nome] = (self.targets [nome] or 0) + 1
end
+247 -247
View File
File diff suppressed because it is too large Load Diff
+68 -68
View File
@@ -8,7 +8,7 @@
local CONST_CLIENT_LANGUAGE = DF.ClientLanguage
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
--local pointers
local _UnitClass = UnitClass --api local
local _IsInInstance = IsInInstance --api local
@@ -29,7 +29,7 @@
local DeclineName = _G.DeclineName
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
--constants
local combatente = _detalhes.combatente
local container_combatentes = _detalhes.container_combatentes
@@ -53,7 +53,7 @@
local container_pets = {}
--> flags
--flags
local REACTION_HOSTILE = 0x00000040
local IS_GROUP_OBJECT = 0x00000007
local REACTION_FRIENDLY = 0x00000010
@@ -88,7 +88,7 @@
}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> api functions
--api functions
function container_combatentes:GetActor (actorName)
local index = self._NameIndexTable [actorName]
@@ -120,7 +120,7 @@
function container_combatentes:GetTotal (key)
local total = 0
key = key or "total"
for _, actor in _ipairs (self._ActorTable) do
for _, actor in _ipairs(self._ActorTable) do
total = total + (actor [key] or 0)
end
@@ -131,7 +131,7 @@
local total = 0
key = key or "total"
local roster = combat.raid_roster
for _, actor in _ipairs (self._ActorTable) do
for _, actor in _ipairs(self._ActorTable) do
if (roster [actor.nome]) then
total = total + (actor [key] or 0)
end
@@ -141,13 +141,13 @@
end
function container_combatentes:ListActors()
return _ipairs (self._ActorTable)
return _ipairs(self._ActorTable)
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
--internals
--> build a new actor container
--build a new actor container
function container_combatentes:NovoContainer (tipo_do_container, combat_table, combat_id)
local _newContainer = {
funcao_de_criacao = container_combatentes:FuncaoDeCriacao (tipo_do_container),
@@ -165,16 +165,16 @@
return _newContainer
end
--> try to get the actor class from name
--try to get the actor class from name
local function get_actor_class (novo_objeto, nome, flag, serial)
--> get spec
--get spec
if (_detalhes.track_specs) then
local have_cached = _detalhes.cached_specs [serial]
if (have_cached) then
novo_objeto.spec = have_cached
--> check is didn't changed the spec:
--check is didn't changed the spec:
if (_detalhes.streamer_config.quick_detection) then
--> validate the spec more times if on quick detection
--validate the spec more times if on quick detection
_detalhes:ScheduleTimer("ReGuessSpec", 2, {novo_objeto})
_detalhes:ScheduleTimer("ReGuessSpec", 4, {novo_objeto})
_detalhes:ScheduleTimer("ReGuessSpec", 6, {novo_objeto})
@@ -183,7 +183,7 @@
--print (nome, "spec em cache:", have_cached)
else
if (_detalhes.streamer_config.quick_detection) then
--> shoot detection early if in quick detection
--shoot detection early if in quick detection
_detalhes:ScheduleTimer("GuessSpec", 1, {novo_objeto, nil, 1})
else
_detalhes:ScheduleTimer("GuessSpec", 3, {novo_objeto, nil, 1})
@@ -198,7 +198,7 @@
return
else
if (flag) then
--> conferir se o jogador um player
--conferir se o jogador um player
if (_bit_band (flag, OBJECT_TYPE_PLAYER) ~= 0) then
novo_objeto.classe = "UNGROUPPLAYER"
return
@@ -234,11 +234,11 @@
return nickname
end
--> read the actor flag
--read the actor flag
local read_actor_flag = function(actorObject, dono_do_pet, serial, flag, nome, container_type)
if (flag) then
--> this is player actor
--this is player actor
if (_bit_band (flag, OBJECT_TYPE_PLAYER) ~= 0) then
if (not _detalhes.ignore_nicktag) then
actorObject.displayName = checkValidNickname(Details:GetNickname(nome, false, true), nome) --defaults to player name
@@ -295,9 +295,9 @@
end
end
--> pvp duel
--pvp duel
if (_detalhes.duel_candidates [serial]) then
--> check if is recent
--check if is recent
if (_detalhes.duel_candidates [serial]+20 > GetTime()) then
actorObject.grupo = true
actorObject.enemy = true
@@ -376,7 +376,7 @@
end
end
--> um pet
-- um pet
elseif (dono_do_pet) then
actorObject.owner = dono_do_pet
actorObject.ownerName = dono_do_pet.nome
@@ -393,7 +393,7 @@
--end
else
--> anything else that isn't a player or a pet
--anything else that isn't a player or a pet
actorObject.displayName = nome
--[=[
@@ -406,14 +406,14 @@
--]=]
end
--> check if is hostile
--check if is hostile
if (_bit_band (flag, REACTION_HOSTILE) ~= 0) then
if (_bit_band (flag, OBJECT_TYPE_PLAYER) == 0) then
--> is hostile and isn't a player
--is hostile and isn't a player
if (_bit_band (flag, OBJECT_TYPE_PETGUARDIAN) == 0) then
--> isn't a pet or guardian
--isn't a pet or guardian
actorObject.monster = true
end
@@ -452,12 +452,12 @@
end
end
--> check pet owner name with correct declension for ruRU locale (from user 'denis-kam' on github)
--check pet owner name with correct declension for ruRU locale (from user 'denis-kam' on github)
local find_name_declension = function(petTooltip, playerName)
--> 2 - male, 3 - female
--2 - male, 3 - female
for gender = 3, 2, -1 do
for declensionSet = 1, GetNumDeclensionSets(playerName, gender) do
--> check genitive case of player name
--check genitive case of player name
local genitive = DeclineName(playerName, gender, declensionSet)
if petTooltip:find(genitive) then
--print("found genitive: ", gender, declensionSet, playerName, petTooltip:find(genitive))
@@ -548,11 +548,11 @@
--print (nome, flag)
--end
--> verifica se um pet, se for confere se tem o nome do dono, se no tiver, precisa por
--verifica se um pet, se for confere se tem o nome do dono, se no tiver, precisa por
local dono_do_pet
serial = serial or "ns"
if (container_pets [serial]) then --> um pet reconhecido
if (container_pets [serial]) then -- um pet reconhecido
--[[statistics]]-- _detalhes.statistics.container_pet_calls = _detalhes.statistics.container_pet_calls + 1
local nome_dele, dono_nome, dono_serial, dono_flag = _detalhes.tabela_pets:PegaDono (serial, nome, flag)
@@ -561,11 +561,11 @@
dono_do_pet = self:PegarCombatente (dono_serial, dono_nome, dono_flag, true)
end
elseif (not pet_blacklist [serial]) then --> verifica se um pet
elseif (not pet_blacklist [serial]) then --verifica se um pet
pet_blacklist [serial] = true
--> try to find the owner
--try to find the owner
if (flag and _bit_band (flag, OBJECT_TYPE_PETGUARDIAN) ~= 0) then
--[[statistics]]-- _detalhes.statistics.container_unknow_pet = _detalhes.statistics.container_unknow_pet + 1
local find_nome, find_owner = find_pet_owner (serial, nome, flag, self)
@@ -575,13 +575,13 @@
end
end
--> pega o index no mapa
--pega o index no mapa
local index = self._NameIndexTable [nome]
--> retorna o actor
--retorna o actor
if (index) then
return self._ActorTable [index], dono_do_pet, nome
--> no achou, criar
--no achou, criar
elseif (criar) then
local novo_objeto = self.funcao_de_criacao (_, serial, nome)
@@ -589,7 +589,7 @@
novo_objeto.flag_original = flag
novo_objeto.serial = serial
--> seta a classe default para desconhecido, assim nenhum objeto fica com classe nil
--seta a classe default para desconhecido, assim nenhum objeto fica com classe nil
novo_objeto.classe = "UNKNOW"
local forceClass
@@ -625,7 +625,7 @@
-- tipo do container
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if (self.tipo == container_damage) then --> CONTAINER DAMAGE
if (self.tipo == container_damage) then --CONTAINER DAMAGE
local shouldScanOnce = get_actor_class (novo_objeto, nome, flag, serial)
@@ -641,13 +641,13 @@
end
end
if (novo_objeto.classe == "UNGROUPPLAYER") then --> is a player
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --> is hostile
if (novo_objeto.classe == "UNGROUPPLAYER") then --is a player
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --is hostile
novo_objeto.enemy = true
end
--> try to guess his class
if (self.shadow) then --> no executar 2x
--try to guess his class
if (self.shadow) then --no executar 2x
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
end
@@ -660,7 +660,7 @@
novo_objeto.avoidance = _detalhes:CreateActorAvoidanceTable()
end
elseif (self.tipo == container_heal) then --> CONTAINER HEALING
elseif (self.tipo == container_heal) then --CONTAINER HEALING
local shouldScanOnce = get_actor_class (novo_objeto, nome, flag, serial)
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "heal")
@@ -675,19 +675,19 @@
end
end
if (novo_objeto.classe == "UNGROUPPLAYER") then --> is a player
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --> is hostile
if (novo_objeto.classe == "UNGROUPPLAYER") then --is a player
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --is hostile
novo_objeto.enemy = true --print (nome.." EH UM INIMIGO -> " .. engRace)
end
--> try to guess his class
if (self.shadow) then --> no executar 2x
--try to guess his class
if (self.shadow) then --no executar 2x
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
end
end
elseif (self.tipo == container_energy) then --> CONTAINER ENERGY
elseif (self.tipo == container_energy) then --CONTAINER ENERGY
local shouldScanOnce = get_actor_class (novo_objeto, nome, flag, serial)
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "energy")
@@ -696,18 +696,18 @@
AddUnique (dono_do_pet.pets, nome)
end
if (novo_objeto.classe == "UNGROUPPLAYER") then --> is a player
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --> is hostile
if (novo_objeto.classe == "UNGROUPPLAYER") then --is a player
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --is hostile
novo_objeto.enemy = true
end
--> try to guess his class
if (self.shadow) then --> no executar 2x
--try to guess his class
if (self.shadow) then --no executar 2x
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
end
end
elseif (self.tipo == container_misc) then --> CONTAINER MISC
elseif (self.tipo == container_misc) then --CONTAINER MISC
local shouldScanOnce = get_actor_class (novo_objeto, nome, flag, serial)
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "misc")
@@ -716,20 +716,20 @@
AddUnique (dono_do_pet.pets, nome)
end
if (novo_objeto.classe == "UNGROUPPLAYER") then --> is a player
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --> is hostile
if (novo_objeto.classe == "UNGROUPPLAYER") then --is a player
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --is hostile
novo_objeto.enemy = true
end
--> try to guess his class
if (self.shadow) then --> no executar 2x
--try to guess his class
if (self.shadow) then --no executar 2x
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
end
end
elseif (self.tipo == container_damage_target) then --> CONTAINER ALVO DO DAMAGE
elseif (self.tipo == container_damage_target) then --CONTAINER ALVO DO DAMAGE
elseif (self.tipo == container_energy_target) then --> CONTAINER ALVOS DO ENERGY
elseif (self.tipo == container_energy_target) then --CONTAINER ALVOS DO ENERGY
novo_objeto.mana = 0
novo_objeto.e_rage = 0
@@ -742,10 +742,10 @@
novo_objeto.actived = false
novo_objeto.activedamt = 0
elseif (self.tipo == container_misc_target) then --> CONTAINER ALVOS DO MISC
elseif (self.tipo == container_misc_target) then --CONTAINER ALVOS DO MISC
elseif (self.tipo == container_friendlyfire) then --> CONTAINER FRIENDLY FIRE
elseif (self.tipo == container_friendlyfire) then --CONTAINER FRIENDLY FIRE
local shouldScanOnce = get_actor_class (novo_objeto, nome, serial)
@@ -759,8 +759,8 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- grava o objeto no mapa do container
local size = #self._ActorTable+1
self._ActorTable [size] = novo_objeto --> grava na tabela de indexes
self._NameIndexTable [nome] = size --> grava no hash map o index deste jogador
self._ActorTable [size] = novo_objeto --grava na tabela de indexes
self._NameIndexTable [nome] = size --grava no hash map o index deste jogador
if (_detalhes.is_in_battleground or _detalhes.is_in_arena) then
novo_objeto.pvp = true
@@ -790,7 +790,7 @@
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
--core
--_detalhes:AddToNpcIdCache (novo_objeto)
function _detalhes:AddToNpcIdCache (actor)
@@ -843,9 +843,9 @@
end
end
--> chama a funo para ser executada em todos os atores
--chama a funo para ser executada em todos os atores
function container_combatentes:ActorCallFunction (funcao, ...)
for index, actor in _ipairs (self._ActorTable) do
for index, actor in _ipairs(self._ActorTable) do
funcao (nil, actor, ...)
end
end
@@ -856,7 +856,7 @@
end
function container_combatentes:SortByKey (key)
assert (type (key) == "string", "Container:SortByKey() expects a keyname on parameter 1.")
assert (type(key) == "string", "Container:SortByKey() expects a keyname on parameter 1.")
bykey = key
_table_sort (self._ActorTable, sort)
self:remapear()
@@ -875,19 +875,19 @@
end
function _detalhes.refresh:r_container_combatentes (container, shadow)
--> reconstri meta e indexes
--reconstri meta e indexes
_setmetatable (container, _detalhes.container_combatentes)
container.__index = _detalhes.container_combatentes
container.funcao_de_criacao = container_combatentes:FuncaoDeCriacao (container.tipo)
--> repara mapa
--repara mapa
local mapa = {}
for i = 1, #container._ActorTable do
mapa [container._ActorTable[i].nome] = i
end
container._NameIndexTable = mapa
--> seta a shadow
--seta a shadow
container.shadow = shadow
end
+15 -15
View File
@@ -23,8 +23,8 @@ local is_ignored = _detalhes.pets_ignored
function container_pets:NovoContainer()
local esta_tabela = {}
_setmetatable (esta_tabela, _detalhes.container_pets)
esta_tabela.pets = {} --> armazena a pool -> uma dictionary com o [serial do pet] -> nome do dono
esta_tabela._ActorTable = {} --> armazena os 15 ultimos pets do jogador -> [jogador nome] -> {nil, nil, nil, ...}
esta_tabela.pets = {} --armazena a pool -> uma dictionary com o [serial do pet] -> nome do dono
esta_tabela._ActorTable = {} --armazena os 15 ultimos pets do jogador -> [jogador nome] -> {nil, nil, nil, ...}
return esta_tabela
end
@@ -34,12 +34,12 @@ local PET_EM_GRUPO = 0x00001007
function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
--> sair se o pet estiver na ignore
--sair se o pet estiver na ignore
if (is_ignored [pet_serial]) then
return
end
--> buscar pelo pet no container de pets
--buscar pelo pet no container de pets
local busca = self.pets [pet_serial]
if (busca) then
--in merging operations, make sure to not add the owner name a second time in the name
@@ -52,18 +52,18 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
pet_nome = pet_nome .. " <".. ownerName ..">"
end
--return busca[6] or pet_nome, busca[1], busca[2], busca[3] --> busca[6] poderia estar causando problemas
return pet_nome, busca[1], busca[2], busca[3] --> [1] dono nome [2] dono serial [3] dono flag
--return busca[6] or pet_nome, busca[1], busca[2], busca[3] --busca[6] poderia estar causando problemas
return pet_nome, busca[1], busca[2], busca[3] --[1] dono nome [2] dono serial [3] dono flag
end
--> buscar pelo pet na raide
--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)
dono_flags = 0x00000417 --> emulate sourceflag flag
dono_flags = 0x00000417 --emulate sourceflag flag
local nome, realm = _UnitName ("raid"..i)
if (realm and realm ~= "") then
@@ -77,7 +77,7 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
for i = 1, _GetNumGroupMembers()-1 do
if (pet_serial == _UnitGUID ("partypet"..i)) then
dono_serial = _UnitGUID ("party"..i)
dono_flags = 0x00000417 --> emulate sourceflag flag
dono_flags = 0x00000417 --emulate sourceflag flag
local nome, realm = _UnitName ("party"..i)
if (realm and realm ~= "") then
@@ -94,15 +94,15 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
dono_nome = _GetUnitName ("player")
dono_serial = _UnitGUID ("player")
if (_IsInGroup() or _IsInRaid()) then
dono_flags = 0x00000417 --> emulate sourceflag flag
dono_flags = 0x00000417 --emulate sourceflag flag
else
dono_flags = 0x00000411 --> emulate sourceflag flag
dono_flags = 0x00000411 --emulate sourceflag flag
end
end
end
if (dono_nome) then
self.pets [pet_serial] = {dono_nome, dono_serial, dono_flags, _detalhes._tempo, true, pet_nome, pet_serial} --> adicionada a flag emulada
self.pets [pet_serial] = {dono_nome, dono_serial, dono_flags, _detalhes._tempo, true, pet_nome, pet_serial} --adicionada a flag emulada
if (not pet_nome:find ("<")) then
pet_nome = pet_nome .. " <".. dono_nome ..">"
@@ -111,7 +111,7 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
return pet_nome, dono_nome, dono_serial, dono_flags
else
if (pet_flags and _bit_band (pet_flags, OBJECT_TYPE_PET) ~= 0) then --> um pet
if (pet_flags and _bit_band (pet_flags, OBJECT_TYPE_PET) ~= 0) then -- um pet
if (not _detalhes.pets_no_owner [pet_serial] and _bit_band (pet_flags, EM_GRUPO) ~= 0) then
_detalhes.pets_no_owner [pet_serial] = {pet_nome, pet_flags}
_detalhes:Msg ("couldn't find the owner of the pet:", pet_nome)
@@ -227,9 +227,9 @@ function _detalhes:WipePets()
end
function _detalhes:LimparPets()
--> erase old pet table by creating a new one
--erase old pet table by creating a new one
local newPetTable = {}
--> minimum of 90 minutes to clean a pet from the pet table data
--minimum of 90 minutes to clean a pet from the pet table data
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
+74 -74
View File
@@ -16,30 +16,30 @@ local container_pets = _detalhes.container_pets
local timeMachine = _detalhes.timeMachine
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> API
--API
--> reset only the overall data
--reset only the overall data
function _detalhes:ResetSegmentOverallData()
return historico:resetar_overall()
end
--> reset segments and overall data
--reset segments and overall data
function _detalhes:ResetSegmentData()
return historico:resetar()
end
--> returns the current active segment
--returns the current active segment
function _detalhes:GetCurrentCombat()
return _detalhes.tabela_vigente
end
--> returns a private table containing all stored segments
--returns a private table containing all stored segments
function _detalhes:GetCombatSegments()
return _detalhes.tabela_historico.tabelas
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internal
--internal
function historico:NovoHistorico()
local esta_tabela = {tabelas = {}}
@@ -55,13 +55,13 @@ function historico:adicionar_overall (tabela)
end
if (_detalhes.overall_clear_newboss) then
--> only for raids
--only for raids
if (tabela.instance_type == "raid" and tabela.is_boss) then
if (_detalhes.last_encounter ~= _detalhes.last_encounter2) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) new boss detected 'overall_clear_newboss' is true, cleaning overall data.")
end
for index, combat in ipairs (_detalhes.tabela_historico.tabelas) do
for index, combat in ipairs(_detalhes.tabela_historico.tabelas) do
combat.overall_added = false
end
historico:resetar_overall()
@@ -75,7 +75,7 @@ function historico:adicionar_overall (tabela)
end
local mythicInfo = tabela.is_mythic_dungeon
if (mythicInfo) then
--> do not add overall mythic+ dungeon segments
--do not add overall mythic+ dungeon segments
if (mythicInfo.TrashOverallSegment) then
_detalhes:Msg ("error > attempt to add a TrashOverallSegment > func historico:adicionar_overall()")
return
@@ -85,7 +85,7 @@ function historico:adicionar_overall (tabela)
end
end
--> store the segments added to the overall data
--store the segments added to the overall data
_detalhes.tabela_overall.segments_added = _detalhes.tabela_overall.segments_added or {}
local this_clock = tabela.data_inicio
@@ -148,24 +148,24 @@ end
function _detalhes:CanAddCombatToOverall (tabela)
--> already added
--already added
if (tabela.overall_added) then
return false
end
--> already scheduled to add
--already scheduled to add
if (_detalhes.schedule_add_to_overall) then --deprecated
for _, combat in ipairs (_detalhes.schedule_add_to_overall) do
for _, combat in ipairs(_detalhes.schedule_add_to_overall) do
if (combat == tabela) then
return false
end
end
end
--> special cases
--special cases
local mythicInfo = tabela.is_mythic_dungeon
if (mythicInfo) then
--> do not add overall mythic+ dungeon segments
--do not add overall mythic+ dungeon segments
if (mythicInfo.TrashOverallSegment) then
return false
elseif (mythicInfo.OverallSegment) then
@@ -173,7 +173,7 @@ function _detalhes:CanAddCombatToOverall (tabela)
end
end
--> raid boss - flag 0x1
--raid boss - flag 0x1
if (bit.band (_detalhes.overall_flag, 0x1) ~= 0) then
if (tabela.is_boss and tabela.instance_type == "raid" and not tabela.is_pvp) then
if (tabela:GetCombatTime() >= 30) then
@@ -182,33 +182,33 @@ function _detalhes:CanAddCombatToOverall (tabela)
end
end
--> raid trash - flag 0x2
--raid trash - flag 0x2
if (bit.band (_detalhes.overall_flag, 0x2) ~= 0) then
if (tabela.is_trash and tabela.instance_type == "raid") then
return true
end
end
--> dungeon boss - flag 0x4
--dungeon boss - flag 0x4
if (bit.band (_detalhes.overall_flag, 0x4) ~= 0) then
if (tabela.is_boss and tabela.instance_type == "party" and not tabela.is_pvp) then
return true
end
end
--> dungeon trash - flag 0x8
--dungeon trash - flag 0x8
if (bit.band (_detalhes.overall_flag, 0x8) ~= 0) then
if ((tabela.is_trash or tabela.is_mythic_dungeon_trash) and tabela.instance_type == "party") then
return true
end
end
--> any combat
--any combat
if (bit.band (_detalhes.overall_flag, 0x10) ~= 0) then
return true
end
--> is a PvP combat
--is a PvP combat
if (tabela.is_pvp or tabela.is_arena) then
return true
end
@@ -216,25 +216,25 @@ function _detalhes:CanAddCombatToOverall (tabela)
return false
end
--> sai do combate, chamou adicionar a tabela ao histrico
--sai do combate, chamou adicionar a tabela ao histrico
function historico:adicionar (tabela)
local tamanho = #self.tabelas
--> verifica se precisa dar UnFreeze()
if (tamanho < _detalhes.segments_amount) then --> vai preencher um novo index vazio
--verifica se precisa dar UnFreeze()
if (tamanho < _detalhes.segments_amount) then --vai preencher um novo index vazio
local ultima_tabela = self.tabelas[tamanho]
if (not ultima_tabela) then --> no ha tabelas no historico, esta ser a #1
--> pega a tabela do combate atual
if (not ultima_tabela) then --no ha tabelas no historico, esta ser a #1
--pega a tabela do combate atual
ultima_tabela = tabela
end
_detalhes:InstanciaCallFunction (_detalhes.CheckFreeze, tamanho+1, ultima_tabela)
end
--> add to history table
--add to history table
_table_insert (self.tabelas, 1, tabela)
--> count boss tries
--count boss tries
local boss = tabela.is_boss and tabela.is_boss.name
if (boss) then
local try_number = _detalhes.encounter_counter [boss]
@@ -260,7 +260,7 @@ function historico:adicionar (tabela)
tabela.is_boss.try_number = try_number
end
--> see if can add the encounter to overall data
--see if can add the encounter to overall data
local canAddToOverall = _detalhes:CanAddCombatToOverall (tabela)
if (canAddToOverall) then
@@ -277,25 +277,25 @@ function historico:adicionar (tabela)
--end
end
--> erase trash segments
--erase trash segments
if (self.tabelas[2]) then
local _segundo_combate = self.tabelas[2]
local container_damage = _segundo_combate [1]
local container_heal = _segundo_combate [2]
--regular cleanup
for _, jogador in ipairs (container_damage._ActorTable) do
--> remover a tabela de last events
for _, jogador in ipairs(container_damage._ActorTable) do
--remover a tabela de last events
jogador.last_events_table = nil
--> verifica se ele ainda esta registrado na time machine
--verifica se ele ainda esta registrado na time machine
if (jogador.timeMachine) then
jogador:DesregistrarNaTimeMachine()
end
end
for _, jogador in ipairs (container_heal._ActorTable) do
--> remover a tabela de last events
for _, jogador in ipairs(container_heal._ActorTable) do
--remover a tabela de last events
jogador.last_events_table = nil
--> verifica se ele ainda esta registrado na time machine
--verifica se ele ainda esta registrado na time machine
if (jogador.timeMachine) then
jogador:DesregistrarNaTimeMachine()
end
@@ -307,20 +307,20 @@ function historico:adicionar (tabela)
if (_terceiro_combate and not _terceiro_combate.is_mythic_dungeon_segment) then
if ((_terceiro_combate.is_trash and not _terceiro_combate.is_boss) or (_terceiro_combate.is_temporary)) then
--> verificar novamente a time machine
for _, jogador in ipairs (_terceiro_combate [1]._ActorTable) do --> damage
--verificar novamente a time machine
for _, jogador in ipairs(_terceiro_combate [1]._ActorTable) do --damage
if (jogador.timeMachine) then
jogador:DesregistrarNaTimeMachine()
end
end
for _, jogador in ipairs (_terceiro_combate [2]._ActorTable) do --> heal
for _, jogador in ipairs(_terceiro_combate [2]._ActorTable) do --heal
if (jogador.timeMachine) then
jogador:DesregistrarNaTimeMachine()
end
end
--> remover
--remover
_table_remove (self.tabelas, 3)
_detalhes:SendEvent ("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
_detalhes:SendEvent("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
end
end
@@ -329,12 +329,12 @@ function historico:adicionar (tabela)
end
--> verifica se precisa apagar a ltima tabela do histrico
--verifica se precisa apagar a ltima tabela do histrico
if (#self.tabelas > _detalhes.segments_amount) then
local combat_removed, combat_index
--> verifica se esto dando try em um boss e remove o combate menos relevante
--verifica se esto dando try em um boss e remove o combate menos relevante
local bossid = tabela.is_boss and tabela.is_boss.id
local last_segment = self.tabelas [#self.tabelas]
@@ -366,31 +366,31 @@ function historico:adicionar (tabela)
combat_index = #self.tabelas
end
--> verificar novamente a time machine
for _, jogador in ipairs (combat_removed [1]._ActorTable) do --> damage
--verificar novamente a time machine
for _, jogador in ipairs(combat_removed [1]._ActorTable) do --damage
if (jogador.timeMachine) then
jogador:DesregistrarNaTimeMachine()
end
end
for _, jogador in ipairs (combat_removed [2]._ActorTable) do --> heal
for _, jogador in ipairs(combat_removed [2]._ActorTable) do --heal
if (jogador.timeMachine) then
jogador:DesregistrarNaTimeMachine()
end
end
--> remover
--remover
_table_remove (self.tabelas, combat_index)
_detalhes:SendEvent ("DETAILS_DATA_SEGMENTREMOVED")
_detalhes:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
end
--> chama a funo que ir atualizar as instncias com segmentos no histrico
--chama a funo que ir atualizar as instncias com segmentos no histrico
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos_AfterCombat, self)
--_detalhes:InstanciaCallFunction (_detalhes.AtualizarJanela)
end
--> verifica se tem alguma instancia congelada mostrando o segmento recm liberado
--verifica se tem alguma instancia congelada mostrando o segmento recm liberado
function _detalhes:CheckFreeze (instancia, index_liberado, tabela)
if (instancia.freezed) then --> esta congelada
if (instancia.freezed) then --esta congelada
if (instancia.segmento == index_liberado) then
instancia.showing = tabela
instancia:UnFreeze()
@@ -423,12 +423,12 @@ function historico:resetar_overall()
-- _detalhes:Msg (Loc ["STRING_ERASE_IN_COMBAT"])
-- _detalhes.schedule_remove_overall = true
--else
--> fecha a janela de informaes do jogador
--fecha a janela de informaes do jogador
_detalhes:FechaJanelaInfo()
_detalhes.tabela_overall = combate:NovaTabela()
for index, instancia in ipairs (_detalhes.tabela_instancias) do
for index, instancia in ipairs(_detalhes.tabela_instancias) do
if (instancia.ativa and instancia.segmento == -1) then
instancia:InstanceReset()
instancia:ReajustaGump()
@@ -440,7 +440,7 @@ function historico:resetar_overall()
end
--end
--> stop bar testing if any
--stop bar testing if any
_detalhes:StopTestBarUpdate()
_detalhes:ClockPluginTickOnSegment()
@@ -452,32 +452,32 @@ function historico:resetar()
_detalhes.bosswindow:Reset()
end
--> stop bar testing if any
--stop bar testing if any
_detalhes:StopTestBarUpdate()
if (_detalhes.tabela_vigente.verifica_combate) then --> finaliza a checagem se esta ou no no combate
if (_detalhes.tabela_vigente.verifica_combate) then --finaliza a checagem se esta ou no no combate
_detalhes:CancelTimer (_detalhes.tabela_vigente.verifica_combate)
end
_detalhes.last_closed_combat = nil
--> remove mythic dungeon schedules if any
--remove mythic dungeon schedules if any
_detalhes.schedule_mythicdungeon_trash_merge = nil
_detalhes.schedule_mythicdungeon_endtrash_merge = nil
_detalhes.schedule_mythicdungeon_overallrun_merge = nil
--> clear other schedules
--clear other schedules
_detalhes.schedule_flag_boss_components = nil
_detalhes.schedule_store_boss_encounter = nil
--_detalhes.schedule_remove_overall = nil
--> fecha a janela de informaes do jogador
--fecha a janela de informaes do jogador
_detalhes:FechaJanelaInfo()
--> empty temporary tables
--empty temporary tables
_detalhes.atributo_damage:ClearTempTables()
for _, combate in ipairs (_detalhes.tabela_historico.tabelas) do
for _, combate in ipairs(_detalhes.tabela_historico.tabelas) do
_table_wipe (combate)
end
_table_wipe (_detalhes.tabela_vigente)
@@ -489,7 +489,7 @@ function historico:resetar()
end
_detalhes:LimparPets()
_detalhes:ResetSpecCache (true) --> forar
_detalhes:ResetSpecCache (true) --forar
-- novo container de historico
_detalhes.tabela_historico = historico:NovoHistorico() --joga fora a tabela antiga e cria uma nova
@@ -507,13 +507,13 @@ function historico:resetar()
--zera o contador de combates
_detalhes:NumeroCombate (0)
--> limpa o cache de magias
--limpa o cache de magias
_detalhes:ClearSpellCache()
--> limpa a tabela de escudos
--limpa a tabela de escudos
_table_wipe (_detalhes.escudos)
--> reinicia a time machine
--reinicia a time machine
timeMachine:Reiniciar()
_table_wipe (_detalhes.cache_damage_group)
@@ -521,7 +521,7 @@ function historico:resetar()
_detalhes:UpdateParserGears()
if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
--> workarround for the "script run too long" issue while outside the combat lockdown
--workarround for the "script run too long" issue while outside the combat lockdown
local cleargarbage = function()
collectgarbage()
end
@@ -538,9 +538,9 @@ function historico:resetar()
_detalhes:InstanciaCallFunction(_detalhes.ResetaGump) --_detalhes:ResetaGump ("de todas as instancias")
_detalhes:InstanciaCallFunction(Details.FadeHandler.Fader, "IN", nil, "barras")
_detalhes:RefreshMainWindow (-1) --atualiza todas as instancias
_detalhes:RefreshMainWindow(-1) --atualiza todas as instancias
_detalhes:SendEvent ("DETAILS_DATA_RESET", nil, nil)
_detalhes:SendEvent("DETAILS_DATA_RESET", nil, nil)
end
@@ -558,7 +558,7 @@ end
if (_terceiro_combate) then
if (_terceiro_combate.is_trash and _segundo_combate.is_trash and not _terceiro_combate.is_boss and not _segundo_combate.is_boss) then
--> tabela 2 deve ser deletada e somada a tabela 1
--tabela 2 deve ser deletada e somada a tabela 1
if (_detalhes.debug) then
detalhes:Msg ("(debug) concatenating two trash segments.")
end
@@ -568,20 +568,20 @@ end
_segundo_combate.is_trash = true
--> verificar novamente a time machine
for _, jogador in ipairs (_terceiro_combate [1]._ActorTable) do --> damage
--verificar novamente a time machine
for _, jogador in ipairs(_terceiro_combate [1]._ActorTable) do --damage
if (jogador.timeMachine) then
jogador:DesregistrarNaTimeMachine()
end
end
for _, jogador in ipairs (_terceiro_combate [2]._ActorTable) do --> heal
for _, jogador in ipairs(_terceiro_combate [2]._ActorTable) do --heal
if (jogador.timeMachine) then
jogador:DesregistrarNaTimeMachine()
end
end
--> remover
--remover
_table_remove (self.tabelas, 3)
_detalhes:SendEvent ("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
_detalhes:SendEvent("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
end
end
--]]
+4 -4
View File
@@ -4,12 +4,12 @@ local _detalhes = _G._detalhes
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
--local pointers
local _setmetatable = setmetatable --lua local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
--constants
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
local container_damage = _detalhes.container_type.CONTAINER_DAMAGE_CLASS
@@ -30,7 +30,7 @@ local _
local container_habilidades = _detalhes.container_habilidades
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
--internals
function container_habilidades:NovoContainer (tipo_do_container)
local _newContainer = {
@@ -100,7 +100,7 @@ local _
end
function _detalhes.refresh:r_container_habilidades (container, shadow)
--> reconstri meta e indexes
--reconstri meta e indexes
_setmetatable (container, _detalhes.container_habilidades)
container.__index = _detalhes.container_habilidades
local func_criacao = container_habilidades:FuncaoDeCriacao (container.tipo)
+21 -21
View File
@@ -1,20 +1,20 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> attributes functions for customs
--> DAMAGEDONE
--attributes functions for customs
--DAMAGEDONE
--> customized display script
--customized display script
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> attributes functions for customs
--> DAMAGEDONE
--attributes functions for customs
--DAMAGEDONE
--> customized display script
--customized display script
local _detalhes = _G._detalhes
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
--local pointers
local _cstr = string.format --lua local
local _math_floor = math.floor --lua local
@@ -40,7 +40,7 @@ local _GetNumRaidMembers = GetNumRaidMembers or GetNumGroupMembers -- api local
local _GetUnitName = GetUnitName -- api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
--constants
local atributo_custom = _detalhes.atributo_custom
@@ -106,7 +106,7 @@ local function SortOrder (main_table, func, ...)
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> damagedone tooltip
--damagedone tooltip
function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, instance)
@@ -199,7 +199,7 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
--for index, pet_name in ipairs (actor.pets) do
--for index, pet_name in ipairs(actor.pets) do
--end
end
@@ -210,23 +210,23 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> damagedone search
--damagedone search
function atributo_custom:damagedone (actor, source, target, spellid, combat, instance_container)
if (spellid) then --> spell is always damagedone
if (spellid) then --spell is always damagedone
local spell = actor.spells._ActorTable [spellid]
if (spell) then
if (target) then
if (target == "[all]") then
for target_name, amount in _pairs (spell.targets) do
--> add amount
--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
--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
--add to processed container
if (not atributo_custom._TargetActorsProcessed [target_name]) then
atributo_custom._TargetActorsProcessed [target_name] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
@@ -238,10 +238,10 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
local roster = combat.raid_roster
for target_name, amount in _pairs (spell.targets) do
if (roster [target_name]) then
--> add amount
--add amount
instance_container:AddValue (combat (1, target_name), amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
--> add to processed container
--add to processed container
if (not atributo_custom._TargetActorsProcessed [target_name]) then
atributo_custom._TargetActorsProcessed [target_name] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
@@ -253,10 +253,10 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
elseif (target == "[player]") then
local target_amount = spell.targets [_detalhes.playername]
if (target_amount) then
--> add amount
--add amount
instance_container:AddValue (combat (1, _detalhes.playername), target_amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
--> add to processed container
--add to processed container
if (not atributo_custom._TargetActorsProcessed [_detalhes.playername]) then
atributo_custom._TargetActorsProcessed [_detalhes.playername] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
@@ -267,10 +267,10 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
else
local target_amount = actor.targets [target]
if (target_amount) then
--> add amount
--add amount
instance_container:AddValue (combat (1, target), target_amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
--> add to processed container
--add to processed container
if (not atributo_custom._TargetActorsProcessed [target]) then
atributo_custom._TargetActorsProcessed [target] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
+14 -14
View File
@@ -7,7 +7,7 @@
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
--local pointers
local _cstr = string.format --lua local
local _math_floor = math.floor --lua local
@@ -33,7 +33,7 @@
local _GetUnitName = GetUnitName -- api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
--constants
local atributo_custom = _detalhes.atributo_custom
@@ -99,7 +99,7 @@
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> healing done tooltip
--healing done tooltip
function atributo_custom:healdoneTooltip (actor, target, spellid, combat, instance)
@@ -198,24 +198,24 @@
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> healing done search
--healing done search
function atributo_custom:healdone (actor, source, target, spellid, combat, instance_container)
if (spellid) then --> spell is always healing done
if (spellid) then --spell is always healing done
local spell = actor.spells._ActorTable [spellid]
local melee = actor.spells._ActorTable [1]
if (spell) then
if (target) then
if (target == "[all]") then
for target_name, amount in _pairs (spell.targets) do
--> add amount
--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
--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
--add to processed container
if (not atributo_custom._TargetActorsProcessed [target_name]) then
atributo_custom._TargetActorsProcessed [target_name] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
@@ -227,10 +227,10 @@
local roster = combat.raid_roster
for target_name, amount in _pairs (spell.targets) do
if (roster [target_name]) then
--> add amount
--add amount
instance_container:AddValue (combat (1, target_name), amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
--> add to processed container
--add to processed container
if (not atributo_custom._TargetActorsProcessed [target_name]) then
atributo_custom._TargetActorsProcessed [target_name] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
@@ -242,10 +242,10 @@
elseif (target == "[player]") then
local target_amount = spell.targets [_detalhes.playername]
if (target_amount) then
--> add amount
--add amount
instance_container:AddValue (combat (1, _detalhes.playername), target_amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
--> add to processed container
--add to processed container
if (not atributo_custom._TargetActorsProcessed [_detalhes.playername]) then
atributo_custom._TargetActorsProcessed [_detalhes.playername] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
@@ -256,10 +256,10 @@
else
local target_amount = actor.targets [target]
if (target_amount) then
--> add amount
--add amount
instance_container:AddValue (combat (1, target), target_amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
--> add to processed container
--add to processed container
if (not atributo_custom._TargetActorsProcessed [target]) then
atributo_custom._TargetActorsProcessed [target] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
+7 -7
View File
@@ -12,7 +12,7 @@ local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
function _detalhes:ResetInstanceConfig (maintainsnap)
for key, value in pairs (_detalhes.instance_defaults) do
if (type (value) == "table") then
if (type(value) == "table") then
self [key] = Details.CopyTable (value)
else
self [key] = value
@@ -59,7 +59,7 @@ _detalhes.instance_skin_ignored_values = {
function _detalhes:ResetInstanceConfigKeepingValues (maintainsnap)
for key, value in pairs (_detalhes.instance_defaults) do
if (not _detalhes.instance_skin_ignored_values [key]) then
if (type (value) == "table") then
if (type(value) == "table") then
self [key] = Details.CopyTable (value)
else
self [key] = value
@@ -77,16 +77,16 @@ end
function _detalhes:LoadInstanceConfig()
for key, value in pairs (_detalhes.instance_defaults) do
if (self [key] == nil) then
if (type (value) == "table") then
if (type(value) == "table") then
self [key] = Details.CopyTable (_detalhes.instance_defaults [key])
else
self [key] = value
end
elseif (type (value) == "table") then
elseif (type(value) == "table") then
for key2, value2 in pairs (value) do
if (self [key] [key2] == nil) then
if (type (value2) == "table") then
if (type(value2) == "table") then
self [key] [key2] = Details.CopyTable (_detalhes.instance_defaults [key] [key2])
else
self [key] [key2] = value2
@@ -99,13 +99,13 @@ end
_detalhes.instance_defaults = {
--> click through settings
--click through settings
clickthrough_toolbaricons = false,
clickthrough_rows = false,
clickthrough_window = false,
clickthrough_incombatonly = true,
--> window settings
--window settings
ignore_mass_showhide = false,
--skin
skin = _detalhes.default_skin_to_use,