- Major tooltip redesign now using cooltip.
- Details now support !Nicktag - Fixed a bug were instances with same attribute were not updating. - Schedule internal garbage collect if in encounter combat. - More functions and better communication for Cloud Capture. - New API _detalhes:FindGUIDFromName (name) - Added new options for limit number of instances which can be opened. - New options for custom nickname and avatar.
This commit is contained in:
+190
-58
@@ -667,6 +667,7 @@ end
|
||||
end
|
||||
|
||||
---------> TOOLTIPS BIFURCAÇÃO
|
||||
|
||||
function atributo_damage:ToolTip (instancia, numero, barra)
|
||||
--> seria possivel aqui colocar o icone da classe dele?
|
||||
|
||||
@@ -682,6 +683,10 @@ function atributo_damage:ToolTip (instancia, numero, barra)
|
||||
end
|
||||
end
|
||||
end
|
||||
--> tooltip locals
|
||||
local r, g, b
|
||||
local headerColor = "yellow"
|
||||
local barAlha = .6
|
||||
|
||||
--[[exported]] function _detalhes.Sort1 (table1, table2)
|
||||
return table1 [1] > table2 [1]
|
||||
@@ -698,15 +703,29 @@ end
|
||||
|
||||
---------> DAMAGE DONE & DPS
|
||||
function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
|
||||
|
||||
do
|
||||
|
||||
local owner = self.owner
|
||||
if (owner and owner.classe) then
|
||||
r, g, b = unpack (_detalhes.class_colors [owner.classe])
|
||||
else
|
||||
r, g, b = unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
|
||||
do
|
||||
--> TOP HABILIDADES
|
||||
local ActorDamage = self.total_without_pet
|
||||
local ActorSkillsContainer = self.spell_tables._ActorTable
|
||||
local ActorSkillsSortTable = {}
|
||||
|
||||
local meu_tempo
|
||||
if (_detalhes.time_type == 1 or not self.grupo) then
|
||||
meu_tempo = self:Tempo()
|
||||
elseif (_detalhes.time_type == 2) then
|
||||
meu_tempo = self:GetCombatTime()
|
||||
end
|
||||
|
||||
for _spellid, _skill in _pairs (ActorSkillsContainer) do
|
||||
ActorSkillsSortTable [#ActorSkillsSortTable+1] = {_spellid, _skill.total}
|
||||
ActorSkillsSortTable [#ActorSkillsSortTable+1] = {_spellid, _skill.total, _skill.total/meu_tempo}
|
||||
end
|
||||
_table_sort (ActorSkillsSortTable, _detalhes.Sort2)
|
||||
|
||||
@@ -719,24 +738,47 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
|
||||
_table_sort (ActorTargetsSortTable, _detalhes.Sort2)
|
||||
|
||||
--> MOSTRA HABILIDADES
|
||||
GameTooltip:AddLine (Loc ["STRING_SPELLS"]..":")
|
||||
--leftText, rightText, frame, ColorR, ColorG, ColorB, ColorA, ColorR1, ColorG2, ColorB3, ColorA4, fontSize, fontFace
|
||||
|
||||
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
|
||||
GameCooltip:AddIcon ([[Interface\HELPFRAME\HotIssueIcon]], 1, 1, 14, 14, 0.0625, 0.90625, 0, 1)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
local tooltip_max_abilities = _detalhes.tooltip_max_abilities
|
||||
|
||||
if (instancia.sub_atributo == 2) then
|
||||
tooltip_max_abilities = 6
|
||||
end
|
||||
|
||||
if (#ActorSkillsSortTable > 0) then
|
||||
for i = 1, _math_min (_detalhes.tooltip_max_abilities, #ActorSkillsSortTable) do
|
||||
for i = 1, _math_min (tooltip_max_abilities, #ActorSkillsSortTable) do
|
||||
local SkillTable = ActorSkillsSortTable [i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (SkillTable [1])
|
||||
GameTooltip:AddDoubleLine (nome_magia..": ", _detalhes:comma_value (SkillTable [2]) .." (".._cstr("%.1f", SkillTable [2]/ActorDamage*100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddTexture (icone_magia)
|
||||
if (instancia.sub_atributo == 1) then
|
||||
GameCooltip:AddLine (nome_magia..": ", _detalhes:comma_value (SkillTable [2]) .." (".._cstr("%.1f", SkillTable [2]/ActorDamage*100).."%)")
|
||||
else
|
||||
GameCooltip:AddLine (nome_magia..": ", _detalhes:comma_value (_math_floor (SkillTable [3])) .." (".._cstr("%.1f", SkillTable [2]/ActorDamage*100).."%)")
|
||||
end
|
||||
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
end
|
||||
else
|
||||
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
||||
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
||||
end
|
||||
|
||||
--> MOSTRA INIMIGOS
|
||||
GameTooltip:AddLine (Loc ["STRING_TARGETS"]..":")
|
||||
for i = 1, _math_min (_detalhes.tooltip_max_targets, #ActorTargetsSortTable) do
|
||||
local este_inimigo = ActorTargetsSortTable [i]
|
||||
GameTooltip:AddDoubleLine (este_inimigo[1]..": ", _detalhes:comma_value (este_inimigo[2]) .." (".._cstr("%.1f", este_inimigo[2]/ActorDamage*100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddTexture ("Interface\\AddOns\\Details\\images\\espadas")
|
||||
if (instancia.sub_atributo == 1) then
|
||||
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
|
||||
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
|
||||
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0, 0.03125, 0.126953125, 0.15625)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
for i = 1, _math_min (_detalhes.tooltip_max_targets, #ActorTargetsSortTable) do
|
||||
local este_inimigo = ActorTargetsSortTable [i]
|
||||
GameCooltip:AddLine (este_inimigo[1]..": ", _detalhes:comma_value (este_inimigo[2]) .." (".._cstr("%.1f", este_inimigo[2]/ActorDamage*100).."%)")
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\espadas", nil, nil, 14, 14)
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -759,7 +801,14 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
|
||||
local tabela = my_self.spell_tables._ActorTable
|
||||
local meus_danos = {}
|
||||
|
||||
totais [nome] = my_self.total_without_pet
|
||||
--totais [nome] = my_self.total_without_pet
|
||||
local meu_tempo
|
||||
if (_detalhes.time_type == 1 or not self.grupo) then
|
||||
meu_tempo = my_self:Tempo()
|
||||
elseif (_detalhes.time_type == 2) then
|
||||
meu_tempo = my_self:GetCombatTime()
|
||||
end
|
||||
totais [#totais+1] = {nome, my_self.total_without_pet, my_self.total_without_pet/meu_tempo}
|
||||
|
||||
for spellid, tabela in _pairs (tabela) do
|
||||
local nome, rank, icone = _GetSpellInfo (spellid)
|
||||
@@ -782,42 +831,83 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
|
||||
end
|
||||
end
|
||||
|
||||
GameTooltip:AddLine (" ")
|
||||
--GameTooltip:AddLine (" ")
|
||||
--GameCooltip:AddLine (" ")
|
||||
|
||||
local _quantidade = 0
|
||||
local added_logo = false
|
||||
_table_sort (totais, _detalhes.Sort2)
|
||||
|
||||
for nome, meus_danos in _pairs (danos) do --> um pet de cada vez
|
||||
local n = nome:gsub (("%s%<.*"), "")
|
||||
--GameTooltip:AddDoubleLine ("Ajudante: ", "x"..quantidade[nome].." "..n.." (".._math_floor (totais [nome]/self.total*100).."%)", nil, nil, nil, 1, 1, 1)
|
||||
--> pintar o nome do pet com a cor da classe do jogador
|
||||
if (true) then
|
||||
|
||||
local cor = self.cor
|
||||
GameTooltip:AddDoubleLine (Loc ["STRING_PET"]..":", n.." (".._math_floor (totais [nome]/self.total*100).."%)", nil, nil, nil, _unpack (_detalhes.class_colors [self.classe])) --> removido a quantidade
|
||||
GameTooltip:AddLine (Loc ["STRING_SPELLS"])
|
||||
for i = 1, 3 do
|
||||
if (meus_danos[i]) then
|
||||
--> meus_danos = { [1] = spellid [2] = total [3] = % [4] = { [1] = nome [2] = rank [3] = icone } }
|
||||
GameTooltip:AddDoubleLine (meus_danos[i][4][1]..": ", _detalhes:comma_value (meus_danos[i][2]).." (".._cstr("%.1f", meus_danos[i][3]).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddTexture (meus_danos[i][4][3])
|
||||
for _, _table in _ipairs (totais) do
|
||||
|
||||
if (_table [2] > 0) then
|
||||
|
||||
if (not added_logo) then
|
||||
added_logo = true
|
||||
GameCooltip:AddLine (Loc ["STRING_PETS"].."", nil, nil, headerColor, nil, 12)
|
||||
|
||||
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
|
||||
GameCooltip:AddIcon ([[Interface\COMMON\friendship-heart]], 1, 1, 14, 14, 0.21875, 0.78125, 0.09375, 0.6875)
|
||||
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
end
|
||||
|
||||
local n = _table [1]:gsub (("%s%<.*"), "")
|
||||
if (instancia.sub_atributo == 1) then
|
||||
GameCooltip:AddLine (n, _detalhes:comma_value (_table [2]) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
|
||||
else
|
||||
GameCooltip:AddLine (n, _detalhes:comma_value ( _math_floor (_table [3])) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
|
||||
end
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 14, 14, 0.25, 0.49609375, 0.75, 1)
|
||||
end
|
||||
end
|
||||
|
||||
GameTooltip:AddLine (Loc ["STRING_TARGETS"])
|
||||
for i = 1, 3 do
|
||||
local meus_inimigos = alvos [nome]
|
||||
if (meus_inimigos[i]) then
|
||||
GameTooltip:AddDoubleLine (meus_inimigos[i][1]..": ", _detalhes:comma_value (meus_inimigos[i][2]).." (".._cstr("%.1f", meus_inimigos[i][3]).."%)", 1, 1, 1, 1, 1, 1)
|
||||
--GameTooltip:AddTexture ("Interface\\GossipFrame\\BattleMasterGossipIcon.blp")
|
||||
else
|
||||
--> old pet display mode
|
||||
for nome, meus_danos in _pairs (danos) do --> um pet de cada vez
|
||||
local n = nome:gsub (("%s%<.*"), "")
|
||||
--GameTooltip:AddDoubleLine ("Ajudante: ", "x"..quantidade[nome].." "..n.." (".._math_floor (totais [nome]/self.total*100).."%)", nil, nil, nil, 1, 1, 1)
|
||||
--> pintar o nome do pet com a cor da classe do jogador
|
||||
|
||||
local cor = self.cor
|
||||
GameCooltip:AddLine (Loc ["STRING_PET"]..":", n.." (".._math_floor (totais [nome]/self.total*100).."%)", 1, 1, 1, 1, _unpack (_detalhes.class_colors [self.classe])) --> removido a quantidade
|
||||
--GameCooltip:AddLine (Loc ["STRING_SPELLS"])
|
||||
--GameTooltip:AddDoubleLine (Loc ["STRING_PET"]..":", n.." (".._math_floor (totais [nome]/self.total*100).."%)", nil, nil, nil, _unpack (_detalhes.class_colors [self.classe])) --> removido a quantidade
|
||||
--GameTooltip:AddLine (Loc ["STRING_SPELLS"])
|
||||
for i = 1, 3 do
|
||||
if (meus_danos[i]) then
|
||||
--> meus_danos = { [1] = spellid [2] = total [3] = % [4] = { [1] = nome [2] = rank [3] = icone } }
|
||||
GameCooltip:AddLine (meus_danos[i][4][1]..": ", _detalhes:comma_value (meus_danos[i][2]).." (".._cstr("%.1f", meus_danos[i][3]).."%)")
|
||||
GameCooltip:AddIcon (meus_danos[i][4][3], nil, nil, 14, 14)
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .2)
|
||||
--GameTooltip:AddDoubleLine (meus_danos[i][4][1]..": ", _detalhes:comma_value (meus_danos[i][2]).." (".._cstr("%.1f", meus_danos[i][3]).."%)", 1, 1, 1, 1, 1, 1)
|
||||
--GameTooltip:AddTexture (meus_danos[i][4][3])
|
||||
end
|
||||
end
|
||||
|
||||
GameTooltip:AddLine (Loc ["STRING_TARGETS"])
|
||||
for i = 1, 3 do
|
||||
local meus_inimigos = alvos [nome]
|
||||
if (meus_inimigos[i]) then
|
||||
GameTooltip:AddLine (meus_inimigos[i][1]..": ", _detalhes:comma_value (meus_inimigos[i][2]).." (".._cstr("%.1f", meus_inimigos[i][3]).."%)")
|
||||
--GameTooltip:AddDoubleLine (meus_inimigos[i][1]..": ", _detalhes:comma_value (meus_inimigos[i][2]).." (".._cstr("%.1f", meus_inimigos[i][3]).."%)", 1, 1, 1, 1, 1, 1)
|
||||
--GameTooltip:AddTexture ("Interface\\GossipFrame\\BattleMasterGossipIcon.blp")
|
||||
|
||||
GameTooltip:AddTexture ("Interface\\AddOns\\Details\\images\\espadas")
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\espadas", nil, nil, 14, 14)
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .2)
|
||||
--GameTooltip:AddTexture ("Interface\\AddOns\\Details\\images\\espadas")
|
||||
end
|
||||
end
|
||||
|
||||
--GameTooltip:AddLine (" ")
|
||||
|
||||
_quantidade = _quantidade + 1
|
||||
if (_quantidade >= _detalhes.tooltip_max_pets) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
GameTooltip:AddLine (" ")
|
||||
|
||||
_quantidade = _quantidade + 1
|
||||
if (_quantidade >= _detalhes.tooltip_max_pets) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -828,6 +918,13 @@ end
|
||||
---------> DAMAGE TAKEN
|
||||
function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra)
|
||||
|
||||
local owner = self.owner
|
||||
if (owner and owner.classe) then
|
||||
r, g, b = unpack (_detalhes.class_colors [owner.classe])
|
||||
else
|
||||
r, g, b = unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
|
||||
local agressores = self.damage_from
|
||||
local damage_taken = self.damage_taken
|
||||
|
||||
@@ -835,7 +932,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra)
|
||||
local showing = tabela_do_combate [class_type] --> o que esta sendo mostrado -> [1] - dano [2] - cura --> pega o container com ._NameIndexTable ._ActorTable
|
||||
|
||||
local meus_agressores = {}
|
||||
|
||||
|
||||
for nome, _ in _pairs (agressores) do --> agressores seria a lista de nomes
|
||||
local este_agressor = showing._ActorTable[showing._NameIndexTable[nome]]
|
||||
if (este_agressor) then --> checagem por causa do total e do garbage collector que não limpa os nomes que deram dano
|
||||
@@ -849,21 +946,30 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra)
|
||||
|
||||
_table_sort (meus_agressores, function (a, b) return a[2] > b[2] end)
|
||||
|
||||
GameTooltip:AddLine (" ")
|
||||
|
||||
GameCooltip:AddLine (Loc ["STRING_FROM"], nil, nil, headerColor, nil, 12)
|
||||
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
|
||||
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.126953125, 0.1796875, 0, 0.0546875)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
local max = #meus_agressores
|
||||
if (max > 6) then
|
||||
max = 6
|
||||
end
|
||||
|
||||
for i = 1, max do
|
||||
GameTooltip:AddDoubleLine (meus_agressores[i][1]..": ", _detalhes:comma_value (meus_agressores[i][2]).." (".._cstr("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameCooltip:AddLine (meus_agressores[i][1]..": ", _detalhes:comma_value (meus_agressores[i][2]).." (".._cstr("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)")
|
||||
local classe = meus_agressores[i][3]
|
||||
|
||||
if (not classe) then
|
||||
classe = "monster"
|
||||
classe = "UNKNOW"
|
||||
end
|
||||
|
||||
GameTooltip:AddTexture ("Interface\\AddOns\\Details\\images\\"..classe:lower().."_small")
|
||||
|
||||
if (classe == "UNKNOW") then
|
||||
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1)
|
||||
else
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe]))
|
||||
end
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
end
|
||||
|
||||
return true
|
||||
@@ -872,6 +978,13 @@ end
|
||||
---------> FRIENDLY FIRE
|
||||
function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra)
|
||||
|
||||
local owner = self.owner
|
||||
if (owner and owner.classe) then
|
||||
r, g, b = unpack (_detalhes.class_colors [owner.classe])
|
||||
else
|
||||
r, g, b = unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
|
||||
local FriendlyFire = self.friendlyfire --> container de jogadores
|
||||
local FriendlyFireTotal = self.friendlyfire_total
|
||||
|
||||
@@ -880,10 +993,10 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra)
|
||||
|
||||
local DamagedPlayers = {}
|
||||
local Skills = {}
|
||||
|
||||
|
||||
for nome, index in _pairs (FriendlyFire._NameIndexTable) do
|
||||
local TargetActor = FriendlyFire._ActorTable [index]
|
||||
DamagedPlayers [#DamagedPlayers+1] = {nome, TargetActor.total}
|
||||
DamagedPlayers [#DamagedPlayers+1] = {nome, TargetActor.total, TargetActor.classe}
|
||||
|
||||
local SkillTable = TargetActor.spell_tables --> container das habilidades
|
||||
for spellid, tabela in _pairs (SkillTable._ActorTable) do
|
||||
@@ -894,20 +1007,39 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra)
|
||||
_table_sort (DamagedPlayers, _detalhes.Sort2)
|
||||
_table_sort (Skills, _detalhes.Sort2)
|
||||
|
||||
GameTooltip:AddLine (Loc ["STRING_TARGETS"]..":")
|
||||
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
|
||||
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
|
||||
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.126953125, 0.224609375, 0.056640625, 0.140625)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
for i = 1, _math_min (_detalhes.tooltip_max_abilities, #DamagedPlayers) do
|
||||
GameTooltip:AddDoubleLine (DamagedPlayers[i][1]..": ", _detalhes:comma_value (DamagedPlayers[i][2]).." (".._cstr("%.1f", DamagedPlayers[i][2]/FriendlyFireTotal*100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddTexture ("Interface\\AddOns\\Details\\images\\espadas")
|
||||
local classe = DamagedPlayers[i][3]
|
||||
if (not classe) then
|
||||
classe = "UNKNOW"
|
||||
end
|
||||
|
||||
GameCooltip:AddLine (DamagedPlayers[i][1]..": ", _detalhes:comma_value (DamagedPlayers[i][2]).." (".._cstr("%.1f", DamagedPlayers[i][2]/FriendlyFireTotal*100).."%)")
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\espadas", nil, nil, 14, 14)
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
|
||||
if (classe == "UNKNOW") then
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords ["UNKNOW"]))
|
||||
else
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe]))
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
GameTooltip:AddLine (" ")
|
||||
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
|
||||
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
|
||||
GameCooltip:AddIcon ([[Interface\PVPFrame\bg-down-on]], 1, 1, 14, 14, 0, 1, 0, 1)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
--> Mostra as habilidades no tooltip
|
||||
GameTooltip:AddLine (Loc ["STRING_SPELLS"]..":")
|
||||
for i = 1, _math_min (_detalhes.tooltip_max_abilities, #Skills) do
|
||||
local nome, _, icone = _GetSpellInfo (Skills[i][1])
|
||||
GameTooltip:AddDoubleLine (nome.." (x".. Skills[i][3].."): ", _detalhes:comma_value (Skills[i][2]).." (".._cstr("%.1f", Skills[i][2]/FriendlyFireTotal*100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddTexture (icone)
|
||||
GameCooltip:AddLine (nome.." (x".. Skills[i][3].."): ", _detalhes:comma_value (Skills[i][2]).." (".._cstr("%.1f", Skills[i][2]/FriendlyFireTotal*100).."%)")
|
||||
GameCooltip:AddIcon (icone, nil, nil, 14, 14)
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
end
|
||||
|
||||
return true
|
||||
|
||||
+31
-10
@@ -383,15 +383,25 @@ end
|
||||
---------> TOOLTIPS BIFURCAÇÃO
|
||||
function atributo_energy:ToolTip (instancia, numero, barra)
|
||||
--> seria possivel aqui colocar o icone da classe dele?
|
||||
GameTooltip:ClearLines()
|
||||
GameTooltip:AddLine (barra.colocacao..". "..self.nome)
|
||||
--GameCooltip:AddLine (barra.colocacao..". "..self.nome)
|
||||
if (instancia.sub_atributo <= 4) then
|
||||
return self:ToolTipRegenRecebido (instancia, numero, barra)
|
||||
end
|
||||
end
|
||||
--> tooltip locals
|
||||
local r, g, b
|
||||
local headerColor = "yellow"
|
||||
local barAlha = .6
|
||||
|
||||
function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra)
|
||||
|
||||
local owner = self.owner
|
||||
if (owner and owner.classe) then
|
||||
r, g, b = unpack (_detalhes.class_colors [owner.classe])
|
||||
else
|
||||
r, g, b = unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
|
||||
local tabela_do_combate = instancia.showing
|
||||
local showing = tabela_do_combate [class_type]
|
||||
|
||||
@@ -403,7 +413,9 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra)
|
||||
local fontes, habilidades = self:Fontes_e_Habilidades (recebido_from, showing, keyName)
|
||||
|
||||
-----------------------------------------------------------------
|
||||
GameTooltip:AddLine (Loc ["STRING_SPELLS"])
|
||||
GameCooltip:AddLine (Loc ["STRING_SPELLS"], nil, nil, headerColor, nil, 12) --> localiza-me
|
||||
GameCooltip:AddIcon ([[Interface\HELPFRAME\ReportLagIcon-Spells]], 1, 1, 14, 14, 0.21875, 0.78125, 0.21875, 0.78125)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
local max = #habilidades
|
||||
if (max > 3) then
|
||||
@@ -412,12 +424,15 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra)
|
||||
|
||||
for i = 1, max do
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (habilidades[i][1])
|
||||
GameTooltip:AddDoubleLine (nome_magia..": ", _detalhes:comma_value (habilidades[i][2]).." (".._cstr("%.1f", (habilidades[i][2]/total_regenerado) * 100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddTexture (icone_magia)
|
||||
GameCooltip:AddLine (nome_magia..": ", _detalhes:comma_value (habilidades[i][2]).." (".._cstr("%.1f", (habilidades[i][2]/total_regenerado) * 100).."%)")
|
||||
GameCooltip:AddIcon (icone_magia)
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------
|
||||
GameTooltip:AddLine (Loc ["STRING_PLAYERS"]..":")
|
||||
GameCooltip:AddLine (Loc ["STRING_PLAYERS"], nil, nil, headerColor, nil, 12) --> localiza-me
|
||||
GameCooltip:AddIcon ([[Interface\HELPFRAME\HelpIcon-HotIssues]], 1, 1, 14, 14, 0.21875, 0.78125, 0.21875, 0.78125)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
max = #fontes
|
||||
if (max > 3) then
|
||||
@@ -425,13 +440,19 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra)
|
||||
end
|
||||
|
||||
for i = 1, max do
|
||||
GameTooltip:AddDoubleLine (fontes[i][1]..": ", _detalhes:comma_value (fontes[i][2]).." (".._cstr("%.1f", (fontes[i][2]/total_regenerado) * 100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameCooltip:AddLine (fontes[i][1]..": ", _detalhes:comma_value (fontes[i][2]).." (".._cstr("%.1f", (fontes[i][2]/total_regenerado) * 100).."%)")
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
|
||||
local classe = fontes[i][3]
|
||||
if (not classe) then
|
||||
classe = "monster"
|
||||
classe = "UNKNOW"
|
||||
end
|
||||
|
||||
GameTooltip:AddTexture ("Interface\\AddOns\\Details\\images\\"..classe:lower().."_small")
|
||||
if (classe == "UNKNOW") then
|
||||
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1)
|
||||
else
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe]))
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
return true
|
||||
|
||||
+167
-15
@@ -408,10 +408,21 @@ function atributo_heal:ToolTip (instancia, numero, barra)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> tooltip locals
|
||||
local r, g, b
|
||||
local headerColor = "yellow"
|
||||
local barAlha = .6
|
||||
|
||||
---------> HEALING TAKEN
|
||||
function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra)
|
||||
|
||||
local owner = self.owner
|
||||
if (owner and owner.classe) then
|
||||
r, g, b = unpack (_detalhes.class_colors [owner.classe])
|
||||
else
|
||||
r, g, b = unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
|
||||
local curadores = self.healing_from
|
||||
local total_curado = self.healing_taken
|
||||
|
||||
@@ -431,7 +442,10 @@ function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra)
|
||||
end
|
||||
end
|
||||
|
||||
GameTooltip:AddLine (" ")
|
||||
GameCooltip:AddLine (Loc ["STRING_FROM"], nil, nil, headerColor, nil, 12)
|
||||
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
|
||||
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TutorialFrame-LevelUp]], 1, 1, 14, 14, 0.10546875, 0.89453125, 0.05859375, 0.6796875)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
_table_sort (meus_curadores, function (a, b) return a[2] > b[2] end)
|
||||
local max = #meus_curadores
|
||||
@@ -440,12 +454,17 @@ function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra)
|
||||
end
|
||||
|
||||
for i = 1, max do
|
||||
GameTooltip:AddDoubleLine (meus_curadores[i][1]..": ", meus_curadores[i][2].." (".._cstr ("%.1f", (meus_curadores[i][2]/total_curado) * 100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameCooltip:AddLine (meus_curadores[i][1]..": ", _detalhes:comma_value (meus_curadores[i][2]).." (".._cstr ("%.1f", (meus_curadores[i][2]/total_curado) * 100).."%)")
|
||||
local classe = meus_curadores[i][3]
|
||||
if (not classe) then
|
||||
classe = "monster"
|
||||
classe = "UNKNOW"
|
||||
end
|
||||
GameTooltip:AddTexture ("Interface\\AddOns\\Details\\images\\"..classe:lower().."_small")
|
||||
if (classe == "UNKNOW") then
|
||||
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1)
|
||||
else
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe]))
|
||||
end
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
end
|
||||
|
||||
return true
|
||||
@@ -454,6 +473,13 @@ end
|
||||
---------> HEALING DONE / HPS / OVERHEAL
|
||||
function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
|
||||
|
||||
local owner = self.owner
|
||||
if (owner and owner.classe) then
|
||||
r, g, b = unpack (_detalhes.class_colors [owner.classe])
|
||||
else
|
||||
r, g, b = unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
|
||||
local ActorHealingTable = {}
|
||||
local ActorHealingTargets = {}
|
||||
local ActorSkillsContainer = self.spell_tables._ActorTable
|
||||
@@ -463,10 +489,16 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
|
||||
key = "totalover", "overheal"
|
||||
end
|
||||
|
||||
local meu_tempo
|
||||
if (_detalhes.time_type == 1 or not self.grupo) then
|
||||
meu_tempo = self:Tempo()
|
||||
elseif (_detalhes.time_type == 2) then
|
||||
meu_tempo = self:GetCombatTime()
|
||||
end
|
||||
local ActorTotal = self [actor_key]
|
||||
for _spellid, _skill in _pairs (ActorSkillsContainer) do
|
||||
local SkillName, _, SkillIcon = _GetSpellInfo (_spellid)
|
||||
_table_insert (ActorHealingTable, {_spellid, _skill [skill_key], _skill [skill_key]/ActorTotal*100, {SkillName, nil, SkillIcon}})
|
||||
_table_insert (ActorHealingTable, {_spellid, _skill [skill_key], _skill [skill_key]/ActorTotal*100, {SkillName, nil, SkillIcon}, _skill [skill_key]/meu_tempo})
|
||||
end
|
||||
_table_sort (ActorHealingTable, _detalhes.Sort2)
|
||||
|
||||
@@ -478,26 +510,146 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
|
||||
_table_sort (ActorHealingTargets, _detalhes.Sort2)
|
||||
|
||||
--> Mostra as habilidades no tooltip
|
||||
GameTooltip:AddLine (Loc ["STRING_SPELLS"] .. ":") --> localiza-me
|
||||
for i = 1, _math_min (_detalhes.tooltip_max_abilities, #ActorHealingTable) do
|
||||
GameCooltip:AddLine (Loc ["STRING_SPELLS"], nil, nil, headerColor, nil, 12) --> localiza-me
|
||||
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
|
||||
--GameCooltip:AddIcon ([[Interface\HELPFRAME\HotIssueIcon]], 1, 1, 14, 14, 0, 1, 0, 1)
|
||||
--GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIALFRAME-SPIRITREZ]], 1, 1, 14, 14, 0.283203125, 0.470703125, 0.0859375, 0.9296875)
|
||||
GameCooltip:AddIcon ([[Interface\RAIDFRAME\Raid-Icon-Rez]], 1, 1, 14, 14, 0.109375, 0.890625, 0.0625, 0.90625)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
local tooltip_max_abilities = _detalhes.tooltip_max_abilities
|
||||
|
||||
if (instancia.sub_atributo == 3 or instancia.sub_atributo == 2) then
|
||||
tooltip_max_abilities = 6
|
||||
end
|
||||
|
||||
for i = 1, _math_min (tooltip_max_abilities, #ActorHealingTable) do
|
||||
if (ActorHealingTable[i][2] < 1) then
|
||||
break
|
||||
end
|
||||
GameTooltip:AddDoubleLine (ActorHealingTable[i][4][1]..": ", _detalhes:comma_value (ActorHealingTable[i][2]).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddTexture (ActorHealingTable[i][4][3])
|
||||
if (instancia.sub_atributo == 2) then
|
||||
GameCooltip:AddLine (ActorHealingTable[i][4][1]..": ", _detalhes:comma_value ( _math_floor (ActorHealingTable[i][5])).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
|
||||
else
|
||||
GameCooltip:AddLine (ActorHealingTable[i][4][1]..": ", _detalhes:comma_value (ActorHealingTable[i][2]).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
|
||||
end
|
||||
GameCooltip:AddIcon (ActorHealingTable[i][4][3], nil, nil, 14, 14)
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
end
|
||||
|
||||
if (instancia.sub_atributo < 3) then -- 1 or 2 -> healing done or hps
|
||||
GameTooltip:AddLine (Loc ["STRING_TARGETS"]..":") --> localiza-me
|
||||
for i = 1, _math_min (_detalhes.tooltip_max_targets, #ActorHealingTargets) do
|
||||
local container = instancia.showing [2]
|
||||
|
||||
if (instancia.sub_atributo == 1) then -- 1 or 2 -> healing done or hps
|
||||
|
||||
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
|
||||
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
|
||||
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0, 0.03125, 0.126953125, 0.15625)
|
||||
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TutorialFrame-LevelUp]], 1, 1, 14, 14, 0.10546875, 0.89453125, 0.05859375, 0.6796875)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
for i = 1, _math_min (tooltip_max_abilities, #ActorHealingTargets) do
|
||||
if (ActorHealingTargets[i][2] < 1) then
|
||||
break
|
||||
end
|
||||
GameTooltip:AddDoubleLine (ActorHealingTargets[i][1]..": ", _detalhes:comma_value (ActorHealingTargets[i][2]) .." (".._cstr ("%.1f", ActorHealingTargets[i][3]).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddTexture ("Interface\\AddOns\\Details\\images\\espadas")
|
||||
|
||||
GameCooltip:AddLine (ActorHealingTargets[i][1]..": ", _detalhes:comma_value (ActorHealingTargets[i][2]) .." (".._cstr ("%.1f", ActorHealingTargets[i][3]).."%)")
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
|
||||
local targetActor = container:PegarCombatente (_, ActorHealingTargets[i][1])
|
||||
|
||||
if (targetActor) then
|
||||
local classe = targetActor.classe
|
||||
if (not classe) then
|
||||
classe = "UNKNOW"
|
||||
end
|
||||
if (classe == "UNKNOW") then
|
||||
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1)
|
||||
else
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe]))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> PETS
|
||||
local meus_pets = self.pets
|
||||
|
||||
if (#meus_pets > 0) then --> teve ajudantes
|
||||
|
||||
local quantidade = {} --> armazena a quantidade de pets iguais
|
||||
local danos = {} --> armazena as habilidades
|
||||
local alvos = {} --> armazena os alvos
|
||||
local totais = {} --> armazena o dano total de cada objeto
|
||||
|
||||
for index, nome in _ipairs (meus_pets) do
|
||||
if (not quantidade [nome]) then
|
||||
quantidade [nome] = 1
|
||||
|
||||
local my_self = instancia.showing [class_type]:PegarCombatente (_, nome)
|
||||
if (my_self) then
|
||||
|
||||
local meu_total = my_self.total_without_pet
|
||||
local tabela = my_self.spell_tables._ActorTable
|
||||
local meus_danos = {}
|
||||
|
||||
local meu_tempo
|
||||
if (_detalhes.time_type == 1 or not self.grupo) then
|
||||
meu_tempo = my_self:Tempo()
|
||||
elseif (_detalhes.time_type == 2) then
|
||||
meu_tempo = my_self:GetCombatTime()
|
||||
end
|
||||
totais [#totais+1] = {nome, my_self.total_without_pet, my_self.total_without_pet/meu_tempo}
|
||||
|
||||
for spellid, tabela in _pairs (tabela) do
|
||||
local nome, rank, icone = _GetSpellInfo (spellid)
|
||||
_table_insert (meus_danos, {spellid, tabela.total, tabela.total/meu_total*100, {nome, rank, icone}})
|
||||
end
|
||||
_table_sort (meus_danos, _detalhes.Sort2)
|
||||
danos [nome] = meus_danos
|
||||
|
||||
local meus_inimigos = {}
|
||||
tabela = my_self.targets._ActorTable
|
||||
for _, tabela in _ipairs (tabela) do
|
||||
_table_insert (meus_inimigos, {tabela.nome, tabela.total, tabela.total/meu_total*100})
|
||||
end
|
||||
_table_sort (meus_inimigos,_detalhes.Sort2)
|
||||
alvos [nome] = meus_inimigos
|
||||
end
|
||||
|
||||
else
|
||||
quantidade [nome] = quantidade [nome]+1
|
||||
end
|
||||
end
|
||||
|
||||
local _quantidade = 0
|
||||
local added_logo = false
|
||||
|
||||
_table_sort (totais, _detalhes.Sort2)
|
||||
|
||||
for _, _table in _ipairs (totais) do
|
||||
|
||||
if (_table [2] > 0) then
|
||||
|
||||
if (not added_logo) then
|
||||
added_logo = true
|
||||
GameCooltip:AddLine (Loc ["STRING_PETS"].."", nil, nil, headerColor, nil, 12)
|
||||
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
|
||||
GameCooltip:AddIcon ([[Interface\COMMON\friendship-heart]], 1, 1, 14, 14, 0.21875, 0.78125, 0.09375, 0.6875)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
end
|
||||
|
||||
local n = _table [1]:gsub (("%s%<.*"), "")
|
||||
if (instancia.sub_atributo == 2) then
|
||||
GameCooltip:AddLine (n, _detalhes:comma_value ( _math_floor (_table [3])) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
|
||||
else
|
||||
GameCooltip:AddLine (n, _detalhes:comma_value (_table [2]) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
|
||||
end
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 14, 14, 0.25, 0.49609375, 0.75, 1)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
@@ -249,9 +249,15 @@ end
|
||||
function _detalhes:CriarInstancia (_, id)
|
||||
|
||||
if (id and _type (id) == "boolean") then
|
||||
|
||||
if (#_detalhes.tabela_instancias >= _detalhes.instances_amount) then
|
||||
return _detalhes:Msg (Loc ["STRING_INSTANCE_LIMIT"])
|
||||
end
|
||||
|
||||
local nova_instancia = _detalhes:NovaInstancia (#_detalhes.tabela_instancias+1)
|
||||
_detalhes.tabela_instancias [#_detalhes.tabela_instancias+1] = nova_instancia
|
||||
return nova_instancia
|
||||
|
||||
elseif (id) then
|
||||
local instancia = _detalhes.tabela_instancias [id]
|
||||
if (instancia and not instancia:IsAtiva()) then
|
||||
@@ -268,6 +274,10 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
if (#_detalhes.tabela_instancias >= _detalhes.instances_amount) then
|
||||
return _detalhes:Msg (Loc ["STRING_INSTANCE_LIMIT"])
|
||||
end
|
||||
|
||||
local nova_instancia = _detalhes:NovaInstancia (#_detalhes.tabela_instancias+1)
|
||||
_detalhes.tabela_instancias [#_detalhes.tabela_instancias+1] = nova_instancia
|
||||
|
||||
@@ -1117,38 +1127,7 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
|
||||
if (instancia.showing and instancia.showing.contra) then
|
||||
--print ("DEBUG: contra", instancia.showing.contra)
|
||||
end
|
||||
|
||||
if (_detalhes.cloud_process) then
|
||||
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("cloud process running...")
|
||||
end
|
||||
|
||||
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
|
||||
|
||||
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 ("cofirmed, geting heal.")
|
||||
end
|
||||
elseif (atributo == 3 and _detalhes.in_combat and not _detalhes:CaptureGet ("energy") and _detalhes.host_by) then
|
||||
|
||||
elseif (atributo == 4 and _detalhes.in_combat and not _detalhes:CaptureGet ("miscdata") and _detalhes.host_by) then
|
||||
|
||||
else
|
||||
time_left = nil
|
||||
end
|
||||
|
||||
if (time_left) then
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("showing please wait.")
|
||||
end
|
||||
instancia:InstanceAlert (Loc ["STRING_PLEASE_WAIT"], {[[Interface\COMMON\StreamCircle]], 22, 22, true}, time_left)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGESEGMENT", nil, instancia, segmento)
|
||||
|
||||
end
|
||||
@@ -1205,6 +1184,43 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
|
||||
_detalhes.popup:Select (2, instancia.sub_atributo, atributo)
|
||||
end
|
||||
|
||||
if (_detalhes.cloud_process) then
|
||||
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) instancia #"..instancia.meu_id.." found cloud process.")
|
||||
end
|
||||
|
||||
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 (_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
|
||||
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
|
||||
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
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) instancia need misc cloud.")
|
||||
end
|
||||
else
|
||||
time_left = nil
|
||||
end
|
||||
|
||||
if (time_left) then
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) showing instance alert.")
|
||||
end
|
||||
instancia:InstanceAlert (Loc ["STRING_PLEASE_WAIT"], {[[Interface\COMMON\StreamCircle]], 22, 22, true}, time_left)
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instancia, atributo, sub_atributo)
|
||||
|
||||
end
|
||||
|
||||
+52
-21
@@ -128,8 +128,8 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra)
|
||||
end
|
||||
end
|
||||
|
||||
GameCooltip:AddLine (" ", " ", 1, "white", "white")
|
||||
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], "--", 1, "white", "white")
|
||||
--GameCooltip:AddLine (" ", " ", 1, "white", "white")
|
||||
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)
|
||||
|
||||
if (battleress) then
|
||||
@@ -516,17 +516,27 @@ function atributo_misc:ToolTip (instancia, numero, barra)
|
||||
return self:ToolTipDead (instancia, numero, barra)
|
||||
end
|
||||
end
|
||||
--> tooltip locals
|
||||
local r, g, b
|
||||
local headerColor = "yellow"
|
||||
local barAlha = .6
|
||||
|
||||
|
||||
function atributo_misc:ToolTipDead (instancia, numero, barra)
|
||||
|
||||
local last_dead = self.dead_log [#self.dead_log]
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
function atributo_misc:ToolTipCC (instancia, numero, barra)
|
||||
|
||||
local owner = self.owner
|
||||
if (owner and owner.classe) then
|
||||
r, g, b = unpack (_detalhes.class_colors [owner.classe])
|
||||
else
|
||||
r, g, b = unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
|
||||
local meu_total = self ["cc_break"]
|
||||
local habilidades = self.cc_break_spell_tables._ActorTable
|
||||
|
||||
@@ -542,8 +552,8 @@ function atributo_misc:ToolTipCC (instancia, numero, barra)
|
||||
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])
|
||||
GameTooltip:AddDoubleLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddTexture (icone_magia)
|
||||
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||
end
|
||||
else
|
||||
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
||||
@@ -561,8 +571,8 @@ function atributo_misc:ToolTipCC (instancia, numero, barra)
|
||||
for i = 1, _math_min (3, #buffs_dispelados) do
|
||||
local esta_habilidade = buffs_dispelados[i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
||||
GameTooltip:AddDoubleLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddTexture (icone_magia)
|
||||
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -571,6 +581,13 @@ end
|
||||
|
||||
function atributo_misc:ToolTipDispell (instancia, numero, barra)
|
||||
|
||||
local owner = self.owner
|
||||
if (owner and owner.classe) then
|
||||
r, g, b = unpack (_detalhes.class_colors [owner.classe])
|
||||
else
|
||||
r, g, b = unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
|
||||
local meu_total = self ["dispell"]
|
||||
local habilidades = self.dispell_spell_tables._ActorTable
|
||||
|
||||
@@ -586,8 +603,8 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
|
||||
for i = 1, _math_min (3, #meus_dispells) do
|
||||
local esta_habilidade = meus_dispells[i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
||||
GameTooltip:AddDoubleLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddTexture (icone_magia)
|
||||
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||
end
|
||||
else
|
||||
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
||||
@@ -605,8 +622,8 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
|
||||
for i = 1, _math_min (3, #buffs_dispelados) do
|
||||
local esta_habilidade = buffs_dispelados[i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
||||
GameTooltip:AddDoubleLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddTexture (icone_magia)
|
||||
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -615,6 +632,13 @@ end
|
||||
|
||||
function atributo_misc:ToolTipRess (instancia, numero, barra)
|
||||
|
||||
local owner = self.owner
|
||||
if (owner and owner.classe) then
|
||||
r, g, b = unpack (_detalhes.class_colors [owner.classe])
|
||||
else
|
||||
r, g, b = unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
|
||||
local meu_total = self ["ress"]
|
||||
local minha_tabela = self.ress_spell_tables._ActorTable
|
||||
|
||||
@@ -631,8 +655,8 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
|
||||
for i = 1, _math_min (3, #meus_ress) do
|
||||
local esta_habilidade = meus_ress[i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
||||
GameTooltip:AddDoubleLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddTexture (icone_magia)
|
||||
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||
end
|
||||
else
|
||||
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
||||
@@ -650,8 +674,8 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
|
||||
GameTooltip:AddLine (Loc ["STRING_TARGETS"]..":")
|
||||
if (#alvos > 0) then
|
||||
for i = 1, _math_min (3, #alvos) do
|
||||
GameTooltip:AddDoubleLine (alvos[i][1]..": ", alvos[i][2], 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddTexture ("Interface\\Icons\\PALADIN_HOLY")
|
||||
GameCooltip:AddLine (alvos[i][1]..": ", alvos[i][2])
|
||||
GameCooltip:AddIcon ("Interface\\Icons\\PALADIN_HOLY", nil, nil, 14, 14)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -661,6 +685,13 @@ end
|
||||
|
||||
function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
|
||||
|
||||
local owner = self.owner
|
||||
if (owner and owner.classe) then
|
||||
r, g, b = unpack (_detalhes.class_colors [owner.classe])
|
||||
else
|
||||
r, g, b = unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
|
||||
local meu_total = self ["interrupt"]
|
||||
local minha_tabela = self.interrupt_spell_tables._ActorTable
|
||||
|
||||
@@ -677,8 +708,8 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
|
||||
for i = 1, _math_min (3, #meus_interrupts) do
|
||||
local esta_habilidade = meus_interrupts[i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
||||
GameTooltip:AddDoubleLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddTexture (icone_magia)
|
||||
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||
end
|
||||
else
|
||||
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
||||
@@ -697,8 +728,8 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
|
||||
for i = 1, _math_min (3, #habilidades_interrompidas) do
|
||||
local esta_habilidade = habilidades_interrompidas[i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
||||
GameTooltip:AddDoubleLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddTexture (icone_magia)
|
||||
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -178,16 +178,20 @@ function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwn
|
||||
|
||||
--> pega afiliação
|
||||
local details_flag = 0x00000000
|
||||
|
||||
if (flag) then
|
||||
--print ("tem flag")
|
||||
|
||||
if (_bit_band (flag, 0x00000400) ~= 0) then --> é um player
|
||||
details_flag = details_flag+0x00000001
|
||||
|
||||
if (IsInInstance()) then
|
||||
novo_objeto.displayName = nome:gsub (("%-.*"), "")
|
||||
else
|
||||
novo_objeto.displayName = nome
|
||||
novo_objeto.displayName = _detalhes:GetNickname (serial, false, true) --> serial, default, silent
|
||||
if (not novo_objeto.displayName) then
|
||||
if (IsInInstance()) then
|
||||
novo_objeto.displayName = nome:gsub (("%-.*"), "")
|
||||
else
|
||||
novo_objeto.displayName = nome
|
||||
end
|
||||
end
|
||||
|
||||
if (_bit_band (flag, EM_GRUPO) ~= 0) then --> faz parte do grupo
|
||||
|
||||
Reference in New Issue
Block a user