- Fixed some colors issues with enemies bars.
- Fixed some translations between ptBR -> enUS. - More fixes with target damage and debuff uptime on overall segment. - Major rewrite on CC Breaks, now it's working properly. - Non player or pet Enemies will be flagged with .monster member. - New member for combat object: start_time, end_time = combat_object:GetDate() - Added new sub attribute for damage: Voidzones & Auras. - First implementation of Hooks for plugins capture parser events in realtime. - Added API: _detalhes:InstallHook (hooktype, func). func receive parameters: token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname - Added Global: DETAILS_HOOK_COOLDOWN - Added API: _detalhes:StatusBarAlert (text, icon, color, time) - Added API: _detalhes:InstallSkin (skin_name, skin_table) More information on skin table, see the file functions/skins.lua
This commit is contained in:
@@ -207,6 +207,10 @@ function combate:UltimaAcao (tempo)
|
||||
end
|
||||
end
|
||||
|
||||
function combate:GetDate()
|
||||
return self.data_inicio, self.data_fim
|
||||
end
|
||||
|
||||
function combate:seta_data (tipo)
|
||||
if (tipo == _detalhes._detalhes_props.DATA_TYPE_START) then
|
||||
self.data_inicio = _date ("%H:%M:%S")
|
||||
|
||||
+231
-18
@@ -32,6 +32,7 @@ local container_habilidades = _detalhes.container_habilidades
|
||||
local container_combatentes = _detalhes.container_combatentes
|
||||
local container_pets = _detalhes.container_pets
|
||||
local atributo_damage = _detalhes.atributo_damage
|
||||
local atributo_misc = _detalhes.atributo_misc
|
||||
local habilidade_dano = _detalhes.habilidade_dano
|
||||
local container_damage_target = _detalhes.container_type.CONTAINER_DAMAGETARGET_CLASS
|
||||
|
||||
@@ -191,14 +192,6 @@ end
|
||||
for index, player in _ipairs (container) do
|
||||
|
||||
if (_bit_band (player.flag_original, 0x00000040) ~= 0) then --> é um inimigo
|
||||
|
||||
-- ele vai contar os inimigos com 0 tbm
|
||||
|
||||
--if (player[keyName] < 1) then --> dano menor que 1, interromper o loop
|
||||
-- amount = index - 1
|
||||
-- break
|
||||
--end
|
||||
|
||||
total = total + player [keyName]
|
||||
else
|
||||
amount = index-1
|
||||
@@ -367,17 +360,15 @@ function atributo_damage:AtualizarFrags (tabela, qual_barra, colocacao, instanci
|
||||
end
|
||||
|
||||
--> ele nao come o texto quando a instância esta muito pequena
|
||||
|
||||
esta_barra.textura:SetVertexColor (_unpack (_detalhes.class_colors [tabela [3]]))
|
||||
esta_barra.icone_classe:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small")
|
||||
|
||||
if (tabela [3] == "UNKNOW" or tabela [3] == "UNGROUPPLAYER") then
|
||||
if (tabela [3] == "UNKNOW" or tabela [3] == "UNGROUPPLAYER" or tabela [3] == "ENEMY") then
|
||||
esta_barra.icone_classe:SetTexture ("Interface\\LFGFRAME\\LFGROLE_BW")
|
||||
esta_barra.icone_classe:SetTexCoord (.25, .5, 0, 1)
|
||||
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
|
||||
else
|
||||
esta_barra.icone_classe:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small")
|
||||
esta_barra.icone_classe:SetTexCoord (_unpack (_detalhes.class_coords [tabela [3]])) --very slow method
|
||||
esta_barra.icone_classe:SetTexCoord (_unpack (_detalhes.class_coords [tabela [3]]))
|
||||
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
|
||||
end
|
||||
|
||||
@@ -387,7 +378,155 @@ function atributo_damage:AtualizarFrags (tabela, qual_barra, colocacao, instanci
|
||||
|
||||
end
|
||||
|
||||
function atributo_damage:ReportSingleVoidZoneLine (actor, instancia)
|
||||
local barra = instancia.barras [actor.minha_barra]
|
||||
|
||||
local reportar = {"Details! " .. Loc ["STRING_ATTRIBUTE_DAMAGE_DEBUFFS_REPORT"] .. ": " .. actor.nome} --> localize-me
|
||||
for i = 1, GameCooltip:GetNumLines() do
|
||||
local texto_left, texto_right = GameCooltip:GetText (i)
|
||||
if (texto_left and texto_right) then
|
||||
texto_left = texto_left:gsub (("|T(.*)|t "), "")
|
||||
reportar [#reportar+1] = ""..texto_left.." "..texto_right..""
|
||||
end
|
||||
end
|
||||
|
||||
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
|
||||
end
|
||||
|
||||
function _detalhes:ToolTipVoidZones (instancia, actor, barra)
|
||||
|
||||
local damage_actor = instancia.showing[1]:PegarCombatente (_, actor.damage_twin)
|
||||
local habilidade
|
||||
local alvos
|
||||
|
||||
if (damage_actor) then
|
||||
habilidade = damage_actor.spell_tables._ActorTable [actor.damage_spellid]
|
||||
end
|
||||
|
||||
if (habilidade) then
|
||||
alvos = habilidade.targets
|
||||
end
|
||||
|
||||
local container = actor.debuff_uptime_targets._ActorTable
|
||||
|
||||
for _, alvo in _ipairs (container) do
|
||||
if (alvos) then
|
||||
local damage_alvo = alvos._NameIndexTable [alvo.nome]
|
||||
if (damage_alvo) then
|
||||
damage_alvo = alvos._ActorTable [damage_alvo]
|
||||
alvo.damage = damage_alvo.total
|
||||
else
|
||||
alvo.damage = 0
|
||||
end
|
||||
else
|
||||
alvo.damage = 0
|
||||
end
|
||||
end
|
||||
|
||||
--> sort no container:
|
||||
_table_sort (container, function (tabela1, tabela2)
|
||||
if (tabela1.damage > tabela2.damage) then
|
||||
return true;
|
||||
elseif (tabela1.damage == tabela2.damage) then
|
||||
return tabela1.uptime > tabela2.uptime;
|
||||
end
|
||||
return false;
|
||||
end)
|
||||
|
||||
actor.debuff_uptime_targets:remapear()
|
||||
|
||||
--> monta o cooltip
|
||||
|
||||
local GameCooltip = GameCooltip
|
||||
|
||||
GameCooltip:Reset()
|
||||
GameCooltip:SetType ("tooltip")
|
||||
GameCooltip:SetOwner (barra)
|
||||
GameCooltip:SetOption ("LeftBorderSize", -5)
|
||||
GameCooltip:SetOption ("RightBorderSize", 5)
|
||||
GameCooltip:SetOption ("StatusBarTexture", [[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]])
|
||||
|
||||
for _, alvo in _ipairs (container) do
|
||||
|
||||
local minutos, segundos = _math_floor (alvo.uptime / 60), _math_floor (alvo.uptime % 60)
|
||||
if (minutos > 0) then
|
||||
GameCooltip:AddLine (alvo.nome, _detalhes:comma_value (alvo.damage) .. " (" .. minutos .. "m " .. segundos .. "s" .. ")")
|
||||
else
|
||||
GameCooltip:AddLine (alvo.nome, _detalhes:comma_value (alvo.damage) .. " (" .. segundos .. "s" .. ")")
|
||||
end
|
||||
|
||||
local classe = _detalhes:GetClass (alvo.nome)
|
||||
if (classe) then
|
||||
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], nil, nil, 14, 14, unpack (_detalhes.class_coords [classe]))
|
||||
else
|
||||
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1)
|
||||
end
|
||||
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
|
||||
end
|
||||
|
||||
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, "white")
|
||||
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
|
||||
GameCooltip:ShowCooltip()
|
||||
|
||||
end
|
||||
|
||||
local function RefreshBarraVoidZone (tabela, barra, instancia)
|
||||
tabela:AtualizarVoidZone (tabela.minha_barra, barra.colocacao, instancia)
|
||||
end
|
||||
|
||||
function atributo_misc:AtualizarVoidZone (qual_barra, colocacao, instancia)
|
||||
|
||||
local esta_barra = instancia.barras [qual_barra] --> pega a referência da barra na janela
|
||||
|
||||
if (not esta_barra) then
|
||||
print ("DEBUG: problema com <instancia.esta_barra> "..qual_barra.." "..lugar)
|
||||
return
|
||||
end
|
||||
|
||||
self._refresh_window = RefreshBarraVoidZone
|
||||
|
||||
local tabela_anterior = esta_barra.minha_tabela
|
||||
|
||||
esta_barra.minha_tabela = self
|
||||
|
||||
self.minha_barra = qual_barra
|
||||
esta_barra.colocacao = colocacao
|
||||
|
||||
esta_barra.texto_esquerdo:SetText (colocacao .. ". " .. self.nome)
|
||||
esta_barra.texto_direita:SetText (self.debuff_uptime)
|
||||
|
||||
--if (colocacao == 1) then
|
||||
esta_barra.statusbar:SetValue (100)
|
||||
--else
|
||||
-- esta_barra.statusbar:SetValue (self.debuff_uptime / instancia.top * 100)
|
||||
--end
|
||||
|
||||
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
|
||||
gump:Fade (esta_barra, "out")
|
||||
end
|
||||
|
||||
local _, _, icon = GetSpellInfo (self.damage_spellid)
|
||||
local school_color = _detalhes.school_colors [self.spellschool]
|
||||
if (not school_color) then
|
||||
school_color = _detalhes.school_colors ["unknown"]
|
||||
end
|
||||
|
||||
esta_barra.textura:SetVertexColor (_unpack (school_color))
|
||||
esta_barra.icone_classe:SetTexture (icon)
|
||||
esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1)
|
||||
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
|
||||
|
||||
if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --> precisa atualizar o tooltip
|
||||
--gump:UpdateTooltip (qual_barra, esta_barra, instancia)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
local ntable = {}
|
||||
local vtable = {}
|
||||
|
||||
function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, exportar)
|
||||
|
||||
local showing = tabela_do_combate [class_type] --> o que esta sendo mostrado -> [1] - dano [2] - cura --> pega o container com ._NameIndexTable ._ActorTable
|
||||
@@ -426,6 +565,8 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
keyName = "frags"
|
||||
elseif (sub_atributo == 6) then --> ENEMIES
|
||||
keyName = "enemies"
|
||||
elseif (sub_atributo == 7) then --> AURAS VOIDZONES
|
||||
keyName = "voidzones"
|
||||
end
|
||||
else
|
||||
keyName = exportar.key
|
||||
@@ -447,6 +588,8 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
keyName = "frags"
|
||||
elseif (sub_atributo == 6) then --> ENEMIES
|
||||
keyName = "enemies"
|
||||
elseif (sub_atributo == 7) then --> AURAS VOIDZONES
|
||||
keyName = "voidzones"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -459,13 +602,16 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
index = index + 1
|
||||
|
||||
local actor_classe = showing._NameIndexTable [fragName] --> get index
|
||||
if (actor_classe) then
|
||||
actor_classe = showing._ActorTable [actor_classe] --> get object
|
||||
actor_classe = actor_classe.classe
|
||||
local fragged_actor = showing._NameIndexTable [fragName] --> get index
|
||||
local actor_classe
|
||||
if (fragged_actor) then
|
||||
fragged_actor = showing._ActorTable [fragged_actor] --> get object
|
||||
actor_classe = fragged_actor.classe
|
||||
end
|
||||
|
||||
if (not actor_classe) then
|
||||
if (fragged_actor and fragged_actor.monster) then
|
||||
actor_classe = "ENEMY"
|
||||
elseif (not actor_classe) then
|
||||
actor_classe = "UNGROUPPLAYER"
|
||||
end
|
||||
|
||||
@@ -523,6 +669,69 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh
|
||||
|
||||
elseif (keyName == "voidzones") then
|
||||
|
||||
local index = 0
|
||||
local misc_container = tabela_do_combate [4]
|
||||
|
||||
for _, actor in _ipairs (misc_container._ActorTable) do
|
||||
if (actor.boss_debuff) then
|
||||
|
||||
index = index + 1
|
||||
|
||||
local twin_damage_actor = showing._NameIndexTable [actor.damage_twin]
|
||||
if (twin_damage_actor) then
|
||||
twin_damage_actor = showing._ActorTable [twin_damage_actor]
|
||||
actor.damage = twin_damage_actor.total
|
||||
else
|
||||
actor.damage = 0
|
||||
end
|
||||
|
||||
vtable [index] = actor
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
local tsize = #vtable
|
||||
if (index < tsize) then
|
||||
for i = index+1, tsize do
|
||||
vtable [i] = nil
|
||||
end
|
||||
end
|
||||
|
||||
--print ("size: ", tsize)
|
||||
|
||||
if (tsize > 0 and vtable[1]) then
|
||||
_table_sort (vtable, function (t1, t2)
|
||||
return t1.damage > t2.damage
|
||||
end)
|
||||
instancia.top = vtable [1].damage
|
||||
end
|
||||
total = index
|
||||
|
||||
if (exportar) then
|
||||
return vtable
|
||||
end
|
||||
|
||||
if (total < 1) then
|
||||
instancia:EsconderScrollBar()
|
||||
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh
|
||||
end
|
||||
|
||||
--esta mostrando ALL então posso seguir o padrão correto? primeiro, atualiza a scroll bar...
|
||||
instancia:AtualizarScrollBar (total)
|
||||
|
||||
--depois faz a atualização normal dele através dos iterators
|
||||
local qual_barra = 1
|
||||
local barras_container = instancia.barras
|
||||
|
||||
for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
vtable[i]:AtualizarVoidZone (qual_barra, i, instancia)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh
|
||||
|
||||
else
|
||||
|
||||
if (instancia.atributo == 5) then --> custom
|
||||
@@ -535,6 +744,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
elseif (keyName == "enemies") then
|
||||
|
||||
amount, total = _detalhes:ContainerSortEnemies (conteudo, amount, "total")
|
||||
--keyName = "enemies"
|
||||
--> grava o total
|
||||
instancia.top = conteudo[1][keyName]
|
||||
|
||||
@@ -831,8 +1041,11 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
forcar = true
|
||||
end
|
||||
|
||||
|
||||
if (self.owner) then
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
|
||||
elseif (self.monster) then
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors.ENEMY)
|
||||
else
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
@@ -973,7 +1186,7 @@ end
|
||||
end
|
||||
|
||||
if (instancia.row_texture_class_colors) then
|
||||
esta_barra.textura:SetVertexColor (240/255, 0, 5/255, 1)
|
||||
esta_barra.textura:SetVertexColor (0.94117, 0, 0.01960, 1)
|
||||
end
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda
|
||||
|
||||
@@ -1241,6 +1241,7 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
|
||||
local atributo_changed = false
|
||||
|
||||
--> verifica possiveis valores não passados
|
||||
|
||||
if (not segmento) then
|
||||
segmento = instancia.segmento
|
||||
end
|
||||
@@ -1548,7 +1549,7 @@ function _detalhes:ChangeIcon (icon)
|
||||
--> normal
|
||||
local half = 0.00048828125
|
||||
local size = 0.03125
|
||||
self.baseframe.cabecalho.atributo_icon:SetTexture (_detalhes.skin_path .. skin.file)
|
||||
self.baseframe.cabecalho.atributo_icon:SetTexture (skin.file)
|
||||
self.baseframe.cabecalho.atributo_icon:SetTexCoord ( (0.03125 * (self.atributo-1)) + half, (0.03125 * self.atributo) - half, 0.35693359375, 0.38720703125)
|
||||
|
||||
local icon_anchor = skin.icon_anchor_main
|
||||
|
||||
+69
-46
@@ -224,7 +224,7 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra)
|
||||
|
||||
if (battleress) then
|
||||
--_table_insert (linhas, 2, {{"Interface\\AddOns\\Details\\images\\small_icons", .75, 1, 0, 1}, morte [6] .. " Morreu", "-- -- -- ", 100, {75/255, 75/255, 75/255, 1}, {noglow = true}}) --> localize-me
|
||||
GameCooltip:AddSpecial ("line", 2, nil, morte [6] .. " Morreu", "-- -- -- ", 1, "white")
|
||||
GameCooltip:AddSpecial ("line", 2, nil, morte [6] .. " " .. Loc ["STRING_TIME_OF_DEATH"] , "-- -- -- ", 1, "white")
|
||||
GameCooltip:AddSpecial ("icon", 2, nil, "Interface\\AddOns\\Details\\images\\small_icons", 1, 1, nil, nil, .75, 1, 0, 1)
|
||||
GameCooltip:AddSpecial ("statusbar", 2, nil, 100, 1, "darkgray", false)
|
||||
else
|
||||
@@ -842,42 +842,46 @@ function atributo_misc:ToolTipCC (instancia, numero, barra)
|
||||
local meu_total = self ["cc_break"]
|
||||
local habilidades = self.cc_break_spell_tables._ActorTable
|
||||
|
||||
--> habilidade usada para dispelar
|
||||
local meus_cc_breaks = {}
|
||||
--> habilidade usada para tirar o CC
|
||||
|
||||
for _spellid, _tabela in _pairs (habilidades) do
|
||||
meus_cc_breaks [#meus_cc_breaks+1] = {_spellid, _tabela.cc_break}
|
||||
end
|
||||
_table_sort (meus_cc_breaks, function(a, b) return a[2] > b[2] end)
|
||||
|
||||
GameTooltip:AddLine (Loc ["STRING_SPELLS"]..":")
|
||||
if (#meus_cc_breaks > 0) then
|
||||
for i = 1, _math_min (3, #meus_cc_breaks) do
|
||||
local esta_habilidade = meus_cc_breaks[i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
||||
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||
|
||||
--> quantidade
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (_spellid)
|
||||
GameCooltip:AddLine (nome_magia, _tabela.cc_break .. " (" .. _cstr ("%.1f", _tabela.cc_break / meu_total * 100) .. "%)")
|
||||
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
--> o que quebrou
|
||||
local quebrou_oque = _tabela.cc_break_oque
|
||||
for spellid_quebrada, amt_quebrada in _pairs (_tabela.cc_break_oque) do
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (spellid_quebrada)
|
||||
GameCooltip:AddLine (nome_magia..": ", amt_quebrada)
|
||||
GameCooltip:AddIcon ([[Interface\Buttons\UI-GroupLoot-Pass-Down]], nil, 1, 14, 14)
|
||||
GameCooltip:AddIcon (icone_magia, nil, 2, 14, 14)
|
||||
GameCooltip:AddStatusBar (100, 1, 1, 0, 0, .2)
|
||||
end
|
||||
else
|
||||
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
||||
end
|
||||
|
||||
--> quais habilidades foram dispaladas
|
||||
local buffs_dispelados = {}
|
||||
for _spellid, amt in _pairs (self.cc_break_oque) do
|
||||
buffs_dispelados [#buffs_dispelados+1] = {_spellid, amt}
|
||||
end
|
||||
_table_sort (buffs_dispelados, function(a, b) return a[2] > b[2] end)
|
||||
|
||||
GameTooltip:AddLine (Loc ["STRING_CCBROKE"] .. ":")
|
||||
if (#buffs_dispelados > 0) then
|
||||
for i = 1, _math_min (3, #buffs_dispelados) do
|
||||
local esta_habilidade = buffs_dispelados[i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
||||
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||
|
||||
--> em quem quebrou
|
||||
--GameCooltip:AddLine (Loc ["STRING_TARGETS"] .. ":")
|
||||
for _, target in _ipairs (_tabela.targets._ActorTable) do
|
||||
|
||||
GameCooltip:AddLine (target.nome..": ", target.total)
|
||||
|
||||
local classe = _detalhes:GetClass (target.nome)
|
||||
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\espadas]], nil, 1, 14, 14)
|
||||
if (classe) then
|
||||
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], nil, 2, 14, 14, unpack (_detalhes.class_coords [classe]))
|
||||
else
|
||||
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, 2, 14, 14, .25, .5, 0, 1)
|
||||
end
|
||||
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -1881,14 +1885,17 @@ local sub_list = {"cc_break", "ress", "interrupt", "cooldowns_defensive", "dispe
|
||||
local somar_alvos = function (container)
|
||||
for index, alvo in _ipairs (actor [container]._ActorTable) do
|
||||
--> cria e soma o valor do total
|
||||
local alvo_shadow = shadow [container]:PegarCombatente (nil, alvo.nome, nil, true)
|
||||
alvo_shadow.total = alvo_shadow.total + alvo.total
|
||||
if (alvo.uptime) then --> boss debuff
|
||||
alvo_shadow.uptime = alvo_shadow.uptime + alvo.uptime
|
||||
alvo_shadow.activedamt = alvo_shadow.activedamt + alvo.activedamt
|
||||
end
|
||||
--if (shadow [container]) then -- index ?? a nil value
|
||||
local alvo_shadow = shadow [container]:PegarCombatente (nil, alvo.nome, nil, true)
|
||||
alvo_shadow.total = alvo_shadow.total + alvo.total
|
||||
if (alvo.uptime) then --> boss debuff
|
||||
alvo_shadow.uptime = alvo_shadow.uptime + alvo.uptime
|
||||
alvo_shadow.activedamt = alvo_shadow.activedamt + alvo.activedamt
|
||||
end
|
||||
--end
|
||||
--> refresh no alvo
|
||||
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow [container])
|
||||
|
||||
end
|
||||
end
|
||||
--> somar as habilidades do ator
|
||||
@@ -1941,9 +1948,6 @@ local sub_list = {"cc_break", "ress", "interrupt", "cooldowns_defensive", "dispe
|
||||
--> soma o total (captura de dados)
|
||||
shadow.debuff_uptime = shadow.debuff_uptime + actor.debuff_uptime
|
||||
--> copia o container de alvos (captura de dados)
|
||||
if (actor.boss_debuff) then
|
||||
actor.debuff_uptime_targets.tipo = _detalhes.container_type.CONTAINER_ENEMYDEBUFFTARGET_CLASS
|
||||
end
|
||||
somar_alvos ("debuff_uptime_targets", shadow)
|
||||
--> copia o container de habilidades (captura de dados)
|
||||
somar_habilidades ("debuff_uptime_spell_tables", shadow)
|
||||
@@ -2117,10 +2121,19 @@ function _detalhes.refresh:r_atributo_misc (este_jogador, shadow)
|
||||
--> refresh buff uptime
|
||||
if (este_jogador.debuff_uptime_targets) then
|
||||
--> constrói os containers na shadow se não existir
|
||||
if (not shadow.debuff_uptime_spell_targets) then
|
||||
if (not shadow.debuff_uptime_targets) then
|
||||
shadow.debuff_uptime = 0
|
||||
shadow.debuff_uptime_spell_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
|
||||
shadow.debuff_uptime_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper
|
||||
if (este_jogador.boss_debuff) then
|
||||
shadow.debuff_uptime_targets = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_ENEMYDEBUFFTARGET_CLASS)
|
||||
shadow.boss_debuff = true
|
||||
shadow.damage_twin = este_jogador.damage_twin
|
||||
shadow.spellschool = este_jogador.spellschool
|
||||
shadow.damage_spellid = este_jogador.damage_spellid
|
||||
shadow.debuff_uptime = 0
|
||||
else
|
||||
shadow.debuff_uptime_targets = container_combatentes:NovoContainer (container_damage_target)
|
||||
end
|
||||
shadow.debuff_uptime_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
|
||||
end
|
||||
--> recupera metas e indexes
|
||||
_detalhes.refresh:r_container_combatentes (este_jogador.debuff_uptime_targets, shadow.debuff_uptime_targets)
|
||||
@@ -2324,9 +2337,19 @@ atributo_misc.__add = function (tabela1, tabela2)
|
||||
if (tabela2.debuff_uptime) then
|
||||
|
||||
if (not tabela1.debuff_uptime) then
|
||||
|
||||
if (tabela2.boss_debuff) then
|
||||
tabela1.debuff_uptime_targets = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_ENEMYDEBUFFTARGET_CLASS)
|
||||
tabela1.boss_debuff = true
|
||||
tabela1.damage_twin = tabela2.damage_twin
|
||||
tabela1.spellschool = tabela2.spellschool
|
||||
tabela1.damage_spellid = tabela2.damage_spellid
|
||||
else
|
||||
tabela1.debuff_uptime_targets = container_combatentes:NovoContainer (container_damage_target)
|
||||
end
|
||||
|
||||
tabela1.debuff_uptime = 0
|
||||
tabela1.debuff_uptime_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
|
||||
tabela1.debuff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas
|
||||
tabela1.debuff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc)
|
||||
end
|
||||
|
||||
tabela1.debuff_uptime = tabela1.debuff_uptime + tabela2.debuff_uptime
|
||||
|
||||
@@ -175,11 +175,18 @@ local read_flag_ = function (novo_objeto, shadow_objeto, dono_do_pet, serial, fl
|
||||
-- 0x00000060 --> inimigo neutro
|
||||
if (_bit_band (flag, 0x00000010) ~= 0) then --> é amigo
|
||||
details_flag = details_flag+0x00000010
|
||||
|
||||
elseif (_bit_band (flag, 0x00000020) ~= 0) then --> é neutro
|
||||
details_flag = details_flag+0x00000020
|
||||
--print ("neutro -> " .. nome)
|
||||
|
||||
elseif (_bit_band (flag, 0x00000040) ~= 0) then --> é inimigo
|
||||
|
||||
details_flag = details_flag+0x00000040
|
||||
|
||||
if (_bit_band (flag, 0x00000400) == 0 and _bit_band (flag, OBJECT_TYPE_PETGUARDIAN) == 0) then
|
||||
novo_objeto.monster = true
|
||||
end
|
||||
--print ("inimigos -> " .. nome)
|
||||
end
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user