More bug fixes

This commit is contained in:
Tercio Jose
2022-10-12 18:37:00 -03:00
parent 69899679e7
commit 6243a32740
90 changed files with 5200 additions and 5212 deletions
+3 -3
View File
@@ -74,11 +74,11 @@
end
function combate:InstanceType()
return rawget (self, "instance_type")
return rawget(self, "instance_type")
end
function combate:IsTrash()
return rawget (self, "is_trash")
return rawget(self, "is_trash")
end
function combate:GetDifficulty()
@@ -161,7 +161,7 @@
elseif (self.is_mythic_dungeon_trash) then
return self.is_mythic_dungeon_trash.ZoneName .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")"
elseif (rawget (self, "is_trash")) then
elseif (rawget(self, "is_trash")) then
return Loc ["STRING_SEGMENT_TRASH"]
else
+461 -488
View File
File diff suppressed because it is too large Load Diff
+172 -169
View File
@@ -454,7 +454,7 @@ end
local total = 0
if (Details.time_type == 2 or not Details:CaptureGet ("damage")) then
if (Details.time_type == 2 or not Details:CaptureGet("damage")) then
for _, actor in ipairs(container) do
if (actor.grupo) then
actor.last_dps = actor.total / combat_time
@@ -661,8 +661,8 @@ end
local lineHeight = Details.tooltip.line_height
for index, t in ipairs(Targets) do
GameCooltip:AddLine(Details:GetOnlyName(t[1]), Details:ToK(t[2]) .. " (" .. format ("%.1f", t[2]/total*100) .. "%)")
local class, _, _, _, _, r, g, b = Details:GetClass (t[1])
GameCooltip:AddLine(Details:GetOnlyName(t[1]), Details:ToK(t[2]) .. " (" .. format("%.1f", t[2]/total*100) .. "%)")
local class, _, _, _, _, r, g, b = Details:GetClass(t[1])
GameCooltip:AddStatusBar (t[2]/top*100, 1, r, g, b, 0.8, false, byspell_tooltip_background)
@@ -903,7 +903,7 @@ end
}
local new_code = DTBS_search_code
new_code = new_code:gsub ("@SPELLID@", spell [1])
new_code = new_code:gsub("@SPELLID@", spell [1])
new_custom_object.script = new_code
tinsert(Details.custom, new_custom_object)
@@ -914,7 +914,7 @@ end
end
local DTBS_format_name = function(player_name) return Details:GetOnlyName(player_name) end
local DTBS_format_amount = function(amount) return Details:ToK(amount) .. " (" .. format ("%.1f", amount / bs_tooltip_table.damage_total * 100) .. "%)" end
local DTBS_format_amount = function(amount) return Details:ToK(amount) .. " (" .. format("%.1f", amount / bs_tooltip_table.damage_total * 100) .. "%)" end
function atributo_damage:ReportSingleDTBSLine (spell, instance, ShiftKeyDown, ControlKeyDown)
if (ControlKeyDown) then
@@ -927,12 +927,12 @@ end
local spelllink = Details:GetSpellLink(spell [1])
local report_table = {"Details!: " .. Loc ["STRING_CUSTOM_DTBS"] .. " " .. spelllink}
Details:FormatReportLines (report_table, bs_tooltip_table, DTBS_format_name, DTBS_format_amount)
Details:FormatReportLines(report_table, bs_tooltip_table, DTBS_format_name, DTBS_format_amount)
return Details:Reportar (report_table, {_no_current = true, _no_inverse = true, _custom = true})
return Details:Reportar(report_table, {_no_current = true, _no_inverse = true, _custom = true})
end
function atributo_damage:AtualizarBySpell (tabela, whichRowLine, colocacao, instance)
function atributo_damage:AtualizarBySpell(tabela, whichRowLine, colocacao, instance)
tabela ["byspell"] = true --marca que esta tabela uma tabela de frags, usado no controla na hora de montar o tooltip
local thisLine = instance.barras [whichRowLine] --pega a referncia da barra na janela
@@ -943,9 +943,9 @@ end
thisLine.minha_tabela = tabela
local spellname, _, spellicon = _GetSpellInfo(tabela [1])
local spellName, _, spellIcon = _GetSpellInfo(tabela[1])
tabela.nome = spellname --evita dar erro ao redimencionar a janela
tabela.nome = spellName --evita dar erro ao redimencionar a janela
tabela.minha_barra = whichRowLine
thisLine.colocacao = colocacao
@@ -958,27 +958,29 @@ end
local porcentagem
if (instance.row_info.percent_type == 1) then
porcentagem = format ("%.1f", tabela [2] / total * 100)
porcentagem = format("%.1f", tabela [2] / total * 100)
elseif (instance.row_info.percent_type == 2) then
porcentagem = format ("%.1f", tabela [2] / instance.top * 100)
porcentagem = format("%.1f", tabela [2] / instance.top * 100)
end
thisLine.lineText1:SetText(colocacao .. ". " .. spellname)
thisLine.lineText1:SetText(colocacao .. ". " .. spellName)
local bars_show_data = instance.row_info.textR_show_data
local spell_damage = tabela [2] -- spell_damage passar por uma ToK function, precisa ser number
local spell_damage = tabela[2] -- spell_damage passar por uma ToK function, precisa ser number
if (not bars_show_data [1]) then
spell_damage = tabela [2] --damage taken by spell no tem PS, ento obrigado a passar o dano total
spell_damage = tabela[2] --damage taken by spell no tem PS, ento obrigado a passar o dano total
end
if (not bars_show_data [3]) then
if (not bars_show_data[3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
local bars_brackets = instance:GetBarBracket()
--
if (instance.use_multi_fontstrings) then
instance:SetInLineTexts(thisLine, "", (spell_damage and SelectedToKFunction(_, spell_damage) or ""), porcentagem)
else
@@ -995,7 +997,7 @@ end
if (colocacao == 1) then
thisLine:SetValue(100)
else
thisLine:SetValue(tabela [2] / instance.top * 100)
thisLine:SetValue(tabela[2] / instance.top * 100)
end
if (thisLine.hidden or thisLine.fading_in or thisLine.faded) then
@@ -1004,15 +1006,15 @@ end
if (instance.row_info.texture_class_colors) then
if (tabela [3] > 1) then
local r, g, b = Details:GetSpellSchoolColor (tabela [3])
local r, g, b = Details:GetSpellSchoolColor(tabela[3])
thisLine.textura:SetVertexColor(r, g, b)
else
local r, g, b = Details:GetSpellSchoolColor (0)
local r, g, b = Details:GetSpellSchoolColor(0)
thisLine.textura:SetVertexColor(r, g, b)
end
end
thisLine.icone_classe:SetTexture(spellicon)
thisLine.icone_classe:SetTexture(spellIcon)
thisLine.icone_classe:SetTexCoord(0.078125, 0.921875, 0.078125, 0.921875)
thisLine.icone_classe:SetVertexColor(1, 1, 1)
end
@@ -1081,7 +1083,7 @@ end
for i = 1, math.min (min, #damage_taken_table) do
local t = damage_taken_table [i]
GameCooltip:AddLine(Details:GetOnlyName(t[1]), FormatTooltipNumber (_, t[2]) .. " (" .. format ("%.1f", t[2] / total * 100) .. "%)")
GameCooltip:AddLine(Details:GetOnlyName(t[1]), FormatTooltipNumber (_, t[2]) .. " (" .. format("%.1f", t[2] / total * 100) .. "%)")
local classe = t[3]
if (not classe) then
classe = "UNKNOW"
@@ -1100,7 +1102,7 @@ end
end
end
local _, _, _, _, _, r, g, b = Details:GetClass (t[1])
local _, _, _, _, _, r, g, b = Details:GetClass(t[1])
GameCooltip:AddStatusBar (t[2] / top * 100, 1, r, g, b, 1, false, enemies_background)
end
else
@@ -1147,9 +1149,9 @@ end
local porcentagem
if (instancia.row_info.percent_type == 1) then
porcentagem = format ("%.1f", tabela [2] / total * 100)
porcentagem = format("%.1f", tabela [2] / total * 100)
elseif (instancia.row_info.percent_type == 2) then
porcentagem = format ("%.1f", tabela [2] / instancia.top * 100)
porcentagem = format("%.1f", tabela [2] / instancia.top * 100)
end
thisLine.lineText1:SetText(colocacao .. ". " .. tabela [1])
@@ -1189,7 +1191,7 @@ end
Details.FadeHandler.Fader(thisLine, "out")
end
Details:SetBarColors (thisLine, instancia, unpack(Details.class_colors [tabela [3]]))
Details:SetBarColors(thisLine, instancia, unpack(Details.class_colors [tabela [3]]))
if (tabela [3] == "UNKNOW" or tabela [3] == "UNGROUPPLAYER" or tabela [3] == "ENEMY") then
thisLine.icone_classe:SetTexture([[Interface\AddOns\Details\images\classes_plus]])
@@ -1278,7 +1280,7 @@ end
for index, t in ipairs(tooltip_void_zone_temp) do
instance_container:AddValue (t[4], t[2])
local custom_actor = instance_container:GetActorTable (t[4])
local custom_actor = instance_container:GetActorTable(t[4])
custom_actor.uptime = t[3].uptime
total = total + t[2]
@@ -1340,12 +1342,12 @@ end
}
local new_code = AVZ_search_code
new_code = new_code:gsub ("@ACTORNAME@", actor.nome)
new_code = new_code:gsub("@ACTORNAME@", actor.nome)
new_custom_object.script = new_code
local new_total_code = AVZ_total_code
new_total_code = new_total_code:gsub ("@ACTORNAME@", actor.nome)
new_total_code = new_total_code:gsub ("@SPELLID@", spellid)
new_total_code = new_total_code:gsub("@ACTORNAME@", actor.nome)
new_total_code = new_total_code:gsub("@SPELLID@", spellid)
new_custom_object.total_script = new_total_code
tinsert(Details.custom, new_custom_object)
@@ -1495,7 +1497,7 @@ end
GameCooltip:AddLine(Details:GetOnlyName(t[1]), FormatTooltipNumber (_, debuff_table.damage) .. " (" .. segundos .. "s" .. ")")
end
local classe = Details:GetClass (t[1])
local classe = Details:GetClass(t[1])
if (classe) then
local specID = Details:GetSpec (t[1])
if (specID) then
@@ -1508,7 +1510,7 @@ end
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, lineHeight, lineHeight, .25, .5, 0, 1)
end
local _, _, _, _, _, r, g, b = Details:GetClass (t[1])
local _, _, _, _, _, r, g, b = Details:GetClass(t[1])
if (first == 0) then
first = 0.0000000001
end
@@ -1531,9 +1533,8 @@ end
end
function atributo_misc:AtualizarVoidZone (whichRowLine, colocacao, instancia)
--pega a referncia da barra na janela
local thisLine = instancia.barras [whichRowLine]
local thisLine = instancia.barras[whichRowLine]
if (not thisLine) then
print("DEBUG: problema com <instancia.thisLine> "..whichRowLine.." "..rank)
@@ -1561,10 +1562,11 @@ end
if (instancia.row_info.percent_type == 1) then
total = max(total, 0.0001)
porcentagem = format ("%.1f", self.damage / total * 100)
porcentagem = format("%.1f", self.damage / total * 100)
elseif (instancia.row_info.percent_type == 2) then
local top = max(instancia.top, 0.0001)
porcentagem = format ("%.1f", self.damage / top * 100)
porcentagem = format("%.1f", self.damage / top * 100)
end
local bars_show_data = instancia.row_info.textR_show_data
@@ -1574,9 +1576,11 @@ end
if (not bars_show_data [1]) then
formated_damage = ""
end
if (not bars_show_data [2]) then
formated_dps = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
@@ -1612,7 +1616,7 @@ end
school_color = Details.school_colors ["unknown"]
end
Details:SetBarColors (thisLine, instancia, unpack(school_color))
Details:SetBarColors(thisLine, instancia, unpack(school_color))
thisLine.icone_classe:SetTexture(icon)
thisLine.icone_classe:SetTexCoord(0.078125, 0.921875, 0.078125, 0.921875)
@@ -1621,7 +1625,6 @@ end
if (thisLine.mouse_over and not instancia.baseframe.isMoving) then
--need call a refresh function
end
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -1850,7 +1853,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
this_spell [2] = this_spell [2] + on_player
total = total + on_player
else
error ("error - no spell id for DTBS " .. spellid)
error("error - no spell id for DTBS " .. spellid)
end
end
end
@@ -1885,7 +1888,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
this_spell [2] = this_spell [2] + on_player
total = total + on_player
else
error ("error - no spell id for DTBS friendly fire " .. spellid)
error("error - no spell id for DTBS friendly fire " .. spellid)
end
end
end
@@ -1986,7 +1989,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
local found = false
for spellid, spelltable in pairs(twin_damage_actor.spells._ActorTable) do
local name = _GetSpellInfo(spellid)
if (actor.damage_twin:find (name)) then
if (actor.damage_twin:find(name)) then
actor.damage = spelltable.total
voidzone_damage_total = voidzone_damage_total + spelltable.total
actor.damage_spellid = spellid
@@ -2317,9 +2320,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
end
elseif (instancia.bars_sort_direction == 2) then --bottom to top
if (useTotalBar and instancia.barraS[1] == 1) then
whichRowLine = 2
local iter_last = instancia.barraS[2]
if (iter_last == instancia.rows_fit_in_window) then
@@ -2600,19 +2601,19 @@ function atributo_damage:RefreshLine(instance, lineContainer, whichRowLine, rank
--calc the percent amount base on the percent type
if (percentage_type == 1) then
percentString = format ("%.1f", self [keyName] / total * 100)
percentString = format("%.1f", self[keyName] / total * 100)
elseif (percentage_type == 2) then
percentString = format ("%.1f", self [keyName] / instance.top * 100)
percentString = format("%.1f", self[keyName] / instance.top * 100)
end
--calculate the actor dps
if ((Details.time_type == 2 and self.grupo) or not Details:CaptureGet ("damage") or instance.segmento == -1) then
if ((Details.time_type == 2 and self.grupo) or not Details:CaptureGet("damage") or instance.segmento == -1) then
if (instance.segmento == -1 and combat_time == 0) then
local p = Details.tabela_vigente (1, self.nome)
if (p) then
local t = p:Tempo()
dps = damageTotal / t
local actor = Details.tabela_vigente(1, self.nome)
if (actor) then
local combatTime = actor:Tempo()
dps = damageTotal / combatTime
self.last_dps = dps
else
dps = damageTotal / combat_time
@@ -2646,9 +2647,11 @@ function atributo_damage:RefreshLine(instance, lineContainer, whichRowLine, rank
if (not bars_show_data [1]) then
formated_damage = ""
end
if (not bars_show_data [2]) then
formated_dps = ""
end
if (not bars_show_data [3]) then
percentString = ""
else
@@ -3198,7 +3201,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
local petActor = instancia.showing[class_type]:PegarCombatente (nil, petName)
if (petActor) then
for _spellid, _skill in pairs(petActor:GetActorSpells()) do
ActorSkillsSortTable [#ActorSkillsSortTable+1] = {_spellid, _skill.total, _skill.total/meu_tempo, petName:gsub ((" <.*"), "")}
ActorSkillsSortTable [#ActorSkillsSortTable+1] = {_spellid, _skill.total, _skill.total/meu_tempo, petName:gsub((" <.*"), "")}
end
end
end
@@ -3366,7 +3369,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
for spellid, tabela in pairs(tabela) do
local nome, rank, icone = _GetSpellInfo(spellid)
tinsert (meus_danos, {spellid, tabela.total, tabela.total/meu_total*100, {nome, rank, icone}})
tinsert(meus_danos, {spellid, tabela.total, tabela.total/meu_total*100, {nome, rank, icone}})
end
_table_sort(meus_danos, Details.Sort2)
danos [nome] = meus_danos
@@ -3374,7 +3377,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
local meus_inimigos = {}
tabela = my_self.targets
for target_name, amount in pairs(tabela) do
tinsert (meus_inimigos, {target_name, amount, amount/meu_total*100})
tinsert(meus_inimigos, {target_name, amount, amount/meu_total*100})
end
_table_sort(meus_inimigos,Details.Sort2)
alvos [nome] = meus_inimigos
@@ -3418,7 +3421,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
end
local n = _table [1]:gsub (("%s%<.*"), "")
local n = _table [1]:gsub(("%s%<.*"), "")
if (instancia.sub_atributo == 1) then
GameCooltip:AddLine(n, FormatTooltipNumber (_, _table [2]) .. " (" .. _math_floor(_table [2]/self.total*100) .. "%)")
else
@@ -3474,7 +3477,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
for i = 1, #playerPhases do
--[1] Phase Number [2] Amount Done [3] Rank [4] Percent
GameCooltip:AddLine("|cFFF0F0F0Phase|r " .. playerPhases [i][1], FormatTooltipNumber (_, playerPhases [i][2]) .. " (|cFFFFFF00#" .. playerPhases [i][3] .. "|r, " .. format ("%.1f", playerPhases [i][4]) .. "%)")
GameCooltip:AddLine("|cFFF0F0F0Phase|r " .. playerPhases [i][1], FormatTooltipNumber (_, playerPhases [i][2]) .. " (|cFFFFFF00#" .. playerPhases [i][3] .. "|r, " .. format("%.1f", playerPhases [i][4]) .. "%)")
GameCooltip:AddIcon ([[Interface\Garrison\orderhall-missions-mechanic9]], 1, 1, 14, 14, 11/64, 53/64, 11/64, 53/64)
Details:AddTooltipBackgroundStatusbar()
end
@@ -3496,7 +3499,7 @@ local on_switch_show_frags = function(instance)
end
local ENEMIES_format_name = function(player) if (player == 0) then return false end return Details:GetOnlyName(player.nome) end
local ENEMIES_format_amount = function(amount) if (amount <= 0) then return false end return Details:ToK(amount) .. " (" .. format ("%.1f", amount / tooltip_temp_table.damage_total * 100) .. "%)" end
local ENEMIES_format_amount = function(amount) if (amount <= 0) then return false end return Details:ToK(amount) .. " (" .. format("%.1f", amount / tooltip_temp_table.damage_total * 100) .. "%)" end
function atributo_damage:ReportEnemyDamageTaken (actor, instance, ShiftKeyDown, ControlKeyDown, fromFrags)
if (ShiftKeyDown) then
@@ -3544,7 +3547,7 @@ function atributo_damage:ReportEnemyDamageTaken (actor, instance, ShiftKeyDown,
end
local FRAGS_format_name = function(player_name) return Details:GetOnlyName(player_name) end
local FRAGS_format_amount = function(amount) return Details:ToK(amount) .. " (" .. format ("%.1f", amount / frags_tooltip_table.damage_total * 100) .. "%)" end
local FRAGS_format_amount = function(amount) return Details:ToK(amount) .. " (" .. format("%.1f", amount / frags_tooltip_table.damage_total * 100) .. "%)" end
function atributo_damage:ReportSingleFragsLine (frag, instance, ShiftKeyDown, ControlKeyDown)
@@ -3614,7 +3617,7 @@ function atributo_damage:ToolTip_Enemies (instancia, numero, barra, keydown)
local total = tooltip_temp_table [o][2]
local player_name = Details:GetOnlyName(player:name())
GameCooltip:AddLine(player_name .. " ", FormatTooltipNumber (_, total) .." (" .. format ("%.1f", (total / damage_taken) * 100) .. "%)")
GameCooltip:AddLine(player_name .. " ", FormatTooltipNumber (_, total) .." (" .. format("%.1f", (total / damage_taken) * 100) .. "%)")
local classe = player:class()
if (not classe) then
@@ -3792,14 +3795,14 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
for _, spell in ipairs(all_spells) do
local spellname, _, spellicon = _GetSpellInfo(spell [1])
GameCooltip:AddLine(spellname .. " (|cFFFFFF00" .. spell [3] .. "|r)", FormatTooltipNumber (_, spell [2]).." (" .. format ("%.1f", (spell [2] / damage_taken) * 100).."%)")
GameCooltip:AddLine(spellname .. " (|cFFFFFF00" .. spell [3] .. "|r)", FormatTooltipNumber (_, spell [2]).." (" .. format("%.1f", (spell [2] / damage_taken) * 100).."%)")
GameCooltip:AddIcon (spellicon, 1, 1, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
Details:AddTooltipBackgroundStatusbar()
end
else
local aggressorName = Details:GetOnlyName(meus_agressores[i][1])
if (ismaximized and meus_agressores[i][1]:find (Details.playername)) then
if (ismaximized and meus_agressores[i][1]:find(Details.playername)) then
GameCooltip:AddLine(aggressorName, FormatTooltipNumber (_, meus_agressores[i][2]).." ("..format("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)", nil, "yellow")
else
GameCooltip:AddLine(aggressorName, FormatTooltipNumber (_, meus_agressores[i][2]).." ("..format("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)")
@@ -3971,16 +3974,18 @@ end
function atributo_damage:MontaDetalhes (spellid, barra, instancia)
if (info.sub_atributo == 1 or info.sub_atributo == 2) then
return self:MontaDetalhesDamageDone (spellid, barra, instancia)
elseif (info.sub_atributo == 3) then
return self:MontaDetalhesDamageTaken (spellid, barra, instancia)
elseif (info.sub_atributo == 4) then
return self:MontaDetalhesFriendlyFire (spellid, barra, instancia)
elseif (info.sub_atributo == 6) then
if (bitBand(self.flag_original, 0x00000400) ~= 0) then -- um jogador
return self:MontaDetalhesDamageDone (spellid, barra, instancia)
end
return self:MontaDetalhesEnemy (spellid, barra, instancia)
--return self:MontaDetalhesDamageDone (spellid, barra)
end
end
@@ -4003,7 +4008,7 @@ function atributo_damage:MontaInfoFriendlyFire()
local actor = combat (1, target_name)
if (actor) then
tinsert (DamagedPlayers, {target_name, ff_table.total, ff_table.total / FriendlyFireTotal * 100, actor.classe})
tinsert(DamagedPlayers, {target_name, ff_table.total, ff_table.total / FriendlyFireTotal * 100, actor.classe})
for spellid, amount in pairs(ff_table.spells) do
Skills [spellid] = (Skills [spellid] or 0) + amount
@@ -4023,14 +4028,14 @@ function atributo_damage:MontaInfoFriendlyFire()
if (not barra) then
barra = gump:CriaNovaBarraInfo1 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
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 no tiver no foco
barra.textura:SetStatusBarColor (129/255, 125/255, 69/255, 1)
barra.textura:SetStatusBarColor(129/255, 125/255, 69/255, 1)
barra.on_focus = true
if (not info.mostrando) then
info.mostrando = barra
@@ -4038,7 +4043,7 @@ function atributo_damage:MontaInfoFriendlyFire()
end
else
if (barra.on_focus) then
barra.textura:SetStatusBarColor (1, 1, 1, 1) --volta a cor antiga
barra.textura:SetStatusBarColor(1, 1, 1, 1) --volta a cor antiga
barra:SetAlpha(.9) --volta a alfa antiga
barra.on_focus = false
end
@@ -4052,7 +4057,7 @@ function atributo_damage:MontaInfoFriendlyFire()
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
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
@@ -4069,9 +4074,9 @@ function atributo_damage:MontaInfoFriendlyFire()
local color = Details.class_colors [classe]
if (color) then
barra.textura:SetStatusBarColor (unpack(color))
barra.textura:SetStatusBarColor(unpack(color))
else
barra.textura:SetStatusBarColor (1, 1, 1)
barra.textura:SetStatusBarColor(1, 1, 1)
end
barra.minha_tabela = self
@@ -4105,7 +4110,7 @@ function atributo_damage:MontaInfoFriendlyFire()
if (not barra) then
barra = gump:CriaNovaBarraInfo2 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra.textura:SetStatusBarColor(1, 1, 1, 1)
end
if (index == 1) then
@@ -4168,7 +4173,7 @@ function atributo_damage:MontaInfoDamageTaken()
barra = gump:CriaNovaBarraInfo1 (instancia, index)
end
self:FocusLock (barra, tabela[1])
self:FocusLock(barra, tabela[1])
local texCoords = Details.class_coords [tabela[4]]
if (not texCoords) then
@@ -4176,23 +4181,22 @@ function atributo_damage:MontaInfoDamageTaken()
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])
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, value_formated, max, percent, icon, detalhes, texCoords, spellschool, class)
--seta o tamanho da barra
--[[exported]] function Details:UpdadeInfoBar(row, index, spellId, name, value, formattedValue, max, percent, icon, detalhes, texCoords, spellSchool, class)
if (index == 1) then
row.textura:SetValue(100)
else
max = math.max(max, 0.001)
row.textura:SetValue(value/max*100)
row.textura:SetValue(value / max * 100)
end
if (type(index) == "number") then
if (debugmode) then
row.lineText1:SetText(index .. ". " .. name .. " (" .. spellid .. ")")
row.lineText1:SetText(index .. ". " .. name .. " (" .. spellId .. ")")
else
row.lineText1:SetText(index .. ". " .. name)
end
@@ -4202,13 +4206,12 @@ end
row.lineText1.text = row.lineText1:GetText()
if (value_formated) then
row.lineText4:SetText(value_formated .. " (" .. format ("%.1f", percent) .."%)")
if (formattedValue) then
row.lineText4:SetText(formattedValue .. " (" .. format("%.1f", percent) .."%)")
end
row.lineText1:SetSize(row:GetWidth() - row.lineText4:GetStringWidth() - 40, 15)
--seta o icone
if (icon) then
row.icone:SetTexture(icon)
if (icon == "Interface\\AddOns\\Details\\images\\classes_small") then
@@ -4230,48 +4233,48 @@ end
if (texCoords) then
row.icone:SetTexCoord(unpack(texCoords))
else
local icon_border = Details.tooltip.icon_border_texcoord
row.icone:SetTexCoord(icon_border.L, icon_border.R, icon_border.T, icon_border.B)
local iconBorder = Details.tooltip.icon_border_texcoord
row.icone:SetTexCoord(iconBorder.L, iconBorder.R, iconBorder.T, iconBorder.B)
end
row.minha_tabela = self
row.show = spellid
row:Show() --mostra a barra
row.show = spellId
row:Show()
if (spellschool) then
local t = Details.spells_school [spellschool]
if (t and t.decimals) then
row.textura:SetStatusBarColor (t.decimals[1], t.decimals[2], t.decimals[3])
if (spellSchool) then
local schoolColor = Details.spells_school[spellSchool]
if (schoolColor and schoolColor.decimals) then
row.textura:SetStatusBarColor(schoolColor.decimals[1], schoolColor.decimals[2], schoolColor.decimals[3])
else
row.textura:SetStatusBarColor (1, 1, 1)
row.textura:SetStatusBarColor(1, 1, 1)
end
elseif (class) then
local color = Details.class_colors [class]
local color = Details.class_colors[class]
if (color) then
row.textura:SetStatusBarColor (unpack(color))
row.textura:SetStatusBarColor(unpack(color))
else
row.textura:SetStatusBarColor (1, 1, 1)
row.textura:SetStatusBarColor(1, 1, 1)
end
else
if (spellid == 98021) then --spirit linkl
row.textura:SetStatusBarColor (1, 0.4, 0.4)
if (spellId == 98021) then --spirit linkl
row.textura:SetStatusBarColor(1, 0.4, 0.4)
else
row.textura:SetStatusBarColor (1, 1, 1)
row.textura:SetStatusBarColor(1, 1, 1)
end
end
if (detalhes and self.detalhes and self.detalhes == spellid and info.showing == index) then
--self:MontaDetalhes (spellid, row) --poderia deixar isso pro final e montar uma tail call??
self:MontaDetalhes (row.show, row, info.instancia) --poderia deixar isso pro final e montar uma tail call??
if (detalhes and self.detalhes and self.detalhes == spellId and info.showing == index) then
self:MontaDetalhes(row.show, row, info.instancia)
end
end
--[[exported]] function Details:FocusLock (row, spellid)
--lock into a line after clicking on it
--[[exported]] function Details:FocusLock(row, spellId)
if (not info.mostrando_mouse_over) then
if (spellid == self.detalhes) then --tabela [1] = spellid = spellid que esta na caixa da direita
if (spellId == self.detalhes) then --tabela [1] = spellid = spellid que esta na caixa da direita
if (not row.on_focus) then --se a barra no tiver no foco
row.textura:SetStatusBarColor (129/255, 125/255, 69/255, 1)
row.textura:SetStatusBarColor(129/255, 125/255, 69/255, 1)
row.on_focus = true
if (not info.mostrando) then
info.mostrando = row
@@ -4279,7 +4282,7 @@ end
end
else
if (row.on_focus) then
row.textura:SetStatusBarColor (1, 1, 1, 1) --volta a cor antiga
row.textura:SetStatusBarColor(1, 1, 1, 1) --volta a cor antiga
row:SetAlpha(.9) --volta a alfa antiga
row.on_focus = false
end
@@ -4289,34 +4292,34 @@ end
------ Damage Done & Dps
function atributo_damage:MontaInfoDamageDone()
local allLines = info.barras1
local instance = info.instancia
local totalDamageWithoutPet = self.total_without_pet --total de dano aplicado por este jogador
local barras = info.barras1
local instancia = info.instancia
local total = self.total_without_pet --total de dano aplicado por este jogador
local ActorTotalDamage = self.total
local ActorSkillsSortTable = {}
local ActorSkillsContainer = self.spells._ActorTable
local actorTotalDamage = self.total
local actorSkillsSortTable = {}
local actorSkillsContainer = self.spells._ActorTable
--get time type
local meu_tempo
local actorCombatTime
if (Details.time_type == 1 or not self.grupo) then
meu_tempo = self:Tempo()
actorCombatTime = self:Tempo()
elseif (Details.time_type == 2) then
meu_tempo = info.instancia.showing:GetCombatTime()
actorCombatTime = info.instancia.showing:GetCombatTime()
end
for _spellid, _skill in pairs(ActorSkillsContainer) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(_spellid)
for spellId, spellTable in pairs(actorSkillsContainer) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(spellId)
if (nome) then
tinsert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome, icone, nil, _skill.spellschool})
tinsert(actorSkillsSortTable, {spellId, spellTable.total, spellTable.total/actorTotalDamage*100, nome, icone, nil, spellTable.spellschool})
end
end
--damage rank
local combat = instancia:GetShowingCombat()
local combat = instance:GetShowingCombat()
local diff = combat:GetDifficulty()
local attribute, subattribute = instancia:GetDisplay()
local attribute, subAttribute = instance:GetDisplay()
--check if is a raid encounter and if is heroic or mythic
if (diff and (diff == 15 or diff == 16)) then
@@ -4326,7 +4329,7 @@ function atributo_damage:MontaInfoDamageDone()
if (bestRank) then
--discover which are the player position in the guild rank
local playerTable, onEncounter, rankPosition = Details.storage:GetPlayerGuildRank (diff, combat:GetBossInfo().id, "damage", self.nome, true)
local text1 = self.nome .. " Guild Rank on " .. (combat:GetBossInfo().name or "") .. ": |cFFFFFF00" .. (rankPosition or "x") .. "|r Best Dps: |cFFFFFF00" .. Details:ToK2((bestRank[1] or 0) / encounterTable.elapsed) .. "|r (" .. encounterTable.date:gsub (".*%s", "") .. ")"
local text1 = self.nome .. " Guild Rank on " .. (combat: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")
else
info:SetStatusbarText()
@@ -4344,45 +4347,45 @@ function atributo_damage:MontaInfoDamageDone()
local class_color = "FFCCBBBB"
--local class_color = "FFDDDD44"
for _, PetName in ipairs(ActorPets) do
local PetActor = instancia.showing (class_type, PetName)
local PetActor = instance.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spells._ActorTable
for _spellid, _skill in pairs(PetSkillsContainer) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(_spellid)
--tinsert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " |TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:0:128:128:33:64:96:128|t|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r", icone, PetActor, _skill.spellschool})
--tinsert(ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " |TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:0:128:128:33:64:96:128|t|c" .. class_color .. PetName:gsub((" <.*"), "") .. "|r", icone, PetActor, _skill.spellschool})
if (nome) then
tinsert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor, _skill.spellschool})
tinsert(actorSkillsSortTable, {_spellid, _skill.total, _skill.total/actorTotalDamage*100, nome .. " (|c" .. class_color .. PetName:gsub((" <.*"), "") .. "|r)", icone, PetActor, _skill.spellschool})
end
end
end
end
_table_sort(ActorSkillsSortTable, Details.Sort2)
_table_sort(actorSkillsSortTable, Details.Sort2)
gump:JI_AtualizaContainerBarras (#ActorSkillsSortTable + 1)
gump:JI_AtualizaContainerBarras (#actorSkillsSortTable + 1)
local max_ = ActorSkillsSortTable[1] and ActorSkillsSortTable[1][2] or 0 --dano que a primeiro magia vez
local max_ = actorSkillsSortTable[1] and actorSkillsSortTable[1][2] or 0 --dano que a primeiro magia vez
local barra
--aura bar
if (false) then --disabled for now
barra = barras [1]
barra = allLines [1]
if (not barra) then
barra = gump:CriaNovaBarraInfo1 (instancia, 1)
barra = gump:CriaNovaBarraInfo1 (instance, 1)
end
self:UpdadeInfoBar (barra, "", -51, "Auras", max_, false, max_, 100, [[Interface\BUTTONS\UI-GroupLoot-DE-Up]], true, nil, nil)
barra.textura:SetStatusBarColor (Details.gump:ParseColors("purple"))
self:UpdadeInfoBar(barra, "", -51, "Auras", max_, false, max_, 100, [[Interface\BUTTONS\UI-GroupLoot-DE-Up]], true, nil, nil)
barra.textura:SetStatusBarColor(Details.gump:ParseColors("purple"))
end
--spell bars
for index, tabela in ipairs(ActorSkillsSortTable) do
for index, tabela in ipairs(actorSkillsSortTable) do
--index = index + 1 --with the aura bar
index = index
barra = barras [index]
barra = allLines [index]
if (not barra) then
barra = gump:CriaNovaBarraInfo1 (instancia, index)
barra = gump:CriaNovaBarraInfo1 (instance, index)
end
barra.other_actor = tabela [6]
@@ -4390,22 +4393,22 @@ function atributo_damage:MontaInfoDamageDone()
local name = tabela[4]
if (info.sub_atributo == 2) then
local formated_value = SelectedToKFunction(_, _math_floor(tabela[2]/meu_tempo))
self:UpdadeInfoBar (barra, index, tabela[1], name, tabela[2], formated_value, max_, tabela[3], tabela[5], true, nil, tabela [7])
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
local formated_value = SelectedToKFunction(_, _math_floor(tabela[2]))
self:UpdadeInfoBar (barra, index, tabela[1], name, tabela[2], formated_value, max_, tabela[3], tabela[5], true, nil, tabela [7])
self:UpdadeInfoBar(barra, index, tabela[1], name, tabela[2], formated_value, max_, tabela[3], tabela[5], true, nil, tabela [7])
end
self:FocusLock (barra, tabela[1])
self:FocusLock(barra, tabela[1])
end
--TOP INIMIGOS
if (instancia.sub_atributo == 6) then
if (instance.sub_atributo == 6) then
local damage_taken = self.damage_taken
local agressores = self.damage_from
local tabela_do_combate = instancia.showing
local tabela_do_combate = instance.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.barras2
local meus_agressores = {}
@@ -4439,8 +4442,8 @@ function atributo_damage:MontaInfoDamageDone()
barra = barras [index]
if (not barra) then --se a barra no existir, criar ela ento
barra = gump:CriaNovaBarraInfo2 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1) --isso aqui a parte da seleo e desceleo
barra = gump:CriaNovaBarraInfo2 (instance, index)
barra.textura:SetStatusBarColor(1, 1, 1, 1) --isso aqui a parte da seleo e desceleo
end
if (index == 1) then
@@ -4450,7 +4453,7 @@ function atributo_damage:MontaInfoDamageDone()
end
barra.lineText1:SetText(index .. ". " .. 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
barra.lineText4:SetText(Details:comma_value (tabela[2]) .. " (" .. format("%.1f", tabela[3]) .. "%)") --seta o texto da direita
barra.icone:SetTexture([[Interface\AddOns\Details\images\classes_small_alpha]]) --CLASSE
@@ -4462,9 +4465,9 @@ function atributo_damage:MontaInfoDamageDone()
local color = Details.class_colors [tabela[4]]
if (color) then
barra.textura:SetStatusBarColor (unpack(color))
barra.textura:SetStatusBarColor(unpack(color))
else
barra.textura:SetStatusBarColor (1, 1, 1)
barra.textura:SetStatusBarColor(1, 1, 1)
end
Details:name_space_info (barra)
@@ -4494,7 +4497,7 @@ function atributo_damage:MontaInfoDamageDone()
--my target container
conteudo = self.targets
for target_name, amount in pairs(conteudo) do
tinsert (meus_inimigos, {target_name, amount, amount/total*100})
tinsert(meus_inimigos, {target_name, amount, amount/totalDamageWithoutPet*100})
end
--sort
@@ -4515,8 +4518,8 @@ function atributo_damage:MontaInfoDamageDone()
barra = info.barras2 [index]
if (not barra) then
barra = gump:CriaNovaBarraInfo2 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra = gump:CriaNovaBarraInfo2 (instance, index)
barra.textura:SetStatusBarColor(1, 1, 1, 1)
end
if (index == 1) then
@@ -4525,31 +4528,31 @@ function atributo_damage:MontaInfoDamageDone()
barra.textura:SetValue(tabela[2]/max_inimigos*100)
end
local target_actor = instancia.showing (1, tabela[1])
local target_actor = instance.showing (1, tabela[1])
if (target_actor) then
target_actor:SetClassIcon(barra.icone, instancia, target_actor.classe)
target_actor:SetClassIcon(barra.icone, instance, target_actor.classe)
else
barra.icone:SetTexture([[Interface\AddOns\Details\images\classes_small_alpha]]) --CLASSE
local texCoords = Details.class_coords ["ENEMY"]
barra.icone:SetTexCoord(unpack(texCoords))
end
barra.textura:SetStatusBarColor (1, 0.8, 0.8)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra.textura:SetStatusBarColor(1, 0.8, 0.8)
barra.textura:SetStatusBarColor(1, 1, 1, 1)
barra.lineText1:SetText(index .. ". " .. Details:GetOnlyName(tabela[1]))
if (info.sub_atributo == 2) then
barra.lineText4:SetText(Details:comma_value ( _math_floor(tabela[2]/meu_tempo)) .. " (" .. format ("%.1f", tabela[3]) .. "%)")
barra.lineText4:SetText(Details:comma_value ( _math_floor(tabela[2]/actorCombatTime)) .. " (" .. format("%.1f", tabela[3]) .. "%)")
else
barra.lineText4:SetText(SelectedToKFunction(_, tabela[2]) .." (" .. format ("%.1f", tabela[3]) .. "%)")
barra.lineText4:SetText(SelectedToKFunction(_, tabela[2]) .." (" .. format("%.1f", tabela[3]) .. "%)")
end
if (barra.mouse_over) then --atualizar o tooltip
if (barra.isAlvo) then
--GameTooltip:Hide()
--GameTooltip:SetOwner(barra, "ANCHOR_TOPRIGHT")
if (not barra.minha_tabela:MontaTooltipAlvos (barra, index, instancia)) then
if (not barra.minha_tabela:MontaTooltipAlvos (barra, index, instance)) then
return
end
--GameTooltip:Show()
@@ -4592,7 +4595,7 @@ function atributo_damage:MontaDetalhesFriendlyFire (nome, barra)
for spellid, amount in pairs(ff_table.spells) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(spellid)
tinsert (minhas_magias, {spellid, amount, amount / total * 100, nome, icone})
tinsert(minhas_magias, {spellid, amount, amount / total * 100, nome, icone})
end
_table_sort(minhas_magias, Details.Sort2)
@@ -4605,7 +4608,7 @@ function atributo_damage:MontaDetalhesFriendlyFire (nome, barra)
if (not barra) then --se a barra no existir, criar ela ento
barra = gump:CriaNovaBarraInfo3 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1) --isso aqui a parte da seleo e desceleo
barra.textura:SetStatusBarColor(1, 1, 1, 1) --isso aqui a parte da seleo e desceleo
end
if (index == 1) then
@@ -4615,7 +4618,7 @@ function atributo_damage:MontaDetalhesFriendlyFire (nome, barra)
end
barra.lineText1:SetText(index..instancia.divisores.colocacao..tabela[4]) --seta o texto da esqueda
barra.lineText4:SetText(Details:comma_value (tabela[2]) .. " " .. instancia.divisores.abre .. format ("%.1f", tabela[3]) .. "%" .. instancia.divisores.fecha) --seta o texto da direita
barra.lineText4:SetText(Details:comma_value (tabela[2]) .. " " .. instancia.divisores.abre .. format("%.1f", tabela[3]) .. "%" .. instancia.divisores.fecha) --seta o texto da direita
barra.icone:SetTexture(tabela[5])
barra.icone:SetTexCoord(0, 1, 0, 1)
@@ -4680,7 +4683,7 @@ function atributo_damage:MontaDetalhesEnemy (spellid, barra)
if (not barra) then --se a barra no existir, criar ela ento
barra = gump:CriaNovaBarraInfo3 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1) --isso aqui a parte da seleo e desceleo
barra.textura:SetStatusBarColor(1, 1, 1, 1) --isso aqui a parte da seleo e desceleo
end
if (index == 1) then
@@ -4705,9 +4708,9 @@ function atributo_damage:MontaDetalhesEnemy (spellid, barra)
local color = Details.class_colors [tabela[3]]
if (color) then
barra.textura:SetStatusBarColor (unpack(color))
barra.textura:SetStatusBarColor(unpack(color))
else
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra.textura:SetStatusBarColor(1, 1, 1, 1)
end
barra.icone:SetTexture("Interface\\AddOns\\Details\\images\\classes_small_alpha")
@@ -4753,7 +4756,7 @@ function atributo_damage:MontaDetalhesDamageTaken (nome, barra)
local este_alvo = tabela.targets [actor]
if (este_alvo) then --esta magia deu dano no actor
local spell_nome, rank, icone = _GetSpellInfo(spellid)
tinsert (minhas_magias, {spellid, este_alvo, este_alvo/total*100, spell_nome, icone})
tinsert(minhas_magias, {spellid, este_alvo, este_alvo/total*100, spell_nome, icone})
end
end
@@ -4770,7 +4773,7 @@ function atributo_damage:MontaDetalhesDamageTaken (nome, barra)
if (not barra) then --se a barra no existir, criar ela ento
barra = gump:CriaNovaBarraInfo3 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1) --isso aqui a parte da seleo e desceleo
barra.textura:SetStatusBarColor(1, 1, 1, 1) --isso aqui a parte da seleo e desceleo
end
if (index == 1) then
@@ -4893,11 +4896,11 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
local index = 1
local data = data_table
table.wipe (t1)
table.wipe (t2)
table.wipe (t3)
table.wipe (t4)
table.wipe (data)
table.wipe(t1)
table.wipe(t2)
table.wipe(t3)
table.wipe(t4)
table.wipe(data)
--GERAL
local media = 0
@@ -4982,7 +4985,7 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
t1[5] = Loc ["STRING_MAXIMUM_SHORT"] .. ": " .. Details:comma_value (esta_magia.n_max)
t1[6] = Loc ["STRING_AVERAGE"] .. ": " .. Details:comma_value (media_normal)
t1[7] = Loc ["STRING_DPS"] .. ": " .. Details:comma_value (normal_dmg/T)
t1[8] = normal_hits .. " [|cFFC0C0C0" .. format ("%.1f", normal_hits/max(total_hits, 0.0001)*100) .. "%|r]"
t1[8] = normal_hits .. " [|cFFC0C0C0" .. format("%.1f", normal_hits/max(total_hits, 0.0001)*100) .. "%|r]"
end
@@ -5008,7 +5011,7 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
t2[5] = Loc ["STRING_MAXIMUM_SHORT"] .. ": " .. Details:comma_value (esta_magia.c_max)
t2[6] = Loc ["STRING_AVERAGE"] .. ": " .. Details:comma_value (media_critico)
t2[7] = Loc ["STRING_DPS"] .. ": " .. Details:comma_value (crit_dps)
t2[8] = esta_magia.c_amt .. " [|cFFC0C0C0" .. format ("%.1f", esta_magia.c_amt/total_hits*100) .. "%|r]"
t2[8] = esta_magia.c_amt .. " [|cFFC0C0C0" .. format("%.1f", esta_magia.c_amt/total_hits*100) .. "%|r]"
end
@@ -5032,7 +5035,7 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
t3[5] = Loc ["STRING_PARRY"] .. ": " .. parry
t3[6] = Loc ["STRING_DODGE"] .. ": " .. dodge
t3[7] = Loc ["STRING_BLOCKED"] .. ": " .. _math_floor(esta_magia.b_amt/esta_magia.counter*100)
t3[8] = (outros_desvios+erros) .. " / " .. format ("%.1f", porcentagem_defesas) .. "%"
t3[8] = (outros_desvios+erros) .. " / " .. format("%.1f", porcentagem_defesas) .. "%"
end
@@ -5065,7 +5068,7 @@ function Details:BuildPlayerDetailsSpellChart()
for i = 1, 200 do
local texture = playerDetailSmallChart:CreateTexture(nil, "artwork")
texture:SetColorTexture (1, 1, 1, 1)
texture:SetColorTexture(1, 1, 1, 1)
tinsert(playerDetailSmallChart.Lines, texture)
end
@@ -5238,7 +5241,7 @@ function atributo_damage:MontaTooltipAlvos (thisLine, index, instancia)
end
local nome, _, icone = _GetSpellInfo(_spellid)
t[1], t[2], t[3] = nome .. " (" .. PetName:gsub ((" <.*"), "") .. ")", amount, icone
t[1], t[2], t[3] = nome .. " (" .. PetName:gsub((" <.*"), "") .. ")", amount, icone
i = i + 1
end
@@ -5932,7 +5935,7 @@ end
local total = tooltip_temp_table [o][2]
local player_name = player:name()
if (player_name:find (Details.playername)) then
if (player_name:find(Details.playername)) then
GameCooltip:AddLine(player_name .. ": ", FormatTooltipNumber (_, total) .. " (" .. _cstr ("%.1f", (total / damage_done) * 100) .. "%)", 2, "yellow")
else
GameCooltip:AddLine(player_name .. ": ", FormatTooltipNumber (_, total) .." (" .. _cstr ("%.1f", (total / damage_done) * 100) .. "%)", 2)
+1 -1
View File
@@ -7,7 +7,7 @@ do
}
_error.__index = _error
_error.__newindex = function()
assert (false, "Attempt to modify an read-only object.\nUse object() or object.errortext\n"..debugstack (2, 1 , 0))
assert(false, "Attempt to modify an read-only object.\nUse object() or object.errortext\n"..debugstack (2, 1 , 0))
return
end
_error.__tostring = function()
+43 -43
View File
@@ -180,7 +180,7 @@ function atributo_heal:ContainerRefreshHps (container, combat_time)
local total = 0
if (_detalhes.time_type == 2 or not _detalhes:CaptureGet ("heal")) then
if (_detalhes.time_type == 2 or not _detalhes:CaptureGet("heal")) then
for _, actor in ipairs(container) do
if (actor.grupo) then
actor.last_hps = actor.total / combat_time
@@ -206,7 +206,7 @@ function atributo_heal:ReportSingleDamagePreventedLine (actor, instancia)
for i = 2, GameCooltip:GetNumLines()-2 do
local texto_left, texto_right = GameCooltip:GetText (i)
if (texto_left and texto_right) then
texto_left = texto_left:gsub (("|T(.*)|t "), "")
texto_left = texto_left:gsub(("|T(.*)|t "), "")
reportar [#reportar+1] = ""..texto_left.." "..texto_right..""
end
end
@@ -448,7 +448,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
row1.textura:SetVertexColor(r, g, b)
row1.icone_classe:SetTexture(instancia.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
row1.icone_classe:SetTexCoord(0.0625, 0.9375, 0.0625, 0.9375)
Details.FadeHandler.Fader(row1, "out")
@@ -518,7 +518,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
row1.textura:SetVertexColor(r, g, b)
row1.icone_classe:SetTexture(instancia.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
row1.icone_classe:SetTexCoord(0.0625, 0.9375, 0.0625, 0.9375)
Details.FadeHandler.Fader(row1, "out")
@@ -626,7 +626,7 @@ function atributo_heal:RefreshLine(instancia, barras_container, whichRowLine, lu
porcentagem = _cstr ("%.1f", self [keyName] / instancia.top * 100)
end
if ((_detalhes.time_type == 2 and self.grupo) or (not _detalhes:CaptureGet ("heal") and not _detalhes:CaptureGet ("aura")) or instancia.segmento == -1) then
if ((_detalhes.time_type == 2 and self.grupo) or (not _detalhes:CaptureGet("heal") and not _detalhes:CaptureGet("aura")) or instancia.segmento == -1) then
if (instancia.segmento == -1 and combat_time == 0) then
local p = _detalhes.tabela_vigente(2, self.nome)
if (p) then
@@ -886,7 +886,7 @@ function atributo_heal:RefreshBarra2 (thisLine, instancia, tabela_anterior, forc
Details.FadeHandler.Fader(thisLine, "out")
end
return self:RefreshBarra (thisLine, instancia)
return self:RefreshBarra(thisLine, instancia)
else
return
end
@@ -910,7 +910,7 @@ function atributo_heal:RefreshBarra2 (thisLine, instancia, tabela_anterior, forc
thisLine.background:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
return self:RefreshBarra (thisLine, instancia)
return self:RefreshBarra(thisLine, instancia)
else
--agora esta comparando se a tabela da barra diferente da tabela na atualizao anterior
@@ -925,7 +925,7 @@ function atributo_heal:RefreshBarra2 (thisLine, instancia, tabela_anterior, forc
thisLine.last_value = esta_porcentagem --reseta o ultimo valor da barra
return self:RefreshBarra (thisLine, instancia)
return self:RefreshBarra(thisLine, instancia)
elseif (esta_porcentagem ~= thisLine.last_value) then --continua mostrando a mesma tabela ento compara a porcentagem
--apenas atualizar
@@ -936,7 +936,7 @@ function atributo_heal:RefreshBarra2 (thisLine, instancia, tabela_anterior, forc
end
thisLine.last_value = esta_porcentagem
return self:RefreshBarra (thisLine, instancia)
return self:RefreshBarra(thisLine, instancia)
end
end
@@ -944,7 +944,7 @@ function atributo_heal:RefreshBarra2 (thisLine, instancia, tabela_anterior, forc
end
function atributo_heal:RefreshBarra (thisLine, instancia, from_resize)
function atributo_heal:RefreshBarra(thisLine, instancia, from_resize)
local class, enemy, arena_enemy, arena_ally = self.classe, self.enemy, self.arena_enemy, self.arena_ally
@@ -955,7 +955,7 @@ function atributo_heal:RefreshBarra (thisLine, instancia, from_resize)
--icon
self:SetClassIcon (thisLine.icone_classe, instancia, class)
--texture color
self:SetBarColors (thisLine, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b)
self:SetBarColors(thisLine, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b)
--left text
self:SetBarLeftText (thisLine, instancia, enemy, arena_enemy, arena_ally, UsingCustomLeftText)
@@ -1340,7 +1340,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
for _spellid, _skill in pairs(ActorSkillsContainer) do
local SkillName, _, SkillIcon = _GetSpellInfo(_spellid)
if (_skill [skill_key] > 0 or _skill.anti_heal) then
tinsert (ActorHealingTable, {
tinsert(ActorHealingTable, {
_spellid,
_skill [skill_key],
_skill [skill_key]/ActorTotal*100,
@@ -1360,7 +1360,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
for _spellid, _skill in pairs(petActor:GetActorSpells()) do
if (_skill [skill_key] > 0) then
local SkillName, _, SkillIcon = _GetSpellInfo(_spellid)
local petName = petName:gsub ((" <.*"), "")
local petName = petName:gsub((" <.*"), "")
ActorHealingTable [#ActorHealingTable+1] = {
_spellid,
_skill [skill_key],
@@ -1387,7 +1387,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
target_name = Translit:Transliterate(target_name, "!")
end
tinsert (ActorHealingTargets, {target_name, amount, amount / ActorTotal * 100})
tinsert(ActorHealingTargets, {target_name, amount, amount / ActorTotal * 100})
end
end
_table_sort (ActorHealingTargets, _detalhes.Sort2)
@@ -1506,7 +1506,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
break
end
if (ismaximized and ActorHealingTargets[i][1]:find (_detalhes.playername)) then
if (ismaximized and ActorHealingTargets[i][1]:find(_detalhes.playername)) then
GameCooltip:AddLine(ActorHealingTargets[i][1], FormatTooltipNumber (_, ActorHealingTargets[i][2]) .." (".._cstr ("%.1f", ActorHealingTargets[i][3]).."%)", nil, "yellow")
GameCooltip:AddStatusBar (100, 1, .5, .5, .5, .7)
else
@@ -1593,7 +1593,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
end
local n = _table [1]:gsub (("%s%<.*"), "")
local n = _table [1]:gsub(("%s%<.*"), "")
if (instancia.sub_atributo == 3) then --overheal
GameCooltip:AddLine(n .. " (|cFFFF3333" .. _math_floor( (_table [2] / (_table [2] + _table [3])) * 100) .. "%|r):", FormatTooltipNumber (_, _math_floor(_table [2])) .. " (" .. _math_floor( (_table [2] / (_table [2] + _table [3])) * 100) .. "%)")
@@ -1713,9 +1713,9 @@ function atributo_heal:MontaInfoHealTaken()
barra = gump:CriaNovaBarraInfo1 (instancia, index)
end
self:FocusLock (barra, tabela[1])
self:FocusLock(barra, tabela[1])
--hes:UpdadeInfoBar (row, index, spellid, name, value, max, percent, icon, detalhes)
--hes:UpdadeInfoBar(row, index, spellid, name, value, max, percent, icon, detalhes)
local texCoords = CLASS_ICON_TCOORDS [tabela[4]]
if (not texCoords) then
@@ -1723,7 +1723,7 @@ function atributo_heal:MontaInfoHealTaken()
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", true, texCoords)
self:UpdadeInfoBar(barra, index, tabela[1], tabela[1], tabela[2], formated_value, max_, tabela[3], "Interface\\AddOns\\Details\\images\\classes_small", true, texCoords)
end
end
@@ -1739,7 +1739,7 @@ function atributo_heal:MontaInfoOverHealing()
for spellid, tabela in pairs(tabela) do
local nome, _, icone = _GetSpellInfo(spellid)
tinsert (minhas_curas, {spellid, tabela.overheal, tabela.overheal/total*100, nome, icone})
tinsert(minhas_curas, {spellid, tabela.overheal, tabela.overheal/total*100, nome, icone})
end
--add pets
@@ -1751,7 +1751,7 @@ function atributo_heal:MontaInfoOverHealing()
local PetSkillsContainer = PetActor.spells._ActorTable
for _spellid, _skill in pairs(PetSkillsContainer) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(_spellid)
tinsert (minhas_curas, {_spellid, _skill.overheal, _skill.overheal/total*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
tinsert(minhas_curas, {_spellid, _skill.overheal, _skill.overheal/total*100, nome .. " (|c" .. class_color .. PetName:gsub((" <.*"), "") .. "|r)", icone, PetActor})
end
end
end
@@ -1769,14 +1769,14 @@ function atributo_heal:MontaInfoOverHealing()
if (not barra) then
barra = gump:CriaNovaBarraInfo1 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
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] = spellid = spellid que esta na caixa da direita
if (not barra.on_focus) then --se a barra no tiver no foco
barra.textura:SetStatusBarColor (129/255, 125/255, 69/255, 1)
barra.textura:SetStatusBarColor(129/255, 125/255, 69/255, 1)
barra.on_focus = true
if (not info.mostrando) then
info.mostrando = barra
@@ -1784,7 +1784,7 @@ function atributo_heal:MontaInfoOverHealing()
end
else
if (barra.on_focus) then
barra.textura:SetStatusBarColor (1, 1, 1, 1) --volta a cor antiga
barra.textura:SetStatusBarColor(1, 1, 1, 1) --volta a cor antiga
barra:SetAlpha(.9) --volta a alfa antiga
barra.on_focus = false
end
@@ -1824,7 +1824,7 @@ function atributo_heal:MontaInfoOverHealing()
if (actor_object) then
classe = actor_object.classe
end
tinsert (jogadores_overhealed, {target_name, amount, amount/total*100, classe})
tinsert(jogadores_overhealed, {target_name, amount, amount/total*100, classe})
end
_table_sort (jogadores_overhealed, _detalhes.Sort2)
@@ -1839,7 +1839,7 @@ function atributo_heal:MontaInfoOverHealing()
if (not barra) then
barra = gump:CriaNovaBarraInfo2 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra.textura:SetStatusBarColor(1, 1, 1, 1)
end
if (index == 1) then
@@ -1859,7 +1859,7 @@ function atributo_heal:MontaInfoOverHealing()
if (not texCoords) then
texCoords = _detalhes.class_coords ["UNKNOW"]
end
barra.icone:SetTexCoord (_unpack(texCoords))
barra.icone:SetTexCoord(_unpack(texCoords))
barra.minha_tabela = self
barra.nome_inimigo = tabela [1]
@@ -1888,7 +1888,7 @@ function atributo_heal:MontaInfoHealingDone()
for spellid, tabela in pairs(tabela) do
local nome, rank, icone = _GetSpellInfo(spellid)
tinsert (minhas_curas, {
tinsert(minhas_curas, {
spellid,
tabela.total,
tabela.total/total*100,
@@ -1911,11 +1911,11 @@ function atributo_heal:MontaInfoHealingDone()
local PetSkillsContainer = PetActor.spells._ActorTable
for _spellid, _skill in pairs(PetSkillsContainer) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(_spellid)
tinsert (minhas_curas, {
tinsert(minhas_curas, {
_spellid,
_skill.total,
_skill.total/total*100,
nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)",
nome .. " (|c" .. class_color .. PetName:gsub((" <.*"), "") .. "|r)",
icone,
PetActor
})
@@ -1937,7 +1937,7 @@ function atributo_heal:MontaInfoHealingDone()
if (not barra) then
barra = gump:CriaNovaBarraInfo1 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra.textura:SetStatusBarColor(1, 1, 1, 1)
barra.on_focus = false
end
@@ -1947,13 +1947,13 @@ function atributo_heal:MontaInfoHealingDone()
if (info.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)
self:UpdadeInfoBar(barra, index, tabela[1], tabela[4], tabela[2], formated_value, max_, tabela[3], tabela[5], true)
else
local formated_value = SelectedToKFunction (_, _math_floor(tabela[2]))
if (tabela [7]) then
formated_value = formated_value .. " [|cFFFF5500" .. SelectedToKFunction (_, _math_floor(tabela [7])) .." " .. Loc ["STRING_DAMAGE"] .."|r] "
end
self:UpdadeInfoBar (barra, index, tabela[1], tabela[4], tabela[2], formated_value, max_, tabela[3], tabela[5], true)
self:UpdadeInfoBar(barra, index, tabela[1], tabela[4], tabela[2], formated_value, max_, tabela[3], tabela[5], true)
end
barra.minha_tabela = self
@@ -1971,7 +1971,7 @@ function atributo_heal:MontaInfoHealingDone()
local healedTargets = {}
tabela = self.targets
for target_name, amount in pairs(tabela) do
tinsert (healedTargets, {target_name, amount, amount / total*100})
tinsert(healedTargets, {target_name, amount, amount / total*100})
end
_table_sort(healedTargets, _detalhes.Sort2)
@@ -1984,7 +1984,7 @@ function atributo_heal:MontaInfoHealingDone()
if (not barra) then
barra = gump:CriaNovaBarraInfo2 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra.textura:SetStatusBarColor(1, 1, 1, 1)
end
local healingDone = tabela[2]
@@ -2001,7 +2001,7 @@ function atributo_heal:MontaInfoHealingDone()
else
barra.icone:SetTexture([[Interface\AddOns\Details\images\classes_small_alpha]]) --CLASSE
local texCoords = _detalhes.class_coords ["ENEMY"]
barra.icone:SetTexCoord (_unpack(texCoords))
barra.icone:SetTexCoord(_unpack(texCoords))
end
barra.lineText1:SetText(index .. ". " .. _detalhes:GetOnlyName(tabela[1]))
@@ -2161,7 +2161,7 @@ function atributo_heal:MontaDetalhesHealingTaken (nome, barra)
for spellid, tabela in pairs(conteudo) do --da foreach em cada spellid do container
if (tabela.targets [actor]) then
local spell_nome, _, icone = _GetSpellInfo(spellid)
tinsert (minhas_magias, {spellid, tabela.targets [actor], tabela.targets [actor] / total*100, spell_nome, icone})
tinsert(minhas_magias, {spellid, tabela.targets [actor], tabela.targets [actor] / total*100, spell_nome, icone})
end
end
@@ -2175,7 +2175,7 @@ function atributo_heal:MontaDetalhesHealingTaken (nome, barra)
if (not barra) then --se a barra no existir, criar ela ento
barra = gump:CriaNovaBarraInfo3 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1) --isso aqui a parte da seleo e desceleo
barra.textura:SetStatusBarColor(1, 1, 1, 1) --isso aqui a parte da seleo e desceleo
end
if (index == 1) then
@@ -2239,11 +2239,11 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
local index = 1
local data = data_table
table.wipe (t1)
table.wipe (t2)
table.wipe (t3)
table.wipe (t4)
table.wipe (data)
table.wipe(t1)
table.wipe(t2)
table.wipe(t3)
table.wipe(t4)
table.wipe(data)
if (esta_magia.total > 0) then
+18 -18
View File
@@ -1302,7 +1302,7 @@ end
--copy values from a previous skin saved
if (skin_table) then
--copy from skin_table to new_instance
_detalhes.table.copy (new_instance, skin_table)
_detalhes.table.copy(new_instance, skin_table)
end
return new_instance
@@ -1362,7 +1362,7 @@ end
--copy values from a previous skin saved
if (skin_table) then
--copy from skin_table to new_instance
_detalhes.table.copy (new_instance, skin_table)
_detalhes.table.copy(new_instance, skin_table)
end
--setup default wallpaper
@@ -2427,19 +2427,19 @@ function _detalhes:TrocaTabela(instancia, segmento, atributo, sub_atributo, inic
local atributo = instancia.atributo
local time_left = (_detalhes.last_data_requested+7) - _detalhes._tempo
if (atributo == 1 and _detalhes.in_combat and not _detalhes:CaptureGet ("damage") and _detalhes.host_by) then
if (atributo == 1 and _detalhes.in_combat and not _detalhes:CaptureGet("damage") and _detalhes.host_by) then
if (_detalhes.debug) then
_detalhes:Msg("(debug) instancia need damage cloud.")
end
elseif (atributo == 2 and _detalhes.in_combat and (not _detalhes:CaptureGet ("heal") or _detalhes:CaptureGet ("aura")) and _detalhes.host_by) then
elseif (atributo == 2 and _detalhes.in_combat and (not _detalhes:CaptureGet("heal") or _detalhes:CaptureGet("aura")) and _detalhes.host_by) then
if (_detalhes.debug) then
_detalhes:Msg("(debug) instancia need heal cloud.")
end
elseif (atributo == 3 and _detalhes.in_combat and not _detalhes:CaptureGet ("energy") and _detalhes.host_by) then
elseif (atributo == 3 and _detalhes.in_combat and not _detalhes:CaptureGet("energy") and _detalhes.host_by) then
if (_detalhes.debug) then
_detalhes:Msg("(debug) instancia need energy cloud.")
end
elseif (atributo == 4 and _detalhes.in_combat and not _detalhes:CaptureGet ("miscdata") and _detalhes.host_by) then
elseif (atributo == 4 and _detalhes.in_combat and not _detalhes:CaptureGet("miscdata") and _detalhes.host_by) then
if (_detalhes.debug) then
_detalhes:Msg("(debug) instancia need misc cloud.")
end
@@ -2750,7 +2750,7 @@ function _detalhes:ChangeIcon(icon)
if (icon) then
--plugin chamou uma troca de icone
self.baseframe.cabecalho.atributo_icon:SetTexture(icon)
self.baseframe.cabecalho.atributo_icon:SetTexCoord (5/64, 60/64, 3/64, 62/64)
self.baseframe.cabecalho.atributo_icon:SetTexCoord(5/64, 60/64, 3/64, 62/64)
local icon_size = skin.icon_plugins_size
self.baseframe.cabecalho.atributo_icon:SetWidth(icon_size[1])
@@ -2770,7 +2770,7 @@ function _detalhes:ChangeIcon(icon)
if (_detalhes.custom [self.sub_atributo]) then
local icon = _detalhes.custom [self.sub_atributo].icon
self.baseframe.cabecalho.atributo_icon:SetTexture(icon)
self.baseframe.cabecalho.atributo_icon:SetTexCoord (5/64, 60/64, 3/64, 62/64)
self.baseframe.cabecalho.atributo_icon:SetTexCoord(5/64, 60/64, 3/64, 62/64)
local icon_size = skin.icon_plugins_size
self.baseframe.cabecalho.atributo_icon:SetWidth(icon_size[1])
@@ -2791,7 +2791,7 @@ function _detalhes:ChangeIcon(icon)
end
local p = 0.125 --32/256
self.baseframe.cabecalho.atributo_icon:SetTexCoord (p * (self.sub_atributo-1), p * (self.sub_atributo), 0, 1)
self.baseframe.cabecalho.atributo_icon:SetTexCoord(p * (self.sub_atributo-1), p * (self.sub_atributo), 0, 1)
self.baseframe.cabecalho.atributo_icon:SetSize(16, 16)
self.baseframe.cabecalho.atributo_icon:ClearAllPoints()
@@ -2967,7 +2967,7 @@ local function GetDpsHps (_thisActor, key)
if (_thisActor [keyname]) then
return _thisActor [keyname]
else
if ((_detalhes.time_type == 2 and _thisActor.grupo) or not _detalhes:CaptureGet ("damage")) then
if ((_detalhes.time_type == 2 and _thisActor.grupo) or not _detalhes:CaptureGet("damage")) then
local dps = _thisActor.total / _thisActor:GetCombatTime()
_thisActor [keyname] = dps
return dps
@@ -3051,8 +3051,8 @@ end
local report_name_function = function(name)
local name, index = unpack(name)
if (_detalhes.remove_realm_from_name and name:find ("-")) then
return index .. ". " .. name:gsub (("%-.*"), "")
if (_detalhes.remove_realm_from_name and name:find("-")) then
return index .. ". " .. name:gsub(("%-.*"), "")
else
return index .. ". " .. name
end
@@ -3161,7 +3161,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
local reportarFrags = {}
for name, amount in pairs(frags) do
--string para imprimir direto sem calculos
reportarFrags [#reportarFrags+1] = {frag = tostring (amount), nome = name}
reportarFrags [#reportarFrags+1] = {frag = tostring(amount), nome = name}
end
container = reportarFrags
container_amount = #reportarFrags
@@ -3204,7 +3204,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
local mortes = self.showing.last_events_tables
local reportarMortes = {}
for index, morte in ipairs(mortes) do
reportarMortes [#reportarMortes+1] = {dead = morte [6], nome = morte [3]:gsub (("%-.*"), "")}
reportarMortes [#reportarMortes+1] = {dead = morte [6], nome = morte [3]:gsub(("%-.*"), "")}
end
container = reportarMortes
container_amount = #reportarMortes
@@ -3515,8 +3515,8 @@ function _detalhes:envia_relatorio (linhas, custom)
local to_who = _detalhes.report_where
local channel = to_who:find ("CHANNEL")
local is_btag = to_who:find ("REALID")
local channel = to_who:find("CHANNEL")
local is_btag = to_who:find("REALID")
local send_report_channel = function(timerObject)
_SendChatMessage (timerObject.Arg1, timerObject.Arg2, timerObject.Arg3, timerObject.Arg4)
@@ -3530,7 +3530,7 @@ function _detalhes:envia_relatorio (linhas, custom)
if (channel) then
channel = to_who:gsub ((".*|"), "")
channel = to_who:gsub((".*|"), "")
for i = 1, #linhas do
if (channel == "Trade") then
@@ -3548,7 +3548,7 @@ function _detalhes:envia_relatorio (linhas, custom)
return
elseif (is_btag) then
local bnetAccountID = to_who:gsub ((".*|"), "")
local bnetAccountID = to_who:gsub((".*|"), "")
bnetAccountID = tonumber(bnetAccountID)
for i = 1, #linhas do
+16 -16
View File
@@ -265,7 +265,7 @@ function atributo_energy:AtualizarResources (whichRowLine, colocacao, instancia)
--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)
self:SetBarColors(esta_barra, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b)
--icon
self:SetClassIcon (esta_barra.icone_classe, instancia, self.classe)
@@ -536,7 +536,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
row1.textura:SetVertexColor(r, g, b)
row1.icone_classe:SetTexture(instancia.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
row1.icone_classe:SetTexCoord(0.0625, 0.9375, 0.0625, 0.9375)
Details.FadeHandler.Fader(row1, "out")
@@ -597,7 +597,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
row1.textura:SetVertexColor(r, g, b)
row1.icone_classe:SetTexture(instancia.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
row1.icone_classe:SetTexCoord(0.0625, 0.9375, 0.0625, 0.9375)
Details.FadeHandler.Fader(row1, "out")
@@ -719,7 +719,7 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
Details.FadeHandler.Fader(esta_barra, "out")
end
return self:RefreshBarra (esta_barra, instancia)
return self:RefreshBarra(esta_barra, instancia)
else
return
end
@@ -743,7 +743,7 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
esta_barra.background:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
return self:RefreshBarra (esta_barra, instancia)
return self:RefreshBarra(esta_barra, instancia)
else
--agora esta comparando se a tabela da barra diferente da tabela na atualizao anterior
@@ -758,7 +758,7 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
esta_barra.last_value = esta_porcentagem --reseta o ultimo valor da barra
return self:RefreshBarra (esta_barra, instancia)
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
@@ -769,7 +769,7 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
end
esta_barra.last_value = esta_porcentagem
return self:RefreshBarra (esta_barra, instancia)
return self:RefreshBarra(esta_barra, instancia)
end
end
@@ -777,7 +777,7 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
end
function atributo_energy:RefreshBarra (esta_barra, instancia, from_resize)
function atributo_energy:RefreshBarra(esta_barra, instancia, from_resize)
local class, enemy, arena_enemy, arena_ally = self.classe, self.enemy, self.arena_enemy, self.arena_ally
@@ -788,7 +788,7 @@ function atributo_energy:RefreshBarra (esta_barra, instancia, from_resize)
--icon
self:SetClassIcon (esta_barra.icone_classe, instancia, class)
--texture color
self:SetBarColors (esta_barra, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b)
self:SetBarColors(esta_barra, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b)
--left text
self:SetBarLeftText (esta_barra, instancia, enemy, arena_enemy, arena_ally, UsingCustomLeftText)
@@ -1116,16 +1116,16 @@ function atributo_energy:MontaInfoRegenRecebido()
if (not barra) then
barra = gump:CriaNovaBarraInfo1 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra.textura:SetStatusBarColor(1, 1, 1, 1)
barra.on_focus = false
end
self:FocusLock (barra, tabela[1])
self:FocusLock(barra, tabela[1])
local spellname, _, spellicon = _GetSpellInfo(tabela [1])
local percent = tabela [2] / total_regenerado * 100
self:UpdadeInfoBar (barra, index, tabela[1], spellname, tabela[2], _detalhes:comma_value (tabela[2]), max_, percent, spellicon, true)
self:UpdadeInfoBar(barra, index, tabela[1], spellname, tabela[2], _detalhes:comma_value (tabela[2]), max_, percent, spellicon, true)
barra.minha_tabela = self
barra.show = tabela[1]
@@ -1178,7 +1178,7 @@ function atributo_energy:MontaInfoRegenRecebido()
if (not barra) then
barra = gump:CriaNovaBarraInfo2 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra.textura:SetStatusBarColor(1, 1, 1, 1)
end
if (index == 1) then
@@ -1274,7 +1274,7 @@ function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
if (not barra) then --se a barra no existir, criar ela ento
barra = gump:CriaNovaBarraInfo3 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra.textura:SetStatusBarColor(1, 1, 1, 1)
end
if (index == 1) then
@@ -1286,10 +1286,10 @@ function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
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.textura:SetStatusBarColor(_unpack(_detalhes.class_colors [tabela[3]]))
barra.icone:SetTexture("Interface\\AddOns\\Details\\images\\classes_small")
barra.icone:SetTexCoord (_unpack(_detalhes.class_coords [tabela[3]]))
barra.icone:SetTexCoord(_unpack(_detalhes.class_coords [tabela[3]]))
barra:Show() --mostra a barra
+29 -29
View File
@@ -591,12 +591,12 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
morte.minha_barra = whichRowLine
esta_barra.colocacao = colocacao
if (not getmetatable (morte)) then
if (not getmetatable(morte)) then
setmetatable(morte, {__call = RefreshBarraMorte})
morte._custom = true
end
esta_barra.lineText1:SetText(colocacao .. ". " .. morte [3]:gsub (("%-.*"), ""))
esta_barra.lineText1:SetText(colocacao .. ". " .. morte [3]:gsub(("%-.*"), ""))
esta_barra.lineText2:SetText("")
esta_barra.lineText3:SetText("")
esta_barra.lineText4:SetText(morte [6])
@@ -608,18 +608,18 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
--seta a cor da barra e a cor do texto caso eles esteja mostrando com a cor da classe
local r, g, b, a = unpack(_detalhes.class_colors [morte[4]])
_detalhes:SetBarColors (esta_barra, instancia, r, g, b, a)
_detalhes:SetBarColors(esta_barra, instancia, r, g, b, a)
if (instancia.row_info.use_spec_icons) then
local nome = morte[3]
local spec = instancia.showing (1, nome) and instancia.showing (1, nome).spec or (instancia.showing (2, nome) and instancia.showing (2, nome).spec)
if (spec and spec ~= 0) then
esta_barra.icone_classe:SetTexture(instancia.row_info.spec_file)
esta_barra.icone_classe:SetTexCoord (unpack(_detalhes.class_specs_coords[spec]))
esta_barra.icone_classe:SetTexCoord(unpack(_detalhes.class_specs_coords[spec]))
else
if (CLASS_ICON_TCOORDS [morte[4]]) then
esta_barra.icone_classe:SetTexture(instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (unpack(CLASS_ICON_TCOORDS [morte[4]]))
esta_barra.icone_classe:SetTexCoord(unpack(CLASS_ICON_TCOORDS [morte[4]]))
else
local texture, l, r, t, b = Details:GetUnknownClassIcon()
esta_barra.icone_classe:SetTexture(texture)
@@ -629,7 +629,7 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
else
if (CLASS_ICON_TCOORDS [morte[4]]) then
esta_barra.icone_classe:SetTexture(instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (unpack(CLASS_ICON_TCOORDS [morte[4]]))
esta_barra.icone_classe:SetTexCoord(unpack(CLASS_ICON_TCOORDS [morte[4]]))
else
local texture, l, r, t, b = Details:GetUnknownClassIcon()
esta_barra.icone_classe:SetTexture(texture)
@@ -957,7 +957,7 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
Details.FadeHandler.Fader(esta_barra, "out")
end
return self:RefreshBarra (esta_barra, instancia)
return self:RefreshBarra(esta_barra, instancia)
else
return
end
@@ -981,7 +981,7 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
esta_barra.background:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
return self:RefreshBarra (esta_barra, instancia)
return self:RefreshBarra(esta_barra, instancia)
else
--agora esta comparando se a tabela da barra diferente da tabela na atualizao anterior
@@ -996,7 +996,7 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
esta_barra.last_value = esta_porcentagem --reseta o ultimo valor da barra
return self:RefreshBarra (esta_barra, instancia)
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
@@ -1007,7 +1007,7 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
end
esta_barra.last_value = esta_porcentagem
return self:RefreshBarra (esta_barra, instancia)
return self:RefreshBarra(esta_barra, instancia)
end
end
@@ -1015,7 +1015,7 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
end
function atributo_misc:RefreshBarra (esta_barra, instancia, from_resize)
function atributo_misc:RefreshBarra(esta_barra, instancia, from_resize)
local class, enemy, arena_enemy, arena_ally = self.classe, self.enemy, self.arena_enemy, self.arena_ally
if (from_resize) then
@@ -1025,7 +1025,7 @@ function atributo_misc:RefreshBarra (esta_barra, instancia, from_resize)
--icon
self:SetClassIcon (esta_barra.icone_classe, instancia, class)
--texture color
self:SetBarColors (esta_barra, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b)
self:SetBarColors(esta_barra, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b)
--left text
self:SetBarLeftText (esta_barra, instancia, enemy, arena_enemy, arena_ally, UsingCustomLeftText)
@@ -1115,7 +1115,7 @@ function atributo_misc:ToolTipCC (instancia, numero, barra)
for target_name, amount in pairs(_tabela.targets) do
GameCooltip:AddLine(target_name .. ": ", amount .. " ")
local classe = _detalhes:GetClass (target_name)
local classe = _detalhes:GetClass(target_name)
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\espadas]], nil, 1, lineHeight, lineHeight)
if (classe) then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], nil, 2, lineHeight, lineHeight, unpack(_detalhes.class_coords [classe]))
@@ -1269,7 +1269,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
end
local n = _table [1]:gsub (("%s%<.*"), "")
local n = _table [1]:gsub(("%s%<.*"), "")
GameCooltip:AddLine(n, _table [2] .. " (" .. _math_floor(_table [2]/self.dispell*100) .. "%)")
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 14, 14, 0.25, 0.49609375, 0.75, 1)
@@ -1462,7 +1462,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
for buffIndex = 1, 41 do
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura (RaidIndex, buffIndex, nil, "HELPFUL")
if (name and unitCaster and UnitExists (unitCaster) and UnitExists (RaidIndex) and UnitIsUnit (unitCaster, RaidIndex)) then
if (name and unitCaster and UnitExists(unitCaster) and UnitExists(RaidIndex) and UnitIsUnit(unitCaster, RaidIndex)) then
_detalhes.parser:add_buff_uptime (nil, cacheGetTime, playerGUID, playerName, 0x00000514, playerGUID, playerName, 0x00000514, 0x0, spellid, name, in_or_out)
if (in_or_out == "BUFF_UPTIME_IN") then
@@ -1483,7 +1483,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
for playername, potspellid in pairs(pot_usage) do
local name, _, icon = _GetSpellInfo(potspellid)
local _, class = UnitClass (playername)
local _, class = UnitClass(playername)
local class_color = ""
if (class and RAID_CLASS_COLORS [class]) then
class_color = RAID_CLASS_COLORS [class].colorStr
@@ -1505,7 +1505,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
for groupIndex = 1, GetNumGroupMembers() - 1 do
for buffIndex = 1, 41 do
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("party"..groupIndex, buffIndex, nil, "HELPFUL")
if (name and unitCaster and UnitExists (unitCaster) and UnitExists ("party" .. groupIndex) and UnitIsUnit (unitCaster, "party" .. groupIndex)) then
if (name and unitCaster and UnitExists(unitCaster) and UnitExists("party" .. groupIndex) and UnitIsUnit(unitCaster, "party" .. groupIndex)) then
local playerName, realmName = _UnitName ("party"..groupIndex)
local playerGUID = UnitGUID("party"..groupIndex)
@@ -1533,7 +1533,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
--player it self
for buffIndex = 1, 41 do
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster and UnitExists (unitCaster) and UnitIsUnit (unitCaster, "player")) then
if (name and unitCaster and UnitExists(unitCaster) and UnitIsUnit(unitCaster, "player")) then
local playerName = _UnitName ("player")
local playerGUID = UnitGUID("player")
if (playerGUID) then
@@ -1555,7 +1555,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
for playername, potspellid in pairs(pot_usage) do
local name, _, icon = _GetSpellInfo(potspellid)
local _, class = UnitClass (playername)
local _, class = UnitClass(playername)
local class_color = ""
if (class and RAID_CLASS_COLORS [class]) then
class_color = RAID_CLASS_COLORS [class].colorStr
@@ -1574,7 +1574,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
for buffIndex = 1, 41 do
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster and UnitExists (unitCaster) and UnitIsUnit (unitCaster, "player")) then
if (name and unitCaster and UnitExists(unitCaster) and UnitIsUnit(unitCaster, "player")) then
local playerName = _UnitName ("player")
local playerGUID = UnitGUID("player")
@@ -1596,7 +1596,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
local string_output = "pre-potion: "
for playername, potspellid in pairs(pot_usage) do
local name, _, icon = _GetSpellInfo(potspellid)
local _, class = UnitClass (playername)
local _, class = UnitClass(playername)
local class_color = ""
if (class and RAID_CLASS_COLORS [class]) then
class_color = RAID_CLASS_COLORS [class].colorStr
@@ -1999,7 +1999,7 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
end
local n = _table [1]:gsub (("%s%<.*"), "")
local n = _table [1]:gsub(("%s%<.*"), "")
GameCooltip:AddLine(n, _table [2] .. " (" .. _math_floor(_table [2]/self.interrupt*100) .. "%)")
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 14, 14, 0.25, 0.49609375, 0.75, 1)
@@ -2048,7 +2048,7 @@ function atributo_misc:MontaInfoInterrupt()
--player
for _spellid, _tabela in pairs(minha_tabela) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(_spellid)
tinsert (meus_interrupts, {_spellid, _tabela.counter, _tabela.counter/meu_total*100, nome, icone})
tinsert(meus_interrupts, {_spellid, _tabela.counter, _tabela.counter/meu_total*100, nome, icone})
end
--pet
local ActorPets = self.pets
@@ -2059,7 +2059,7 @@ function atributo_misc:MontaInfoInterrupt()
local PetSkillsContainer = PetActor.interrupt_spells._ActorTable
for _spellid, _skill in pairs(PetSkillsContainer) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(_spellid)
tinsert (meus_interrupts, {_spellid, _skill.counter, _skill.counter/meu_total*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
tinsert(meus_interrupts, {_spellid, _skill.counter, _skill.counter/meu_total*100, nome .. " (|c" .. class_color .. PetName:gsub((" <.*"), "") .. "|r)", icone, PetActor})
end
end
end
@@ -2079,7 +2079,7 @@ function atributo_misc:MontaInfoInterrupt()
if (not barra) then --se a barra no existir, criar ela ento
barra = gump:CriaNovaBarraInfo1 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1) --isso aqui a parte da seleo e desceleo
barra.textura:SetStatusBarColor(1, 1, 1, 1) --isso aqui a parte da seleo e desceleo
barra.on_focus = false --isso aqui a parte da seleo e desceleo
end
@@ -2088,7 +2088,7 @@ function atributo_misc:MontaInfoInterrupt()
if (not info.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 no tiver no foco
barra.textura:SetStatusBarColor (129/255, 125/255, 69/255, 1)
barra.textura:SetStatusBarColor(129/255, 125/255, 69/255, 1)
barra.on_focus = true
if (not info.mostrando) then
info.mostrando = barra
@@ -2096,7 +2096,7 @@ function atributo_misc:MontaInfoInterrupt()
end
else
if (barra.on_focus) then
barra.textura:SetStatusBarColor (1, 1, 1, 1) --volta a cor antiga
barra.textura:SetStatusBarColor(1, 1, 1, 1) --volta a cor antiga
barra:SetAlpha(.9) --volta a alfa antiga
barra.on_focus = false
end
@@ -2145,7 +2145,7 @@ function atributo_misc:MontaInfoInterrupt()
if (not barra) then
barra = gump:CriaNovaBarraInfo2 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra.textura:SetStatusBarColor(1, 1, 1, 1)
end
if (index == 1) then
@@ -2218,7 +2218,7 @@ function atributo_misc:MontaDetalhesInterrupt (spellid, barra)
if (not barra) then --se a barra no existir, criar ela ento
barra = gump:CriaNovaBarraInfo3 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1) --isso aqui a parte da seleo e desceleo
barra.textura:SetStatusBarColor(1, 1, 1, 1) --isso aqui a parte da seleo e desceleo
end
if (index == 1) then
+12 -12
View File
@@ -382,7 +382,7 @@
actorObject.ownerName = dono_do_pet.nome
if (_IsInInstance() and _detalhes.remove_realm_from_name) then
actorObject.displayName = nome:gsub (("%-.*"), ">")
actorObject.displayName = nome:gsub(("%-.*"), ">")
else
actorObject.displayName = nome
end
@@ -485,7 +485,7 @@
--for _, playerName in ipairs(Details.tabela_vigente.raid_roster_indexed) do
for playerName, _ in pairs(_detalhes.tabela_vigente.raid_roster) do
local pName = playerName
playerName = playerName:gsub ("%-.*", "") --remove realm name
playerName = playerName:gsub("%-.*", "") --remove realm name
--if the user client is in russian language
--make an attempt to remove declensions from the character's name
@@ -495,12 +495,12 @@
return find_pet_found_owner (pName, serial, nome, flag, self)
else
--print("not found declension (1):", pName, nome)
if (text1:find (playerName)) then
if (text1:find(playerName)) then
return find_pet_found_owner (pName, serial, nome, flag, self)
end
end
else
if (text1:find (playerName)) then
if (text1:find(playerName)) then
return find_pet_found_owner (pName, serial, nome, flag, self)
end
end
@@ -513,19 +513,19 @@
for playerName, _ in pairs(_detalhes.tabela_vigente.raid_roster) do
--for _, playerName in ipairs(Details.tabela_vigente.raid_roster_indexed) do
local pName = playerName
playerName = playerName:gsub ("%-.*", "") --remove realm name
playerName = playerName:gsub("%-.*", "") --remove realm name
if (CONST_CLIENT_LANGUAGE == "ruRU") then
if (find_name_declension (text2, playerName)) then
return find_pet_found_owner (pName, serial, nome, flag, self)
else
--print("not found declension (2):", pName, nome)
if (text2:find (playerName)) then
if (text2:find(playerName)) then
return find_pet_found_owner (pName, serial, nome, flag, self)
end
end
else
if (text2:find (playerName)) then
if (text2:find(playerName)) then
return find_pet_found_owner (pName, serial, nome, flag, self)
end
end
@@ -542,7 +542,7 @@
--[[statistics]]-- _detalhes.statistics.container_calls = _detalhes.statistics.container_calls + 1
--if (flag and nome:find ("Kastfall") and bit.band(flag, 0x2000) ~= 0) then
--if (flag and nome:find("Kastfall") and bit.band(flag, 0x2000) ~= 0) then
--print("PET:", nome, _detalhes.tabela_pets.pets [serial], container_pets [serial])
--else
--print(nome, flag)
@@ -767,9 +767,9 @@
end
if (_detalhes.debug) then
if (_detalhes.debug_chr and nome:find (_detalhes.debug_chr) and self.tipo == 1) then
if (_detalhes.debug_chr and nome:find(_detalhes.debug_chr) and self.tipo == 1) then
local logLine = ""
local when = "[" .. date ("%H:%M:%S") .. format (".%4f", GetTime()-floor(GetTime())) .. "]"
local when = "[" .. date ("%H:%M:%S") .. format(".%4f", GetTime()-floor(GetTime())) .. "]"
local log = "actor created - class: " .. (novo_objeto.classe or "noclass")
local from = debugstack (2, 1, 0)
logLine = logLine .. when .. " " .. log .. " " .. from .. "\n"
@@ -809,7 +809,7 @@
_detalhes:UpdatePetsOnParser()
end
function _detalhes:ClearCCPetsBlackList()
table.wipe (pet_blacklist)
table.wipe(pet_blacklist)
end
function container_combatentes:FuncaoDeCriacao (tipo)
@@ -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()
+3 -3
View File
@@ -45,7 +45,7 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
--in merging operations, make sure to not add the owner name a second time in the name
--check if the pet name already has the owner name in, if not, add it
if (not pet_nome:find ("<")) then
if (not pet_nome:find("<")) then
--get the owner name
local ownerName = busca[1]
--add the owner name to the pet name
@@ -104,7 +104,7 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
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
if (not pet_nome:find ("<")) then
if (not pet_nome:find("<")) then
pet_nome = pet_nome .. " <".. dono_nome ..">"
end
@@ -209,7 +209,7 @@ end
function container_pets:Remover (pet_serial)
if (_detalhes.tabela_pets.pets [pet_serial]) then
table.wipe (_detalhes.tabela_pets.pets [pet_serial])
table.wipe(_detalhes.tabela_pets.pets [pet_serial])
end
_detalhes.tabela_pets.pets [pet_serial] = nil
end
+1 -1
View File
@@ -519,7 +519,7 @@ function segmentClass:resetar()
local cleargarbage = function()
collectgarbage()
end
local successful, errortext = pcall (cleargarbage)
local successful, errortext = pcall(cleargarbage)
if (not successful) then
Details:Msg("couldn't call collectgarbage()")
end