Code cleanups, Bug Fixes, Show plugins in the breakdown window, added damage taken and friendly fire tp breakdown
This commit is contained in:
+243
-209
@@ -78,7 +78,7 @@
|
||||
|
||||
local headerColor = {1, 0.9, 0.0, 1}
|
||||
|
||||
local info = Details.playerDetailWindow
|
||||
local breakdownWindowFrame = Details.BreakdownWindowFrame
|
||||
local keyName
|
||||
|
||||
local OBJECT_TYPE_PLAYER = 0x00000400
|
||||
@@ -4011,42 +4011,70 @@ end
|
||||
|
||||
---------DETALHES BIFURCA��O ~detalhes ~detailswindow ~bi
|
||||
function damageClass:MontaInfo()
|
||||
if (info.sub_atributo == 1 or info.sub_atributo == 2 or info.sub_atributo == 6) then --damage done & dps
|
||||
return self:MontaInfoDamageDone()
|
||||
elseif (info.sub_atributo == 3) then --damage taken
|
||||
return self:MontaInfoDamageTaken()
|
||||
elseif (info.sub_atributo == 4) then --friendly fire
|
||||
return self:MontaInfoFriendlyFire()
|
||||
if (breakdownWindowFrame.sub_atributo == 1 or breakdownWindowFrame.sub_atributo == 2 or breakdownWindowFrame.sub_atributo == 6) then --damage done & dps
|
||||
return self:MontaInfoDamageDone() --has new code for the new destails window | left scroll and 6 blocks implemented
|
||||
elseif (breakdownWindowFrame.sub_atributo == 3) then --damage taken
|
||||
return self:MontaInfoDamageTaken() --has new code for the new destails window | left and right scrolls implemented
|
||||
elseif (breakdownWindowFrame.sub_atributo == 4) then --friendly fire
|
||||
return self:MontaInfoFriendlyFire() --has new code for the new destails window | left scroll implemeneted (need to implemente the right scroll yet)
|
||||
end
|
||||
end
|
||||
|
||||
---------DETALHES bloco da direita BIFURCA��O
|
||||
function damageClass:MontaDetalhes (spellid, barra, instancia)
|
||||
if (info.sub_atributo == 1 or info.sub_atributo == 2) then
|
||||
return self:MontaDetalhesDamageDone (spellid, barra, instancia)
|
||||
function damageClass:MontaDetalhes (spellid, barra, instancia) --these functions were used to fill the 5 blocks from the old breakdown window
|
||||
if (breakdownWindowFrame.sub_atributo == 1 or breakdownWindowFrame.sub_atributo == 2) then
|
||||
return self:MontaDetalhesDamageDone (spellid, barra, instancia) --deprecated
|
||||
|
||||
elseif (info.sub_atributo == 3) then
|
||||
elseif (breakdownWindowFrame.sub_atributo == 3) then
|
||||
return self:MontaDetalhesDamageTaken (spellid, barra, instancia)
|
||||
|
||||
elseif (info.sub_atributo == 4) then
|
||||
elseif (breakdownWindowFrame.sub_atributo == 4) then
|
||||
return self:MontaDetalhesFriendlyFire (spellid, barra, instancia)
|
||||
|
||||
elseif (info.sub_atributo == 6) then
|
||||
elseif (breakdownWindowFrame.sub_atributo == 6) then
|
||||
if (bitBand(self.flag_original, 0x00000400) ~= 0) then --� um jogador
|
||||
return self:MontaDetalhesDamageDone (spellid, barra, instancia)
|
||||
return self:MontaDetalhesDamageDone (spellid, barra, instancia) --deprecated
|
||||
end
|
||||
return self:MontaDetalhesEnemy (spellid, barra, instancia)
|
||||
end
|
||||
end
|
||||
|
||||
local friendlyFireSpellSourcesHeadersAllowed = {icon = true, name = true, rank = true, amount = true, persecond = true, percent = true}
|
||||
---when hovering over the player name in the breakdown window, this function will be called to build a the list of spells used to inflict damage on that player
|
||||
---@param friendlyFireAggressorActor actordamage
|
||||
---@param targetName string
|
||||
function damageClass.BuildFriendlySpellListFromAgressor(friendlyFireAggressorActor, targetName)
|
||||
---@type combat
|
||||
local combatObject = Details:GetCombatFromBreakdownWindow()
|
||||
|
||||
---@type friendlyfiretable
|
||||
local friendlyFireTable = friendlyFireAggressorActor.friendlyfire[targetName]
|
||||
|
||||
local totalDamage = friendlyFireTable.total
|
||||
local spellsUsed = friendlyFireTable.spells
|
||||
|
||||
--create the table which will be returned with the data
|
||||
---@type {topValue: number, totalValue: number, headersAllowed: table, combatTime: number}
|
||||
local resultTable = {topValue = 0, totalValue = totalDamage, headersAllowed = friendlyFireSpellSourcesHeadersAllowed, combatTime = combatObject:GetCombatTime()}
|
||||
|
||||
--iterate among the spells used by the aggressorActor
|
||||
for spellId, amountDamage in pairs(spellsUsed) do
|
||||
--add the spell to the list
|
||||
local spellName = GetSpellInfo(spellId)
|
||||
resultTable[#resultTable+1] = {spellId = spellId, total = amountDamage, petName = "", spellScholl = Details.spell_school_cache[spellName] or 1}
|
||||
end
|
||||
|
||||
return resultTable
|
||||
end
|
||||
|
||||
------ Friendly Fire
|
||||
local friendlyFireHeadersAllowed = {icon = true, name = true, rank = true, amount = true, persecond = true, percent = true}
|
||||
---build the friendly fire list, the list contains players who were damaged by this actor.
|
||||
function damageClass:MontaInfoFriendlyFire() --~friendlyfire ~friendly ~ff
|
||||
---@type actordamage
|
||||
local actorObject = self
|
||||
---@type instance
|
||||
local instance = info.instancia
|
||||
local instance = breakdownWindowFrame.instancia
|
||||
---@type combat
|
||||
local combatObject = instance:GetCombat()
|
||||
---@type string
|
||||
@@ -4064,13 +4092,14 @@ function damageClass:MontaInfoFriendlyFire() --~friendlyfire ~friendly ~ff
|
||||
for targetName, friendlyFireTable in pairs(damagedPlayers) do
|
||||
local amountOfFriendlyFire = friendlyFireTable.total
|
||||
if (amountOfFriendlyFire > 0) then
|
||||
---@type actordamage this is an actor who was damaged by the friendly fire of the actorObject
|
||||
local targetActorObject = damageContainer:GetActor(targetName)
|
||||
if (targetActorObject) then
|
||||
---@type texturetable
|
||||
local iconTable = Details:GetActorIcon(targetActorObject)
|
||||
|
||||
---@type {name: string, amount: number, icon: texturetable}
|
||||
local ffTable = {name = targetName, total = amountOfFriendlyFire, icon = iconTable}
|
||||
---@type {name: string, amount: number, icon: texturetable, class: string}
|
||||
local ffTable = {name = targetName, total = amountOfFriendlyFire, icon = iconTable, class = targetActorObject:Class()}
|
||||
|
||||
resultTable[#resultTable+1] = ffTable
|
||||
end
|
||||
@@ -4084,151 +4113,204 @@ function damageClass:MontaInfoFriendlyFire() --~friendlyfire ~friendly ~ff
|
||||
Details222.BreakdownWindow.SendGenericData(resultTable, actorObject, combatObject, instance)
|
||||
|
||||
if true then return end
|
||||
do
|
||||
local instancia = breakdownWindowFrame.instancia
|
||||
local combat = instancia:GetShowingCombat()
|
||||
local barras = breakdownWindowFrame.barras1
|
||||
local barras2 = breakdownWindowFrame.barras2
|
||||
local barras3 = breakdownWindowFrame.barras3
|
||||
|
||||
local instancia = info.instancia
|
||||
local combat = instancia:GetShowingCombat()
|
||||
local barras = info.barras1
|
||||
local barras2 = info.barras2
|
||||
local barras3 = info.barras3
|
||||
local FriendlyFireTotal = self.friendlyfire_total
|
||||
|
||||
local FriendlyFireTotal = self.friendlyfire_total
|
||||
local DamagedPlayers = {}
|
||||
local Skills = {}
|
||||
|
||||
local DamagedPlayers = {}
|
||||
local Skills = {}
|
||||
for target_name, ff_table in pairs(self.friendlyfire) do
|
||||
|
||||
for target_name, ff_table in pairs(self.friendlyfire) do
|
||||
local actor = combat (1, target_name)
|
||||
if (actor) then
|
||||
tinsert(DamagedPlayers, {target_name, ff_table.total, ff_table.total / FriendlyFireTotal * 100, actor.classe})
|
||||
|
||||
local actor = combat (1, target_name)
|
||||
if (actor) then
|
||||
tinsert(DamagedPlayers, {target_name, ff_table.total, ff_table.total / FriendlyFireTotal * 100, actor.classe})
|
||||
|
||||
for spellid, amount in pairs(ff_table.spells) do
|
||||
Skills [spellid] = (Skills [spellid] or 0) + amount
|
||||
for spellid, amount in pairs(ff_table.spells) do
|
||||
Skills [spellid] = (Skills [spellid] or 0) + amount
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
_table_sort(DamagedPlayers, Details.Sort2)
|
||||
_table_sort(DamagedPlayers, Details.Sort2)
|
||||
|
||||
local amt = #DamagedPlayers
|
||||
gump:JI_AtualizaContainerBarras (amt)
|
||||
local amt = #DamagedPlayers
|
||||
gump:JI_AtualizaContainerBarras (amt)
|
||||
|
||||
local FirstPlaceDamage = DamagedPlayers [1] and DamagedPlayers [1][2] or 0
|
||||
local FirstPlaceDamage = DamagedPlayers [1] and DamagedPlayers [1][2] or 0
|
||||
|
||||
for index, tabela in ipairs(DamagedPlayers) do
|
||||
local barra = barras [index]
|
||||
for index, tabela in ipairs(DamagedPlayers) do
|
||||
local barra = barras [index]
|
||||
|
||||
if (not barra) then
|
||||
barra = gump:CriaNovaBarraInfo1 (instancia, index)
|
||||
barra.textura:SetStatusBarColor(1, 1, 1, 1)
|
||||
barra.on_focus = false
|
||||
end
|
||||
if (not barra) then
|
||||
barra = gump:CriaNovaBarraInfo1 (instancia, index)
|
||||
barra.textura:SetStatusBarColor(1, 1, 1, 1)
|
||||
barra.on_focus = false
|
||||
end
|
||||
|
||||
if (not info.mostrando_mouse_over) then
|
||||
if (tabela[1] == self.detalhes) then --tabela [1] = NOME = NOME que esta na caixa da direita
|
||||
if (not barra.on_focus) then --se a barra n�o tiver no foco
|
||||
barra.textura:SetStatusBarColor(129/255, 125/255, 69/255, 1)
|
||||
barra.on_focus = true
|
||||
if (not info.mostrando) then
|
||||
info.mostrando = barra
|
||||
if (not breakdownWindowFrame.mostrando_mouse_over) then
|
||||
if (tabela[1] == self.detalhes) then --tabela [1] = NOME = NOME que esta na caixa da direita
|
||||
if (not barra.on_focus) then --se a barra n�o tiver no foco
|
||||
barra.textura:SetStatusBarColor(129/255, 125/255, 69/255, 1)
|
||||
barra.on_focus = true
|
||||
if (not breakdownWindowFrame.mostrando) then
|
||||
breakdownWindowFrame.mostrando = barra
|
||||
end
|
||||
end
|
||||
else
|
||||
if (barra.on_focus) then
|
||||
barra.textura:SetStatusBarColor(1, 1, 1, 1) --volta a cor antiga
|
||||
barra:SetAlpha(.9) --volta a alfa antiga
|
||||
barra.on_focus = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (index == 1) then
|
||||
barra.textura:SetValue(100)
|
||||
else
|
||||
if (barra.on_focus) then
|
||||
barra.textura:SetStatusBarColor(1, 1, 1, 1) --volta a cor antiga
|
||||
barra:SetAlpha(.9) --volta a alfa antiga
|
||||
barra.on_focus = false
|
||||
end
|
||||
barra.textura:SetValue(tabela[2]/FirstPlaceDamage*100)
|
||||
end
|
||||
|
||||
barra.lineText1:SetText(index .. instancia.divisores.colocacao .. Details:GetOnlyName(tabela[1])) --seta o texto da esqueda
|
||||
barra.lineText4:SetText(Details:comma_value (tabela[2]) .. " (" .. format("%.1f", tabela[3]) .."%)") --seta o texto da direita
|
||||
|
||||
local classe = tabela[4]
|
||||
if (not classe) then
|
||||
classe = "MONSTER"
|
||||
end
|
||||
|
||||
barra.icone:SetTexture(breakdownWindowFrame.instancia.row_info.icon_file)
|
||||
|
||||
if (Details.class_coords [classe]) then
|
||||
barra.icone:SetTexCoord(unpack(Details.class_coords [classe]))
|
||||
else
|
||||
barra.icone:SetTexture("")
|
||||
end
|
||||
|
||||
local color = Details.class_colors [classe]
|
||||
if (color) then
|
||||
barra.textura:SetStatusBarColor(unpack(color))
|
||||
else
|
||||
barra.textura:SetStatusBarColor(1, 1, 1)
|
||||
end
|
||||
|
||||
barra.minha_tabela = self
|
||||
barra.show = tabela[1]
|
||||
barra:Show()
|
||||
|
||||
if (self.detalhes and self.detalhes == barra.show) then
|
||||
self:MontaDetalhes (self.detalhes, barra, instancia)
|
||||
end
|
||||
end
|
||||
|
||||
if (index == 1) then
|
||||
barra.textura:SetValue(100)
|
||||
else
|
||||
barra.textura:SetValue(tabela[2]/FirstPlaceDamage*100)
|
||||
local SkillTable = {}
|
||||
for spellid, amt in pairs(Skills) do
|
||||
local nome, _, icone = _GetSpellInfo(spellid)
|
||||
SkillTable [#SkillTable+1] = {nome, amt, amt/FriendlyFireTotal*100, icone}
|
||||
end
|
||||
|
||||
barra.lineText1:SetText(index .. instancia.divisores.colocacao .. Details:GetOnlyName(tabela[1])) --seta o texto da esqueda
|
||||
barra.lineText4:SetText(Details:comma_value (tabela[2]) .. " (" .. format("%.1f", tabela[3]) .."%)") --seta o texto da direita
|
||||
_table_sort(SkillTable, Details.Sort2)
|
||||
|
||||
local classe = tabela[4]
|
||||
if (not classe) then
|
||||
classe = "MONSTER"
|
||||
amt = #SkillTable
|
||||
if (amt < 1) then
|
||||
return
|
||||
end
|
||||
|
||||
barra.icone:SetTexture(info.instancia.row_info.icon_file)
|
||||
gump:JI_AtualizaContainerAlvos (amt)
|
||||
|
||||
if (Details.class_coords [classe]) then
|
||||
barra.icone:SetTexCoord(unpack(Details.class_coords [classe]))
|
||||
else
|
||||
barra.icone:SetTexture("")
|
||||
FirstPlaceDamage = SkillTable [1] and SkillTable [1][2] or 0
|
||||
|
||||
for index, tabela in ipairs(SkillTable) do
|
||||
local barra = barras2 [index]
|
||||
|
||||
if (not barra) then
|
||||
barra = gump:CriaNovaBarraInfo2 (instancia, index)
|
||||
barra.textura:SetStatusBarColor(1, 1, 1, 1)
|
||||
end
|
||||
|
||||
if (index == 1) then
|
||||
barra.textura:SetValue(100)
|
||||
else
|
||||
barra.textura:SetValue(tabela[2]/FirstPlaceDamage*100)
|
||||
end
|
||||
|
||||
barra.lineText1:SetText(index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda
|
||||
barra.lineText4:SetText(Details:comma_value (tabela[2]) .." (" ..format("%.1f", tabela[3]) .. ")") --seta o texto da direita
|
||||
barra.icone:SetTexture(tabela[4])
|
||||
|
||||
barra.minha_tabela = nil --desativa o tooltip
|
||||
|
||||
barra:Show()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local color = Details.class_colors [classe]
|
||||
if (color) then
|
||||
barra.textura:SetStatusBarColor(unpack(color))
|
||||
else
|
||||
barra.textura:SetStatusBarColor(1, 1, 1)
|
||||
end
|
||||
local damageTakenSpellSourcesHeadersAllowed = {icon = true, name = true, rank = true, amount = true, persecond = true, percent = true}
|
||||
function damageClass.BuildDamageTakenSpellListFromAgressor(targetActor, aggressorActor)
|
||||
--target actor name
|
||||
local targetActorName = targetActor:Name()
|
||||
|
||||
barra.minha_tabela = self
|
||||
barra.show = tabela[1]
|
||||
barra:Show()
|
||||
---@type combat
|
||||
local combatObject = Details:GetCombatFromBreakdownWindow()
|
||||
|
||||
if (self.detalhes and self.detalhes == barra.show) then
|
||||
self:MontaDetalhes (self.detalhes, barra, instancia)
|
||||
--get the list of spells from the aggressorActor and check each one to see if it was casted on the targetActor
|
||||
---@type spellcontainer
|
||||
local spellContainer = aggressorActor:GetSpellContainer("spell")
|
||||
|
||||
--create the table which will be returned with the data
|
||||
---@type {topValue: number, totalValue: number, headersAllowed: table, combatTime: number}
|
||||
local resultTable = {topValue = 0, totalValue = 0, headersAllowed = damageTakenSpellSourcesHeadersAllowed, combatTime = combatObject:GetCombatTime()}
|
||||
|
||||
for spellId, spellTable in spellContainer:ListSpells() do
|
||||
---@cast spellTable spelltable
|
||||
for targetName, amount in pairs(spellTable.targets) do
|
||||
if (targetName == targetActorName) then
|
||||
--add the spell to the list
|
||||
resultTable[#resultTable+1] = {spellId = spellId, total = amount, petName = "", spellScholl = spellTable.spellschool}
|
||||
resultTable.totalValue = resultTable.totalValue + amount
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local SkillTable = {}
|
||||
for spellid, amt in pairs(Skills) do
|
||||
local nome, _, icone = _GetSpellInfo(spellid)
|
||||
SkillTable [#SkillTable+1] = {nome, amt, amt/FriendlyFireTotal*100, icone}
|
||||
end
|
||||
--iterate among the pets of the aggressorActor and get the spells casted by them
|
||||
---@type table<number, actorname>
|
||||
local petTable = aggressorActor.pets
|
||||
|
||||
_table_sort(SkillTable, Details.Sort2)
|
||||
for i = 1, #petTable do
|
||||
local petName = petTable[i]
|
||||
local petActorObject = combatObject:GetActor(DETAILS_ATTRIBUTE_DAMAGE, petName)
|
||||
if (petActorObject) then
|
||||
---@type spellcontainer
|
||||
local petSpellContainer = petActorObject:GetSpellContainer("spell")
|
||||
|
||||
amt = #SkillTable
|
||||
if (amt < 1) then
|
||||
return
|
||||
end
|
||||
|
||||
gump:JI_AtualizaContainerAlvos (amt)
|
||||
|
||||
FirstPlaceDamage = SkillTable [1] and SkillTable [1][2] or 0
|
||||
|
||||
for index, tabela in ipairs(SkillTable) do
|
||||
local barra = barras2 [index]
|
||||
|
||||
if (not barra) then
|
||||
barra = gump:CriaNovaBarraInfo2 (instancia, index)
|
||||
barra.textura:SetStatusBarColor(1, 1, 1, 1)
|
||||
for spellId, spellTable in petSpellContainer:ListSpells() do
|
||||
for targetName, amount in pairs(spellTable.targets) do
|
||||
if (targetName == targetActorName) then
|
||||
--add the spell to the list
|
||||
resultTable[#resultTable+1] = {spellId = spellId, total = amount, petName = petName, spellScholl = spellTable.spellschool}
|
||||
resultTable.totalValue = resultTable.totalValue + amount
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (index == 1) then
|
||||
barra.textura:SetValue(100)
|
||||
else
|
||||
barra.textura:SetValue(tabela[2]/FirstPlaceDamage*100)
|
||||
end
|
||||
|
||||
barra.lineText1:SetText(index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda
|
||||
barra.lineText4:SetText(Details:comma_value (tabela[2]) .." (" ..format("%.1f", tabela[3]) .. ")") --seta o texto da direita
|
||||
barra.icone:SetTexture(tabela[4])
|
||||
|
||||
barra.minha_tabela = nil --desativa o tooltip
|
||||
|
||||
barra:Show()
|
||||
end
|
||||
|
||||
return resultTable
|
||||
end
|
||||
|
||||
------ Damage Taken
|
||||
local damageTakenHeadersAllowed = {icon = true, name = true, rank = true, amount = true, persecond = true, percent = true}
|
||||
function damageClass:MontaInfoDamageTaken()
|
||||
---@type actor
|
||||
---@type actordamage
|
||||
local actorObject = self
|
||||
---@type instance
|
||||
local instance = info.instancia
|
||||
local instance = breakdownWindowFrame.instancia
|
||||
---@type combat
|
||||
local combatObject = instance:GetCombat()
|
||||
---@type string
|
||||
@@ -4245,18 +4327,18 @@ function damageClass:MontaInfoDamageTaken()
|
||||
|
||||
---@type string
|
||||
for aggressorName in pairs(damageTakenFrom) do
|
||||
local sourceActorObject = damageContainer:GetActor(aggressorName)
|
||||
if (sourceActorObject) then
|
||||
local aggressorActor = damageContainer:GetActor(aggressorName)
|
||||
if (aggressorActor) then
|
||||
---@type table<string, number>
|
||||
local targets = sourceActorObject:GetTargets()
|
||||
local targets = aggressorActor:GetTargets()
|
||||
---@type number|nil
|
||||
local amountOfDamage = targets[actorName]
|
||||
if (amountOfDamage) then
|
||||
---@type texturetable
|
||||
local iconTable = Details:GetActorIcon(sourceActorObject)
|
||||
local iconTable = Details:GetActorIcon(aggressorActor)
|
||||
|
||||
---@type {name: string, amount: number, icon: texturetable}
|
||||
local damageTakenTable = {name = aggressorName, total = amountOfDamage, icon = iconTable}
|
||||
local damageTakenTable = {name = aggressorName, total = amountOfDamage, icon = iconTable, class = aggressorActor:Class()}
|
||||
|
||||
resultTable[#resultTable+1] = damageTakenTable
|
||||
end
|
||||
@@ -4268,54 +4350,6 @@ function damageClass:MontaInfoDamageTaken()
|
||||
resultTable.headersAllowed = damageTakenHeadersAllowed
|
||||
|
||||
Details222.BreakdownWindow.SendGenericData(resultTable, actorObject, combatObject, instance)
|
||||
|
||||
if true then return end
|
||||
|
||||
local barras = info.barras1
|
||||
local meus_agressores = {}
|
||||
|
||||
local este_agressor
|
||||
for nome, _ in pairs(damageTakenFrom) do
|
||||
este_agressor = damageContainer._ActorTable[damageContainer._NameIndexTable[nome]]
|
||||
if (este_agressor) then
|
||||
local alvos = este_agressor.targets
|
||||
local este_alvo = alvos [self.nome]
|
||||
if (este_alvo) then
|
||||
meus_agressores [#meus_agressores+1] = {nome, este_alvo, este_alvo/damageTakenTotal*100, este_agressor.classe}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local amt = #meus_agressores
|
||||
|
||||
if (amt < 1) then --caso houve apenas friendly fire
|
||||
return true
|
||||
end
|
||||
|
||||
--_table_sort(meus_agressores, function(a, b) return a[2] > b[2] end)
|
||||
_table_sort(meus_agressores, Details.Sort2)
|
||||
|
||||
gump:JI_AtualizaContainerBarras (amt)
|
||||
|
||||
local max_ = meus_agressores [1] and meus_agressores [1][2] or 0
|
||||
|
||||
local barra
|
||||
for index, tabela in ipairs(meus_agressores) do
|
||||
barra = barras [index]
|
||||
if (not barra) then
|
||||
barra = gump:CriaNovaBarraInfo1 (instance, index)
|
||||
end
|
||||
|
||||
self:FocusLock(barra, tabela[1])
|
||||
|
||||
local texCoords = Details.class_coords [tabela[4]]
|
||||
if (not texCoords) then
|
||||
texCoords = Details.class_coords ["UNKNOW"]
|
||||
end
|
||||
|
||||
local formated_value = SelectedToKFunction(_, _math_floor(tabela[2]))
|
||||
self:UpdadeInfoBar(barra, index, tabela[1], tabela[1], tabela[2], formated_value, max_, tabela[3], "Interface\\AddOns\\Details\\images\\classes_small_alpha", true, texCoords, nil, tabela[4])
|
||||
end
|
||||
end
|
||||
|
||||
--[[exported]] function Details:UpdadeInfoBar(row, index, spellId, name, value, formattedValue, max, percent, icon, detalhes, texCoords, spellSchool, class)
|
||||
@@ -4396,20 +4430,20 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
if (detalhes and self.detalhes and self.detalhes == spellId and info.showing == index) then
|
||||
self:MontaDetalhes(row.show, row, info.instancia)
|
||||
if (detalhes and self.detalhes and self.detalhes == spellId and breakdownWindowFrame.showing == index) then
|
||||
self:MontaDetalhes(row.show, row, breakdownWindowFrame.instancia)
|
||||
end
|
||||
end
|
||||
|
||||
--lock into a line after clicking on it
|
||||
--[[exported]] function Details:FocusLock(row, spellId) --will be deprecated
|
||||
if (not info.mostrando_mouse_over) then
|
||||
if (not breakdownWindowFrame.mostrando_mouse_over) then
|
||||
if (spellId == self.detalhes) then --tabela [1] = spellid = spellid que esta na caixa da direita
|
||||
if (not row.on_focus) then --se a barra n�o tiver no foco
|
||||
row.textura:SetStatusBarColor(129/255, 125/255, 69/255, 1)
|
||||
row.on_focus = true
|
||||
if (not info.mostrando) then
|
||||
info.mostrando = row
|
||||
if (not breakdownWindowFrame.mostrando) then
|
||||
breakdownWindowFrame.mostrando = row
|
||||
end
|
||||
end
|
||||
else
|
||||
@@ -4504,7 +4538,7 @@ function damageClass:MontaInfoDamageDone() --I guess this fills the list of spel
|
||||
---@type actor
|
||||
local actorObject = self
|
||||
---@type instance
|
||||
local instance = info.instancia
|
||||
local instance = breakdownWindowFrame.instancia
|
||||
---@type combat
|
||||
local combatObject = instance:GetCombat()
|
||||
---@type number
|
||||
@@ -4525,15 +4559,15 @@ function damageClass:MontaInfoDamageDone() --I guess this fills the list of spel
|
||||
--discover which are the player position in the guild rank
|
||||
local playerTable, onEncounter, rankPosition = Details.storage:GetPlayerGuildRank (diff, combatObject:GetBossInfo().id, "damage", playerName, true)
|
||||
local text1 = playerName .. " Guild Rank on " .. (combatObject:GetBossInfo().name or "") .. ": |cFFFFFF00" .. (rankPosition or "x") .. "|r Best Dps: |cFFFFFF00" .. Details:ToK2((bestRank[1] or 0) / encounterTable.elapsed) .. "|r (" .. encounterTable.date:gsub(".*%s", "") .. ")"
|
||||
info:SetStatusbarText (text1, 10, "gray")
|
||||
breakdownWindowFrame:SetStatusbarText (text1, 10, "gray")
|
||||
else
|
||||
info:SetStatusbarText()
|
||||
breakdownWindowFrame:SetStatusbarText()
|
||||
end
|
||||
else
|
||||
info:SetStatusbarText()
|
||||
breakdownWindowFrame:SetStatusbarText()
|
||||
end
|
||||
else
|
||||
info:SetStatusbarText()
|
||||
breakdownWindowFrame:SetStatusbarText()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4554,7 +4588,7 @@ function damageClass:MontaInfoDamageDone() --I guess this fills the list of spel
|
||||
if (Details.time_type == 1 or not actorObject.grupo) then
|
||||
actorCombatTime = actorObject:Tempo()
|
||||
elseif (Details.time_type == 2) then
|
||||
actorCombatTime = info.instancia.showing:GetCombatTime()
|
||||
actorCombatTime = breakdownWindowFrame.instancia.showing:GetCombatTime()
|
||||
end
|
||||
|
||||
--actor spells
|
||||
@@ -4766,7 +4800,7 @@ function damageClass:MontaInfoDamageDone() --I guess this fills the list of spel
|
||||
|
||||
local name = tabela[4]
|
||||
|
||||
if (info.sub_atributo == 2) then
|
||||
if (breakdownWindowFrame.sub_atributo == 2) then
|
||||
local formated_value = SelectedToKFunction(_, _math_floor(tabela[2]/actorCombatTime))
|
||||
self:UpdadeInfoBar(barra, index, tabela[1], name, tabela[2], formated_value, max_, tabela[3], tabela[5], true, nil, tabela [7])
|
||||
else
|
||||
@@ -4783,7 +4817,7 @@ function damageClass:MontaInfoDamageDone() --I guess this fills the list of spel
|
||||
local damageTakenFrom = self.damage_from
|
||||
local combatObject = instance:GetShowingCombat()
|
||||
local damageContainer = combatObject:GetContainer(DETAILS_ATTRIBUTE_DAMAGE)
|
||||
local barras = info.barras2
|
||||
local barras = breakdownWindowFrame.barras2
|
||||
local enemyTable = {}
|
||||
local targetName = self:Name()
|
||||
|
||||
@@ -4889,7 +4923,7 @@ function damageClass:MontaInfoDamageDone() --I guess this fills the list of spel
|
||||
|
||||
local barra
|
||||
for index, targetTable in ipairs(allActorTargets) do
|
||||
barra = info.barras2[index]
|
||||
barra = breakdownWindowFrame.barras2[index]
|
||||
|
||||
if (not barra) then
|
||||
barra = gump:CriaNovaBarraInfo2(instance, index)
|
||||
@@ -4924,7 +4958,7 @@ function damageClass:MontaInfoDamageDone() --I guess this fills the list of spel
|
||||
|
||||
barra.lineText1:SetText(index .. ". " .. Details:GetOnlyName(targetName))
|
||||
|
||||
if (info.sub_atributo == 2) then
|
||||
if (breakdownWindowFrame.sub_atributo == 2) then
|
||||
barra.lineText4:SetText(Details:comma_value ( _math_floor(targetTable[2]/actorCombatTime)) .. " (" .. format("%.1f", targetTable[3]) .. "%)")
|
||||
else
|
||||
barra.lineText4:SetText(SelectedToKFunction(_, targetTable[2]) .." (" .. format("%.1f", targetTable[3]) .. "%)")
|
||||
@@ -4952,10 +4986,10 @@ end
|
||||
------ Detalhe Info Friendly Fire
|
||||
function damageClass:MontaDetalhesFriendlyFire (nome, barra)
|
||||
|
||||
local barras = info.barras3
|
||||
local instancia = info.instancia
|
||||
local barras = breakdownWindowFrame.barras3
|
||||
local instancia = breakdownWindowFrame.instancia
|
||||
|
||||
local tabela_do_combate = info.instancia.showing
|
||||
local tabela_do_combate = breakdownWindowFrame.instancia.showing
|
||||
local showing = tabela_do_combate [class_type] --o que esta sendo mostrado -> [1] - dano [2] - cura --pega o container com ._NameIndexTable ._ActorTable
|
||||
|
||||
local friendlyfire = self.friendlyfire
|
||||
@@ -5017,9 +5051,9 @@ end
|
||||
-- detalhes info enemies
|
||||
function damageClass:MontaDetalhesEnemy (spellid, barra)
|
||||
|
||||
local container = info.instancia.showing[1]
|
||||
local barras = info.barras3
|
||||
local instancia = info.instancia
|
||||
local container = breakdownWindowFrame.instancia.showing[1]
|
||||
local barras = breakdownWindowFrame.barras3
|
||||
local instancia = breakdownWindowFrame.instancia
|
||||
|
||||
local other_actor = barra.other_actor
|
||||
if (other_actor) then
|
||||
@@ -5041,7 +5075,7 @@ function damageClass:MontaDetalhesEnemy (spellid, barra)
|
||||
|
||||
for target_name, amount in pairs(targets) do
|
||||
local classe
|
||||
local this_actor = info.instancia.showing (1, target_name)
|
||||
local this_actor = breakdownWindowFrame.instancia.showing (1, target_name)
|
||||
if (this_actor) then
|
||||
classe = this_actor.classe or "UNKNOW"
|
||||
else
|
||||
@@ -5115,10 +5149,10 @@ end
|
||||
------ Detalhe Info Damage Taken
|
||||
function damageClass:MontaDetalhesDamageTaken (nome, barra)
|
||||
|
||||
local barras = info.barras3
|
||||
local instancia = info.instancia
|
||||
local barras = breakdownWindowFrame.barras3
|
||||
local instancia = breakdownWindowFrame.instancia
|
||||
|
||||
local tabela_do_combate = info.instancia.showing
|
||||
local tabela_do_combate = breakdownWindowFrame.instancia.showing
|
||||
local showing = tabela_do_combate [class_type] --o que esta sendo mostrado -> [1] - dano [2] - cura --pega o container com ._NameIndexTable ._ActorTable
|
||||
|
||||
local este_agressor = showing._ActorTable[showing._NameIndexTable[nome]]
|
||||
@@ -5129,7 +5163,7 @@ function damageClass:MontaDetalhesDamageTaken (nome, barra)
|
||||
|
||||
local conteudo = este_agressor.spells._ActorTable --pairs[] com os IDs das magias
|
||||
|
||||
local actor = info.jogador.nome
|
||||
local actor = breakdownWindowFrame.jogador.nome
|
||||
|
||||
local total = este_agressor.targets [actor] or 0
|
||||
|
||||
@@ -5212,7 +5246,7 @@ end
|
||||
|
||||
local MontaDetalhesBuffProcs = function(actor, row, instance)
|
||||
|
||||
instance = instance or info.instancia
|
||||
instance = instance or breakdownWindowFrame.instancia
|
||||
|
||||
local spec = actor.spec
|
||||
if (spec) then
|
||||
@@ -5524,7 +5558,7 @@ function damageClass:MontaDetalhesDamageDone (spellId, spellLine, instance) --th
|
||||
end
|
||||
end
|
||||
|
||||
Details.playerDetailWindow.spell_icone:SetTexture(icone)
|
||||
Details.BreakdownWindowFrame.spell_icone:SetTexture(icone)
|
||||
|
||||
local total = self.total
|
||||
|
||||
@@ -5533,7 +5567,7 @@ function damageClass:MontaDetalhesDamageDone (spellId, spellLine, instance) --th
|
||||
meu_tempo = self:Tempo()
|
||||
|
||||
elseif (Details.time_type == 2) then
|
||||
meu_tempo = info.instancia.showing:GetCombatTime()
|
||||
meu_tempo = breakdownWindowFrame.instancia.showing:GetCombatTime()
|
||||
end
|
||||
|
||||
local total_hits = spellTable.counter
|
||||
@@ -5571,15 +5605,15 @@ function damageClass:MontaDetalhesDamageDone (spellId, spellLine, instance) --th
|
||||
local hits_string = "" .. total_hits
|
||||
local cast_string = Loc ["STRING_CAST"] .. ": "
|
||||
|
||||
local misc_actor = info.instancia.showing (4, self:name())
|
||||
local misc_actor = breakdownWindowFrame.instancia.showing (4, self:name())
|
||||
if (misc_actor) then
|
||||
local uptime_spellid = spellTable.id
|
||||
local debuff_uptime = misc_actor.debuff_uptime_spells and misc_actor.debuff_uptime_spells._ActorTable [uptime_spellid] and misc_actor.debuff_uptime_spells._ActorTable [uptime_spellid].uptime
|
||||
if (debuff_uptime) then
|
||||
hits_string = hits_string .. " |cFFDDDD44(" .. _math_floor(debuff_uptime / info.instancia.showing:GetCombatTime() * 100) .. "% uptime)|r"
|
||||
hits_string = hits_string .. " |cFFDDDD44(" .. _math_floor(debuff_uptime / breakdownWindowFrame.instancia.showing:GetCombatTime() * 100) .. "% uptime)|r"
|
||||
end
|
||||
|
||||
local amountOfCasts = info.instancia.showing:GetSpellCastAmount(self:Name(), spellName)
|
||||
local amountOfCasts = breakdownWindowFrame.instancia.showing:GetSpellCastAmount(self:Name(), spellName)
|
||||
if (amountOfCasts == 0) then
|
||||
amountOfCasts = "(|cFFFFFF00?|r)"
|
||||
end
|
||||
@@ -5736,7 +5770,7 @@ function damageClass:MontaDetalhesDamageDone (spellId, spellLine, instance) --th
|
||||
end
|
||||
|
||||
--Details:BuildPlayerDetailsSpellChart()
|
||||
--DetailsPlayerDetailSmallChart.ShowChart (Details.playerDetailWindow.grupos_detalhes [5].bg, info.instancia.showing, info.instancia.showing.cleu_events, self.nome, false, spellid, 1, 2, 3, 4, 5, 6, 7, 8, 15)
|
||||
--DetailsPlayerDetailSmallChart.ShowChart (Details.BreakdownWindowFrame.grupos_detalhes [5].bg, info.instancia.showing, info.instancia.showing.cleu_events, self.nome, false, spellid, 1, 2, 3, 4, 5, 6, 7, 8, 15)
|
||||
|
||||
--spell damage chart
|
||||
--events: 1 2 3 4 5 6 7 8 15
|
||||
@@ -5905,7 +5939,7 @@ function Details:BuildPlayerDetailsSpellChart()
|
||||
|
||||
if (not playerDetailSmallChart) then
|
||||
|
||||
playerDetailSmallChart = CreateFrame("frame", "DetailsPlayerDetailSmallChart", info,"BackdropTemplate")
|
||||
playerDetailSmallChart = CreateFrame("frame", "DetailsPlayerDetailSmallChart", breakdownWindowFrame,"BackdropTemplate")
|
||||
DetailsFramework:ApplyStandardBackdrop(playerDetailSmallChart)
|
||||
playerDetailSmallChart.Lines = {}
|
||||
|
||||
@@ -5915,7 +5949,7 @@ function Details:BuildPlayerDetailsSpellChart()
|
||||
tinsert(playerDetailSmallChart.Lines, texture)
|
||||
end
|
||||
|
||||
--Details.playerDetailWindow.grupos_detalhes [index]
|
||||
--Details.BreakdownWindowFrame.grupos_detalhes [index]
|
||||
function playerDetailSmallChart.ShowChart (parent, combatObject, cleuData, playerName, targetName, spellId, ...)
|
||||
local tokenIdList = {}
|
||||
local eventList = {}
|
||||
@@ -5984,7 +6018,7 @@ function Details:BuildPlayerDetailsSpellChart()
|
||||
end
|
||||
|
||||
function damageClass:MontaTooltipDamageTaken (thisLine, index)
|
||||
local aggressor = info.instancia.showing [1]:PegarCombatente (_, thisLine.nome_inimigo)
|
||||
local aggressor = breakdownWindowFrame.instancia.showing [1]:PegarCombatente (_, thisLine.nome_inimigo)
|
||||
local container = aggressor.spells._ActorTable
|
||||
local habilidades = {}
|
||||
|
||||
@@ -6099,10 +6133,10 @@ function damageClass:MontaTooltipAlvos (thisLine, index, instancia) --~deprecate
|
||||
if (Details.time_type == 1 or not self.grupo) then
|
||||
meu_tempo = self:Tempo()
|
||||
elseif (Details.time_type == 2) then
|
||||
meu_tempo = info.instancia.showing:GetCombatTime()
|
||||
meu_tempo = breakdownWindowFrame.instancia.showing:GetCombatTime()
|
||||
end
|
||||
|
||||
local is_dps = info.instancia.sub_atributo == 2
|
||||
local is_dps = breakdownWindowFrame.instancia.sub_atributo == 2
|
||||
|
||||
if (is_dps) then
|
||||
Details:AddTooltipSpellHeaderText (Loc ["STRING_DAMAGE_DPS_IN"] .. ":", {1, 0.9, 0.0, 1}, 1, Details.tooltip_spell_icon.file, unpack(Details.tooltip_spell_icon.coords))
|
||||
|
||||
+36
-36
@@ -63,7 +63,7 @@ local TooltipMaximizedMethod = 1
|
||||
|
||||
local headerColor = "yellow"
|
||||
|
||||
local info = _detalhes.playerDetailWindow
|
||||
local breakdownWindowFrame = Details.BreakdownWindowFrame
|
||||
local keyName
|
||||
|
||||
function healingClass:NovaTabela (serial, nome, link)
|
||||
@@ -1656,7 +1656,7 @@ end
|
||||
--------------------------------------------- // JANELA DETALHES // ---------------------------------------------
|
||||
---------- bifurca��o
|
||||
function healingClass:MontaInfo()
|
||||
if (info.sub_atributo == 1 or info.sub_atributo == 2) then
|
||||
if (breakdownWindowFrame.sub_atributo == 1 or breakdownWindowFrame.sub_atributo == 2) then
|
||||
self:MontaInfoHealingDone()
|
||||
|
||||
--[=[
|
||||
@@ -1690,7 +1690,7 @@ function healingClass:MontaInfo()
|
||||
end
|
||||
--]=]
|
||||
|
||||
elseif (info.sub_atributo == 3) then
|
||||
elseif (breakdownWindowFrame.sub_atributo == 3) then
|
||||
self:MontaInfoHealingDone()
|
||||
|
||||
--[=[
|
||||
@@ -1724,7 +1724,7 @@ function healingClass:MontaInfo()
|
||||
end
|
||||
--]=]
|
||||
|
||||
elseif (info.sub_atributo == 4) then
|
||||
elseif (breakdownWindowFrame.sub_atributo == 4) then
|
||||
self:MontaInfoHealTaken()
|
||||
end
|
||||
end
|
||||
@@ -1734,7 +1734,7 @@ function healingClass:MontaInfoHealTaken()
|
||||
---@type actor
|
||||
local actorObject = self
|
||||
---@type instance
|
||||
local instance = info.instancia
|
||||
local instance = breakdownWindowFrame.instancia
|
||||
---@type combat
|
||||
local combatObject = instance:GetCombat()
|
||||
---@type string
|
||||
@@ -1779,10 +1779,10 @@ function healingClass:MontaInfoHealTaken()
|
||||
|
||||
local healing_taken = self.healing_taken
|
||||
local curandeiros = self.healing_from
|
||||
local instancia = info.instancia
|
||||
local instancia = breakdownWindowFrame.instancia
|
||||
local tabela_do_combate = instancia.showing
|
||||
local showing = tabela_do_combate [class_type] --o que esta sendo mostrado -> [1] - dano [2] - cura --pega o container com ._NameIndexTable ._ActorTable
|
||||
local barras = info.barras1
|
||||
local barras = breakdownWindowFrame.barras1
|
||||
local meus_curandeiros = {}
|
||||
|
||||
local este_curandeiro
|
||||
@@ -1834,11 +1834,11 @@ end
|
||||
function healingClass:MontaInfoOverHealing() --this should be deprecated now
|
||||
--pegar as habilidade de dar sort no heal
|
||||
|
||||
local instancia = info.instancia
|
||||
local instancia = breakdownWindowFrame.instancia
|
||||
local total = self.totalover
|
||||
local tabela = self.spells._ActorTable
|
||||
local minhas_curas = {}
|
||||
local barras = info.barras1
|
||||
local barras = breakdownWindowFrame.barras1
|
||||
|
||||
for spellid, tabela in pairs(tabela) do
|
||||
local nome, _, icone = _GetSpellInfo(spellid)
|
||||
@@ -1876,13 +1876,13 @@ function healingClass:MontaInfoOverHealing() --this should be deprecated now
|
||||
barra.on_focus = false
|
||||
end
|
||||
|
||||
if (not info.mostrando_mouse_over) then
|
||||
if (not breakdownWindowFrame.mostrando_mouse_over) then
|
||||
if (tabela[1] == self.detalhes) then --tabela [1] = spellid = spellid que esta na caixa da direita
|
||||
if (not barra.on_focus) then --se a barra n�o tiver no foco
|
||||
barra.textura:SetStatusBarColor(129/255, 125/255, 69/255, 1)
|
||||
barra.on_focus = true
|
||||
if (not info.mostrando) then
|
||||
info.mostrando = barra
|
||||
if (not breakdownWindowFrame.mostrando) then
|
||||
breakdownWindowFrame.mostrando = barra
|
||||
end
|
||||
end
|
||||
else
|
||||
@@ -1938,7 +1938,7 @@ function healingClass:MontaInfoOverHealing() --this should be deprecated now
|
||||
|
||||
for index, tabela in ipairs(jogadores_overhealed) do
|
||||
|
||||
local barra = info.barras2 [index]
|
||||
local barra = breakdownWindowFrame.barras2 [index]
|
||||
|
||||
if (not barra) then
|
||||
barra = gump:CriaNovaBarraInfo2 (instancia, index)
|
||||
@@ -1975,7 +1975,7 @@ function healingClass:MontaInfoHealingDone()
|
||||
---@type actor
|
||||
local actorObject = self
|
||||
---@type instance
|
||||
local instance = info.instancia
|
||||
local instance = breakdownWindowFrame.instancia
|
||||
---@type combat
|
||||
local combatObject = instance:GetCombat()
|
||||
---@type string
|
||||
@@ -1993,7 +1993,7 @@ function healingClass:MontaInfoHealingDone()
|
||||
if (Details.time_type == 1 or not actorObject.grupo) then
|
||||
actorCombatTime = actorObject:Tempo()
|
||||
elseif (Details.time_type == 2) then
|
||||
actorCombatTime = info.instancia.showing:GetCombatTime()
|
||||
actorCombatTime = breakdownWindowFrame.instancia.showing:GetCombatTime()
|
||||
end
|
||||
|
||||
--actor spells
|
||||
@@ -2165,18 +2165,18 @@ function healingClass:MontaInfoHealingDone()
|
||||
|
||||
if 1 then return end
|
||||
|
||||
local instancia = info.instancia
|
||||
local instancia = breakdownWindowFrame.instancia
|
||||
local total = self.total
|
||||
local tabela = self.spells._ActorTable
|
||||
local minhas_curas = {}
|
||||
local barras = info.barras1
|
||||
local barras = breakdownWindowFrame.barras1
|
||||
|
||||
--get time type
|
||||
local meu_tempo
|
||||
if (_detalhes.time_type == 1 or not self.grupo) then
|
||||
meu_tempo = self:Tempo()
|
||||
elseif (_detalhes.time_type == 2) then
|
||||
meu_tempo = info.instancia.showing:GetCombatTime()
|
||||
meu_tempo = breakdownWindowFrame.instancia.showing:GetCombatTime()
|
||||
end
|
||||
|
||||
for spellid, tabela in pairs(tabela) do
|
||||
@@ -2192,7 +2192,7 @@ function healingClass:MontaInfoHealingDone()
|
||||
})
|
||||
end
|
||||
|
||||
info:SetStatusbarText()
|
||||
breakdownWindowFrame:SetStatusbarText()
|
||||
|
||||
--add pets
|
||||
local ActorPets = self.pets
|
||||
@@ -2238,7 +2238,7 @@ function healingClass:MontaInfoHealingDone()
|
||||
|
||||
barra.other_actor = tabela [6]
|
||||
|
||||
if (info.sub_atributo == 2) then
|
||||
if (breakdownWindowFrame.sub_atributo == 2) then
|
||||
local formated_value = SelectedToKFunction (_, _math_floor(tabela[2]/meu_tempo))
|
||||
self:UpdadeInfoBar(barra, index, tabela[1], tabela[4], tabela[2], formated_value, max_, tabela[3], tabela[5], true)
|
||||
else
|
||||
@@ -2272,7 +2272,7 @@ function healingClass:MontaInfoHealingDone()
|
||||
local topHealingDone = max(healedTargets[1] and healedTargets[1][2] or 0, 0.0001)
|
||||
|
||||
for index, healDataTable in ipairs(healedTargets) do
|
||||
local barra = info.barras2[index]
|
||||
local barra = breakdownWindowFrame.barras2[index]
|
||||
|
||||
if (not barra) then
|
||||
barra = gump:CriaNovaBarraInfo2(instancia, index)
|
||||
@@ -2299,7 +2299,7 @@ function healingClass:MontaInfoHealingDone()
|
||||
barra.lineText1:SetText(index .. ". " .. _detalhes:GetOnlyName(healDataTable[1]))
|
||||
barra.textura:SetStatusBarColor(1, 1, 1, 1)
|
||||
|
||||
if (info.sub_atributo == 2) then
|
||||
if (breakdownWindowFrame.sub_atributo == 2) then
|
||||
barra.lineText4:SetText(_detalhes:comma_value(_math_floor(healingDone/meu_tempo)) .." (" .. _cstr ("%.1f", healDataTable[3]) .. "%)")
|
||||
else
|
||||
barra.lineText4:SetText(SelectedToKFunction(_, healingDone) .. " (" .. _cstr ("%.1f", healDataTable[3]) .. "%)")
|
||||
@@ -2321,7 +2321,7 @@ function healingClass:MontaTooltipAlvos (thisLine, index, instancia)
|
||||
local container = self.spells._ActorTable
|
||||
local habilidades = {}
|
||||
local total
|
||||
local sub_atributo = info.instancia.sub_atributo
|
||||
local sub_atributo = breakdownWindowFrame.instancia.sub_atributo
|
||||
|
||||
local targets_key = ""
|
||||
|
||||
@@ -2372,10 +2372,10 @@ function healingClass:MontaTooltipAlvos (thisLine, index, instancia)
|
||||
if (_detalhes.time_type == 1 or not self.grupo) then
|
||||
meu_tempo = self:Tempo()
|
||||
elseif (_detalhes.time_type == 2) then
|
||||
meu_tempo = info.instancia.showing:GetCombatTime()
|
||||
meu_tempo = breakdownWindowFrame.instancia.showing:GetCombatTime()
|
||||
end
|
||||
|
||||
local is_hps = info.instancia.sub_atributo == 2
|
||||
local is_hps = breakdownWindowFrame.instancia.sub_atributo == 2
|
||||
|
||||
if (is_hps) then
|
||||
--GameTooltip:AddLine(index..". "..inimigo)
|
||||
@@ -2422,25 +2422,25 @@ end
|
||||
|
||||
function healingClass:MontaDetalhes (spellid, barra)
|
||||
--bifurga��es
|
||||
if (info.sub_atributo == 1 or info.sub_atributo == 2 or info.sub_atributo == 3) then
|
||||
if (breakdownWindowFrame.sub_atributo == 1 or breakdownWindowFrame.sub_atributo == 2 or breakdownWindowFrame.sub_atributo == 3) then
|
||||
return self:MontaDetalhesHealingDone (spellid, barra)
|
||||
elseif (info.sub_atributo == 4) then
|
||||
elseif (breakdownWindowFrame.sub_atributo == 4) then
|
||||
healingClass:MontaDetalhesHealingTaken (spellid, barra)
|
||||
end
|
||||
end
|
||||
|
||||
function healingClass:MontaDetalhesHealingTaken (nome, barra)
|
||||
|
||||
local barras = info.barras3
|
||||
local instancia = info.instancia
|
||||
local barras = breakdownWindowFrame.barras3
|
||||
local instancia = breakdownWindowFrame.instancia
|
||||
|
||||
local tabela_do_combate = info.instancia.showing
|
||||
local tabela_do_combate = breakdownWindowFrame.instancia.showing
|
||||
local showing = tabela_do_combate [class_type] --o que esta sendo mostrado -> [1] - dano [2] - cura --pega o container com ._NameIndexTable ._ActorTable
|
||||
|
||||
local este_curandeiro = showing._ActorTable[showing._NameIndexTable[nome]]
|
||||
local conteudo = este_curandeiro.spells._ActorTable --pairs[] com os IDs das magias
|
||||
|
||||
local actor = info.jogador.nome
|
||||
local actor = breakdownWindowFrame.jogador.nome
|
||||
|
||||
local total = este_curandeiro.targets [actor]
|
||||
|
||||
@@ -2518,7 +2518,7 @@ function healingClass:MontaDetalhesHealingDone (spellid, barra) --deprecated wit
|
||||
|
||||
--icone direito superior
|
||||
local spellName, _, icone = _GetSpellInfo(spellid)
|
||||
info.spell_icone:SetTexture(icone)
|
||||
breakdownWindowFrame.spell_icone:SetTexture(icone)
|
||||
|
||||
local total = self.total
|
||||
|
||||
@@ -2529,7 +2529,7 @@ function healingClass:MontaDetalhesHealingDone (spellid, barra) --deprecated wit
|
||||
if (_detalhes.time_type == 1 or not self.grupo) then
|
||||
meu_tempo = self:Tempo()
|
||||
elseif (_detalhes.time_type == 2) then
|
||||
meu_tempo = info.instancia.showing:GetCombatTime()
|
||||
meu_tempo = breakdownWindowFrame.instancia.showing:GetCombatTime()
|
||||
end
|
||||
|
||||
local total_hits = esta_magia.counter
|
||||
@@ -2564,14 +2564,14 @@ function healingClass:MontaDetalhesHealingDone (spellid, barra) --deprecated wit
|
||||
local hits_string = "" .. total_hits
|
||||
local cast_string = Loc ["STRING_CAST"] .. ": "
|
||||
|
||||
local misc_actor = info.instancia.showing (4, self:name())
|
||||
local misc_actor = breakdownWindowFrame.instancia.showing (4, self:name())
|
||||
if (misc_actor) then
|
||||
local buff_uptime = misc_actor.buff_uptime_spells and misc_actor.buff_uptime_spells._ActorTable [spellid] and misc_actor.buff_uptime_spells._ActorTable [spellid].uptime
|
||||
if (buff_uptime) then
|
||||
hits_string = hits_string .. " |cFFDDDD44(" .. _math_floor(buff_uptime / info.instancia.showing:GetCombatTime() * 100) .. "% uptime)|r"
|
||||
hits_string = hits_string .. " |cFFDDDD44(" .. _math_floor(buff_uptime / breakdownWindowFrame.instancia.showing:GetCombatTime() * 100) .. "% uptime)|r"
|
||||
end
|
||||
|
||||
local amountOfCasts = info.instancia.showing:GetSpellCastAmount(self:Name(), spellName)
|
||||
local amountOfCasts = breakdownWindowFrame.instancia.showing:GetSpellCastAmount(self:Name(), spellName)
|
||||
if (not amountOfCasts) then
|
||||
amountOfCasts = "(|cFFFFFF00?|r)"
|
||||
end
|
||||
|
||||
+22
-10
@@ -270,6 +270,7 @@ local instanceMixins = {
|
||||
end,
|
||||
|
||||
---call a refresh in the data shown in the instance
|
||||
---@param instance instance
|
||||
---@param bForceRefresh boolean|nil
|
||||
RefreshData = function(instance, bForceRefresh) --deprecates Details:RefreshAllMainWindows()
|
||||
local combatObject = instance:GetCombat()
|
||||
@@ -282,9 +283,20 @@ local instanceMixins = {
|
||||
return
|
||||
end
|
||||
|
||||
--debug: check if the if combatObject has been destroyed
|
||||
if (combatObject.__destroyed) then
|
||||
Details:Msg("a deleted combat object was found refreshing a window, please report this bug on discord:")
|
||||
Details:Msg("combat destroyed by:", combatObject.__destroyedBy)
|
||||
local bForceChange = true
|
||||
instance:SetSegment(DETAILS_SEGMENTID_CURRENT, bForceChange)
|
||||
return
|
||||
end
|
||||
|
||||
local mainAttribute, subAttribute = instance:GetDisplay()
|
||||
|
||||
local needRefresh = combatObject:GetContainer(mainAttribute).need_refresh
|
||||
---@type actorcontainer
|
||||
local actorContainer = combatObject:GetContainer(mainAttribute)
|
||||
local needRefresh = actorContainer.need_refresh
|
||||
if (not needRefresh and not bForceRefresh) then
|
||||
return
|
||||
end
|
||||
@@ -513,7 +525,7 @@ local instanceMixins = {
|
||||
Details:SendEvent("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instance, attributeId, subAttributeId)
|
||||
end
|
||||
|
||||
if (Details.playerDetailWindow:IsShown() and instance == Details.playerDetailWindow.instancia) then
|
||||
if (Details.BreakdownWindowFrame:IsShown() and instance == Details.BreakdownWindowFrame.instancia) then
|
||||
---@type combat
|
||||
local combatObject = instance:GetCombat()
|
||||
if (not combatObject or instance.atributo > 4) then
|
||||
@@ -2393,7 +2405,7 @@ function Details:PostponeSwitchToCurrent(instance)
|
||||
(instance.ativa) and
|
||||
(instance.last_interaction+3 < Details._tempo) and
|
||||
(not DetailsReportWindow or not DetailsReportWindow:IsShown()) and
|
||||
(not Details.playerDetailWindow:IsShown())
|
||||
(not Details.BreakdownWindowFrame:IsShown())
|
||||
)
|
||||
) then
|
||||
instance._postponing_switch = nil
|
||||
@@ -2419,7 +2431,7 @@ function Details:CheckSwitchToCurrent()
|
||||
instance.last_interaction = Details._tempo
|
||||
end
|
||||
|
||||
if ((instance.last_interaction and (instance.last_interaction+3 > Details._tempo)) or (DetailsReportWindow and DetailsReportWindow:IsShown()) or (Details.playerDetailWindow:IsShown())) then
|
||||
if ((instance.last_interaction and (instance.last_interaction+3 > Details._tempo)) or (DetailsReportWindow and DetailsReportWindow:IsShown()) or (Details.BreakdownWindowFrame:IsShown())) then
|
||||
--postpone
|
||||
--instance._postponing_switch = Details:ScheduleTimer("PostponeSwitchToCurrent", 1, instance)
|
||||
instance._postponing_switch = Details.Schedules.NewTimer(1, Details.PostponeSwitchToCurrent, Details, instance)
|
||||
@@ -2831,11 +2843,11 @@ function _detalhes:TrocaTabela(instance, segmentId, attributeId, subAttributeId,
|
||||
instance:ChangeIcon()
|
||||
end
|
||||
|
||||
if (Details.playerDetailWindow:IsShown() and instance == Details.playerDetailWindow.instancia) then
|
||||
if (Details.BreakdownWindowFrame:IsShown() and instance == Details.BreakdownWindowFrame.instancia) then
|
||||
if (not instance.showing or instance.atributo > 4) then
|
||||
Details:CloseBreakdownWindow()
|
||||
else
|
||||
local actorObject = instance.showing (instance.atributo, Details.playerDetailWindow.jogador.nome)
|
||||
local actorObject = instance.showing (instance.atributo, Details.BreakdownWindowFrame.jogador.nome)
|
||||
if (actorObject) then
|
||||
Details:OpenBreakdownWindow(instance, actorObject, true)
|
||||
else
|
||||
@@ -3387,13 +3399,13 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
--push it to front
|
||||
local t = tremove(_detalhes.latest_report_table, already_exists)
|
||||
t [4] = amt
|
||||
tinsert(_detalhes.latest_report_table, 1, t)
|
||||
table.insert(_detalhes.latest_report_table, 1, t)
|
||||
else
|
||||
if (self.atributo == 5) then
|
||||
local custom_name = self:GetCustomObject():GetName()
|
||||
tinsert(_detalhes.latest_report_table, 1, {self.meu_id, self.atributo, self.sub_atributo, amt, _detalhes.report_where, custom_name})
|
||||
table.insert(_detalhes.latest_report_table, 1, {self.meu_id, self.atributo, self.sub_atributo, amt, _detalhes.report_where, custom_name})
|
||||
else
|
||||
tinsert(_detalhes.latest_report_table, 1, {self.meu_id, self.atributo, self.sub_atributo, amt, _detalhes.report_where})
|
||||
table.insert(_detalhes.latest_report_table, 1, {self.meu_id, self.atributo, self.sub_atributo, amt, _detalhes.report_where})
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3532,7 +3544,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
if (is_reverse) then
|
||||
local t = {}
|
||||
for i = #raw_data_to_report, 1, -1 do
|
||||
tinsert(t, raw_data_to_report [i])
|
||||
table.insert(t, raw_data_to_report [i])
|
||||
if (#t >= amt) then
|
||||
break
|
||||
end
|
||||
|
||||
+12
-12
@@ -56,7 +56,7 @@ local headerColor = "yellow"
|
||||
|
||||
local actor_class_color_r, actor_class_color_g, actor_class_color_b
|
||||
|
||||
local info = _detalhes.playerDetailWindow
|
||||
local breakdownWindowFrame = Details.BreakdownWindowFrame
|
||||
local keyName
|
||||
|
||||
|
||||
@@ -1046,14 +1046,14 @@ end
|
||||
|
||||
---------DETALHES BIFURCA��O
|
||||
function atributo_energy:MontaInfo()
|
||||
if (info.sub_atributo <= 4) then
|
||||
if (breakdownWindowFrame.sub_atributo <= 4) then
|
||||
return self:MontaInfoRegenRecebido()
|
||||
end
|
||||
end
|
||||
|
||||
---------DETALHES bloco da direita BIFURCA��O
|
||||
function atributo_energy:MontaDetalhes (spellid, barra)
|
||||
if (info.sub_atributo <= 4) then
|
||||
if (breakdownWindowFrame.sub_atributo <= 4) then
|
||||
return self:MontaDetalhesRegenRecebido (spellid, barra)
|
||||
end
|
||||
end
|
||||
@@ -1064,11 +1064,11 @@ function atributo_energy:MontaInfoRegenRecebido()
|
||||
|
||||
reset_tooltips_table()
|
||||
|
||||
local barras = info.barras1
|
||||
local barras2 = info.barras2
|
||||
local barras3 = info.barras3
|
||||
local barras = breakdownWindowFrame.barras1
|
||||
local barras2 = breakdownWindowFrame.barras2
|
||||
local barras3 = breakdownWindowFrame.barras3
|
||||
|
||||
local instancia = info.instancia
|
||||
local instancia = breakdownWindowFrame.instancia
|
||||
|
||||
local tabela_do_combate = instancia.showing
|
||||
local container = tabela_do_combate [class_type]
|
||||
@@ -1188,7 +1188,7 @@ function atributo_energy:MontaInfoRegenRecebido()
|
||||
break
|
||||
end
|
||||
|
||||
barra = info.barras2 [index]
|
||||
barra = breakdownWindowFrame.barras2 [index]
|
||||
|
||||
if (not barra) then
|
||||
barra = gump:CriaNovaBarraInfo2 (instancia, index)
|
||||
@@ -1229,10 +1229,10 @@ function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
|
||||
|
||||
reset_tooltips_table()
|
||||
|
||||
local barras = info.barras3
|
||||
local instancia = info.instancia
|
||||
local barras = breakdownWindowFrame.barras3
|
||||
local instancia = breakdownWindowFrame.instancia
|
||||
|
||||
local tabela_do_combate = info.instancia.showing
|
||||
local tabela_do_combate = breakdownWindowFrame.instancia.showing
|
||||
local container = tabela_do_combate [class_type]
|
||||
|
||||
local total_regenerado = self.received
|
||||
@@ -1321,7 +1321,7 @@ end
|
||||
|
||||
function atributo_energy:MontaTooltipAlvos (esta_barra, index)
|
||||
|
||||
local instancia = info.instancia
|
||||
local instancia = breakdownWindowFrame.instancia
|
||||
local tabela_do_combate = instancia.showing
|
||||
local container = tabela_do_combate [class_type]
|
||||
|
||||
|
||||
+13
-13
@@ -47,7 +47,7 @@ local UsingCustomRightText = false
|
||||
|
||||
local TooltipMaximizedMethod = 1
|
||||
|
||||
local info = _detalhes.playerDetailWindow
|
||||
local breakdownWindowFrame = Details.BreakdownWindowFrame
|
||||
local keyName
|
||||
|
||||
local headerColor = "yellow"
|
||||
@@ -2042,14 +2042,14 @@ end
|
||||
|
||||
---------DETALHES BIFURCA��O
|
||||
function atributo_misc:MontaInfo()
|
||||
if (info.sub_atributo == 3) then --interrupt
|
||||
if (breakdownWindowFrame.sub_atributo == 3) then --interrupt
|
||||
return self:MontaInfoInterrupt()
|
||||
end
|
||||
end
|
||||
|
||||
---------DETALHES bloco da direita BIFURCA��O
|
||||
function atributo_misc:MontaDetalhes (spellid, barra)
|
||||
if (info.sub_atributo == 3) then --interrupt
|
||||
if (breakdownWindowFrame.sub_atributo == 3) then --interrupt
|
||||
return self:MontaDetalhesInterrupt (spellid, barra)
|
||||
end
|
||||
end
|
||||
@@ -2065,8 +2065,8 @@ function atributo_misc:MontaInfoInterrupt()
|
||||
|
||||
local minha_tabela = self.interrupt_spells._ActorTable
|
||||
|
||||
local barras = info.barras1
|
||||
local instancia = info.instancia
|
||||
local barras = breakdownWindowFrame.barras1
|
||||
local instancia = breakdownWindowFrame.instancia
|
||||
|
||||
local meus_interrupts = {}
|
||||
|
||||
@@ -2110,13 +2110,13 @@ function atributo_misc:MontaInfoInterrupt()
|
||||
|
||||
--isso aqui � tudo da sele��o e descele��o das barras
|
||||
|
||||
if (not info.mostrando_mouse_over) then
|
||||
if (not breakdownWindowFrame.mostrando_mouse_over) then
|
||||
if (tabela[1] == self.detalhes) then --tabela [1] = spellid = spellid que esta na caixa da direita
|
||||
if (not barra.on_focus) then --se a barra n�o tiver no foco
|
||||
barra.textura:SetStatusBarColor(129/255, 125/255, 69/255, 1)
|
||||
barra.on_focus = true
|
||||
if (not info.mostrando) then
|
||||
info.mostrando = barra
|
||||
if (not breakdownWindowFrame.mostrando) then
|
||||
breakdownWindowFrame.mostrando = barra
|
||||
end
|
||||
end
|
||||
else
|
||||
@@ -2166,7 +2166,7 @@ function atributo_misc:MontaInfoInterrupt()
|
||||
local barra
|
||||
for index, tabela in ipairs(meus_alvos) do
|
||||
|
||||
barra = info.barras2 [index]
|
||||
barra = breakdownWindowFrame.barras2 [index]
|
||||
|
||||
if (not barra) then
|
||||
barra = gump:CriaNovaBarraInfo2 (instancia, index)
|
||||
@@ -2214,7 +2214,7 @@ function atributo_misc:MontaDetalhesInterrupt (spellid, barra)
|
||||
local nome, _, icone = _GetSpellInfo(spellid)
|
||||
local infospell = {nome, nil, icone}
|
||||
|
||||
_detalhes.playerDetailWindow.spell_icone:SetTexture(infospell[3])
|
||||
Details.BreakdownWindowFrame.spell_icone:SetTexture(infospell[3])
|
||||
|
||||
local total = self.interrupt
|
||||
local meu_total = esta_magia.counter
|
||||
@@ -2223,8 +2223,8 @@ function atributo_misc:MontaDetalhesInterrupt (spellid, barra)
|
||||
|
||||
local data = {}
|
||||
|
||||
local barras = info.barras3
|
||||
local instancia = info.instancia
|
||||
local barras = breakdownWindowFrame.barras3
|
||||
local instancia = breakdownWindowFrame.instancia
|
||||
|
||||
local habilidades_alvos = {}
|
||||
for spellid, amt in pairs(esta_magia.interrompeu_oque) do
|
||||
@@ -2278,7 +2278,7 @@ function atributo_misc:MontaTooltipAlvos (esta_barra, index)
|
||||
local inimigo = esta_barra.nome_inimigo
|
||||
|
||||
local container
|
||||
if (info.instancia.sub_atributo == 3) then --interrupt
|
||||
if (breakdownWindowFrame.instancia.sub_atributo == 3) then --interrupt
|
||||
container = self.interrupt_spells._ActorTable
|
||||
end
|
||||
|
||||
|
||||
@@ -447,6 +447,7 @@ function segmentClass:ResetOverallData()
|
||||
Details:CloseBreakdownWindow()
|
||||
|
||||
Details:DestroyCombat(Details.tabela_overall)
|
||||
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
|
||||
Details.tabela_overall = combatClass:NovaTabela()
|
||||
|
||||
for index, instanceObject in ipairs(Details:GetAllInstances()) do
|
||||
@@ -501,10 +502,17 @@ function segmentClass:ResetAllCombatData()
|
||||
for _, combatObject in ipairs(Details.tabela_historico.tabelas) do
|
||||
---@cast combatObject combat
|
||||
Details:DestroyCombat(combatObject)
|
||||
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
|
||||
end
|
||||
|
||||
--the current combat when finished will be moved to the first index of "tabela_historico.tabelas", need the check if the current combat was already destroyed
|
||||
if (not Details.tabela_vigente.__destroyed) then
|
||||
Details:DestroyCombat(Details.tabela_vigente)
|
||||
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
|
||||
end
|
||||
|
||||
Details:DestroyCombat(Details.tabela_vigente)
|
||||
Details:DestroyCombat(Details.tabela_overall)
|
||||
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
|
||||
Details:Destroy(Details.spellcache)
|
||||
|
||||
if (Details.schedule_add_to_overall) then --deprecated
|
||||
|
||||
Reference in New Issue
Block a user