- 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:
@@ -1,3 +1,7 @@
|
|||||||
|
externals:
|
||||||
|
!NickTag:
|
||||||
|
url: http://hg.curseforge.net/wow/nicktag/mainline
|
||||||
|
|
||||||
move-folders:
|
move-folders:
|
||||||
Details/plugins/Details_DmgRank: Details_DmgRank
|
Details/plugins/Details_DmgRank: Details_DmgRank
|
||||||
Details/plugins/Details_EncounterDetails: Details_EncounterDetails
|
Details/plugins/Details_EncounterDetails: Details_EncounterDetails
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
|
|
||||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
--> global name declaration
|
--> global name declaration
|
||||||
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0")
|
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
|
||||||
_detalhes.userversion = "v1.1.8"
|
_detalhes.userversion = "v1.2.0"
|
||||||
_detalhes.version = "Alpha 003"
|
_detalhes.version = "Alpha 004"
|
||||||
_detalhes.realversion = 3
|
_detalhes.realversion = 4
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
--> initialization stuff
|
--> initialization stuff
|
||||||
@@ -210,8 +210,9 @@ do
|
|||||||
end
|
end
|
||||||
|
|
||||||
--> print messages
|
--> print messages
|
||||||
function _detalhes:Msg (_string)
|
function _detalhes:Msg (_string, arg1, arg2, arg3, arg4)
|
||||||
print (Loc ["STRING_DETAILS1"] .. _string)
|
|
||||||
|
print (Loc ["STRING_DETAILS1"] .. _string, arg1 or "", arg2 or "", arg3 or "", arg4 or "")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
+190
-58
@@ -667,6 +667,7 @@ end
|
|||||||
end
|
end
|
||||||
|
|
||||||
---------> TOOLTIPS BIFURCAÇÃO
|
---------> TOOLTIPS BIFURCAÇÃO
|
||||||
|
|
||||||
function atributo_damage:ToolTip (instancia, numero, barra)
|
function atributo_damage:ToolTip (instancia, numero, barra)
|
||||||
--> seria possivel aqui colocar o icone da classe dele?
|
--> seria possivel aqui colocar o icone da classe dele?
|
||||||
|
|
||||||
@@ -682,6 +683,10 @@ function atributo_damage:ToolTip (instancia, numero, barra)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
--> tooltip locals
|
||||||
|
local r, g, b
|
||||||
|
local headerColor = "yellow"
|
||||||
|
local barAlha = .6
|
||||||
|
|
||||||
--[[exported]] function _detalhes.Sort1 (table1, table2)
|
--[[exported]] function _detalhes.Sort1 (table1, table2)
|
||||||
return table1 [1] > table2 [1]
|
return table1 [1] > table2 [1]
|
||||||
@@ -698,15 +703,29 @@ end
|
|||||||
|
|
||||||
---------> DAMAGE DONE & DPS
|
---------> DAMAGE DONE & DPS
|
||||||
function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
|
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
|
--> TOP HABILIDADES
|
||||||
local ActorDamage = self.total_without_pet
|
local ActorDamage = self.total_without_pet
|
||||||
local ActorSkillsContainer = self.spell_tables._ActorTable
|
local ActorSkillsContainer = self.spell_tables._ActorTable
|
||||||
local ActorSkillsSortTable = {}
|
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
|
for _spellid, _skill in _pairs (ActorSkillsContainer) do
|
||||||
ActorSkillsSortTable [#ActorSkillsSortTable+1] = {_spellid, _skill.total}
|
ActorSkillsSortTable [#ActorSkillsSortTable+1] = {_spellid, _skill.total, _skill.total/meu_tempo}
|
||||||
end
|
end
|
||||||
_table_sort (ActorSkillsSortTable, _detalhes.Sort2)
|
_table_sort (ActorSkillsSortTable, _detalhes.Sort2)
|
||||||
|
|
||||||
@@ -719,24 +738,47 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
|
|||||||
_table_sort (ActorTargetsSortTable, _detalhes.Sort2)
|
_table_sort (ActorTargetsSortTable, _detalhes.Sort2)
|
||||||
|
|
||||||
--> MOSTRA HABILIDADES
|
--> 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
|
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 SkillTable = ActorSkillsSortTable [i]
|
||||||
local nome_magia, _, icone_magia = _GetSpellInfo (SkillTable [1])
|
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)
|
if (instancia.sub_atributo == 1) then
|
||||||
GameTooltip:AddTexture (icone_magia)
|
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
|
end
|
||||||
else
|
else
|
||||||
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
||||||
end
|
end
|
||||||
|
|
||||||
--> MOSTRA INIMIGOS
|
--> MOSTRA INIMIGOS
|
||||||
GameTooltip:AddLine (Loc ["STRING_TARGETS"]..":")
|
if (instancia.sub_atributo == 1) then
|
||||||
for i = 1, _math_min (_detalhes.tooltip_max_targets, #ActorTargetsSortTable) do
|
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
|
||||||
local este_inimigo = ActorTargetsSortTable [i]
|
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
|
||||||
GameTooltip:AddDoubleLine (este_inimigo[1]..": ", _detalhes:comma_value (este_inimigo[2]) .." (".._cstr("%.1f", este_inimigo[2]/ActorDamage*100).."%)", 1, 1, 1, 1, 1, 1)
|
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0, 0.03125, 0.126953125, 0.15625)
|
||||||
GameTooltip:AddTexture ("Interface\\AddOns\\Details\\images\\espadas")
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -759,7 +801,14 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
|
|||||||
local tabela = my_self.spell_tables._ActorTable
|
local tabela = my_self.spell_tables._ActorTable
|
||||||
local meus_danos = {}
|
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
|
for spellid, tabela in _pairs (tabela) do
|
||||||
local nome, rank, icone = _GetSpellInfo (spellid)
|
local nome, rank, icone = _GetSpellInfo (spellid)
|
||||||
@@ -782,42 +831,83 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
GameTooltip:AddLine (" ")
|
--GameTooltip:AddLine (" ")
|
||||||
|
--GameCooltip:AddLine (" ")
|
||||||
|
|
||||||
local _quantidade = 0
|
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
|
if (true) then
|
||||||
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
|
for _, _table in _ipairs (totais) do
|
||||||
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"])
|
if (_table [2] > 0) then
|
||||||
for i = 1, 3 do
|
|
||||||
if (meus_danos[i]) then
|
if (not added_logo) then
|
||||||
--> meus_danos = { [1] = spellid [2] = total [3] = % [4] = { [1] = nome [2] = rank [3] = icone } }
|
added_logo = true
|
||||||
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)
|
GameCooltip:AddLine (Loc ["STRING_PETS"].."", nil, nil, headerColor, nil, 12)
|
||||||
GameTooltip:AddTexture (meus_danos[i][4][3])
|
|
||||||
|
--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
|
||||||
end
|
end
|
||||||
|
|
||||||
GameTooltip:AddLine (Loc ["STRING_TARGETS"])
|
else
|
||||||
for i = 1, 3 do
|
--> old pet display mode
|
||||||
local meus_inimigos = alvos [nome]
|
for nome, meus_danos in _pairs (danos) do --> um pet de cada vez
|
||||||
if (meus_inimigos[i]) then
|
local n = nome:gsub (("%s%<.*"), "")
|
||||||
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:AddDoubleLine ("Ajudante: ", "x"..quantidade[nome].." "..n.." (".._math_floor (totais [nome]/self.total*100).."%)", nil, nil, nil, 1, 1, 1)
|
||||||
--GameTooltip:AddTexture ("Interface\\GossipFrame\\BattleMasterGossipIcon.blp")
|
--> 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
|
||||||
end
|
|
||||||
|
|
||||||
GameTooltip:AddLine (" ")
|
|
||||||
|
|
||||||
_quantidade = _quantidade + 1
|
|
||||||
if (_quantidade >= _detalhes.tooltip_max_pets) then
|
|
||||||
return true
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -828,6 +918,13 @@ end
|
|||||||
---------> DAMAGE TAKEN
|
---------> DAMAGE TAKEN
|
||||||
function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra)
|
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 agressores = self.damage_from
|
||||||
local damage_taken = self.damage_taken
|
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 showing = tabela_do_combate [class_type] --> o que esta sendo mostrado -> [1] - dano [2] - cura --> pega o container com ._NameIndexTable ._ActorTable
|
||||||
|
|
||||||
local meus_agressores = {}
|
local meus_agressores = {}
|
||||||
|
|
||||||
for nome, _ in _pairs (agressores) do --> agressores seria a lista de nomes
|
for nome, _ in _pairs (agressores) do --> agressores seria a lista de nomes
|
||||||
local este_agressor = showing._ActorTable[showing._NameIndexTable[nome]]
|
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
|
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)
|
_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
|
local max = #meus_agressores
|
||||||
if (max > 6) then
|
if (max > 6) then
|
||||||
max = 6
|
max = 6
|
||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, max do
|
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]
|
local classe = meus_agressores[i][3]
|
||||||
|
|
||||||
if (not classe) then
|
if (not classe) then
|
||||||
classe = "monster"
|
classe = "UNKNOW"
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
return true
|
return true
|
||||||
@@ -872,6 +978,13 @@ end
|
|||||||
---------> FRIENDLY FIRE
|
---------> FRIENDLY FIRE
|
||||||
function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra)
|
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 FriendlyFire = self.friendlyfire --> container de jogadores
|
||||||
local FriendlyFireTotal = self.friendlyfire_total
|
local FriendlyFireTotal = self.friendlyfire_total
|
||||||
|
|
||||||
@@ -880,10 +993,10 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra)
|
|||||||
|
|
||||||
local DamagedPlayers = {}
|
local DamagedPlayers = {}
|
||||||
local Skills = {}
|
local Skills = {}
|
||||||
|
|
||||||
for nome, index in _pairs (FriendlyFire._NameIndexTable) do
|
for nome, index in _pairs (FriendlyFire._NameIndexTable) do
|
||||||
local TargetActor = FriendlyFire._ActorTable [index]
|
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
|
local SkillTable = TargetActor.spell_tables --> container das habilidades
|
||||||
for spellid, tabela in _pairs (SkillTable._ActorTable) do
|
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 (DamagedPlayers, _detalhes.Sort2)
|
||||||
_table_sort (Skills, _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
|
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)
|
local classe = DamagedPlayers[i][3]
|
||||||
GameTooltip:AddTexture ("Interface\\AddOns\\Details\\images\\espadas")
|
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
|
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
|
for i = 1, _math_min (_detalhes.tooltip_max_abilities, #Skills) do
|
||||||
local nome, _, icone = _GetSpellInfo (Skills[i][1])
|
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)
|
GameCooltip:AddLine (nome.." (x".. Skills[i][3].."): ", _detalhes:comma_value (Skills[i][2]).." (".._cstr("%.1f", Skills[i][2]/FriendlyFireTotal*100).."%)")
|
||||||
GameTooltip:AddTexture (icone)
|
GameCooltip:AddIcon (icone, nil, nil, 14, 14)
|
||||||
|
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||||
end
|
end
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|||||||
+31
-10
@@ -383,15 +383,25 @@ end
|
|||||||
---------> TOOLTIPS BIFURCAÇÃO
|
---------> TOOLTIPS BIFURCAÇÃO
|
||||||
function atributo_energy:ToolTip (instancia, numero, barra)
|
function atributo_energy:ToolTip (instancia, numero, barra)
|
||||||
--> seria possivel aqui colocar o icone da classe dele?
|
--> seria possivel aqui colocar o icone da classe dele?
|
||||||
GameTooltip:ClearLines()
|
--GameCooltip:AddLine (barra.colocacao..". "..self.nome)
|
||||||
GameTooltip:AddLine (barra.colocacao..". "..self.nome)
|
|
||||||
if (instancia.sub_atributo <= 4) then
|
if (instancia.sub_atributo <= 4) then
|
||||||
return self:ToolTipRegenRecebido (instancia, numero, barra)
|
return self:ToolTipRegenRecebido (instancia, numero, barra)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
--> tooltip locals
|
||||||
|
local r, g, b
|
||||||
|
local headerColor = "yellow"
|
||||||
|
local barAlha = .6
|
||||||
|
|
||||||
function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra)
|
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 tabela_do_combate = instancia.showing
|
||||||
local showing = tabela_do_combate [class_type]
|
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)
|
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
|
local max = #habilidades
|
||||||
if (max > 3) then
|
if (max > 3) then
|
||||||
@@ -412,12 +424,15 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra)
|
|||||||
|
|
||||||
for i = 1, max do
|
for i = 1, max do
|
||||||
local nome_magia, _, icone_magia = _GetSpellInfo (habilidades[i][1])
|
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)
|
GameCooltip:AddLine (nome_magia..": ", _detalhes:comma_value (habilidades[i][2]).." (".._cstr("%.1f", (habilidades[i][2]/total_regenerado) * 100).."%)")
|
||||||
GameTooltip:AddTexture (icone_magia)
|
GameCooltip:AddIcon (icone_magia)
|
||||||
|
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||||
end
|
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
|
max = #fontes
|
||||||
if (max > 3) then
|
if (max > 3) then
|
||||||
@@ -425,13 +440,19 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra)
|
|||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, max do
|
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]
|
local classe = fontes[i][3]
|
||||||
if (not classe) then
|
if (not classe) then
|
||||||
classe = "monster"
|
classe = "UNKNOW"
|
||||||
end
|
end
|
||||||
|
if (classe == "UNKNOW") then
|
||||||
GameTooltip:AddTexture ("Interface\\AddOns\\Details\\images\\"..classe:lower().."_small")
|
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
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|||||||
+167
-15
@@ -408,10 +408,21 @@ function atributo_heal:ToolTip (instancia, numero, barra)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
--> tooltip locals
|
||||||
|
local r, g, b
|
||||||
|
local headerColor = "yellow"
|
||||||
|
local barAlha = .6
|
||||||
|
|
||||||
---------> HEALING TAKEN
|
---------> HEALING TAKEN
|
||||||
function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra)
|
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 curadores = self.healing_from
|
||||||
local total_curado = self.healing_taken
|
local total_curado = self.healing_taken
|
||||||
|
|
||||||
@@ -431,7 +442,10 @@ function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra)
|
|||||||
end
|
end
|
||||||
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)
|
_table_sort (meus_curadores, function (a, b) return a[2] > b[2] end)
|
||||||
local max = #meus_curadores
|
local max = #meus_curadores
|
||||||
@@ -440,12 +454,17 @@ function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra)
|
|||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, max do
|
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]
|
local classe = meus_curadores[i][3]
|
||||||
if (not classe) then
|
if (not classe) then
|
||||||
classe = "monster"
|
classe = "UNKNOW"
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
return true
|
return true
|
||||||
@@ -454,6 +473,13 @@ end
|
|||||||
---------> HEALING DONE / HPS / OVERHEAL
|
---------> HEALING DONE / HPS / OVERHEAL
|
||||||
function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
|
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 ActorHealingTable = {}
|
||||||
local ActorHealingTargets = {}
|
local ActorHealingTargets = {}
|
||||||
local ActorSkillsContainer = self.spell_tables._ActorTable
|
local ActorSkillsContainer = self.spell_tables._ActorTable
|
||||||
@@ -463,10 +489,16 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
|
|||||||
key = "totalover", "overheal"
|
key = "totalover", "overheal"
|
||||||
end
|
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]
|
local ActorTotal = self [actor_key]
|
||||||
for _spellid, _skill in _pairs (ActorSkillsContainer) do
|
for _spellid, _skill in _pairs (ActorSkillsContainer) do
|
||||||
local SkillName, _, SkillIcon = _GetSpellInfo (_spellid)
|
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
|
end
|
||||||
_table_sort (ActorHealingTable, _detalhes.Sort2)
|
_table_sort (ActorHealingTable, _detalhes.Sort2)
|
||||||
|
|
||||||
@@ -478,26 +510,146 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
|
|||||||
_table_sort (ActorHealingTargets, _detalhes.Sort2)
|
_table_sort (ActorHealingTargets, _detalhes.Sort2)
|
||||||
|
|
||||||
--> Mostra as habilidades no tooltip
|
--> Mostra as habilidades no tooltip
|
||||||
GameTooltip:AddLine (Loc ["STRING_SPELLS"] .. ":") --> localiza-me
|
GameCooltip:AddLine (Loc ["STRING_SPELLS"], nil, nil, headerColor, nil, 12) --> localiza-me
|
||||||
for i = 1, _math_min (_detalhes.tooltip_max_abilities, #ActorHealingTable) do
|
--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
|
if (ActorHealingTable[i][2] < 1) then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
GameTooltip:AddDoubleLine (ActorHealingTable[i][4][1]..": ", _detalhes:comma_value (ActorHealingTable[i][2]).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)", 1, 1, 1, 1, 1, 1)
|
if (instancia.sub_atributo == 2) then
|
||||||
GameTooltip:AddTexture (ActorHealingTable[i][4][3])
|
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
|
end
|
||||||
|
|
||||||
if (instancia.sub_atributo < 3) then -- 1 or 2 -> healing done or hps
|
local container = instancia.showing [2]
|
||||||
GameTooltip:AddLine (Loc ["STRING_TARGETS"]..":") --> localiza-me
|
|
||||||
for i = 1, _math_min (_detalhes.tooltip_max_targets, #ActorHealingTargets) do
|
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
|
if (ActorHealingTargets[i][2] < 1) then
|
||||||
break
|
break
|
||||||
end
|
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
|
||||||
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
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -249,9 +249,15 @@ end
|
|||||||
function _detalhes:CriarInstancia (_, id)
|
function _detalhes:CriarInstancia (_, id)
|
||||||
|
|
||||||
if (id and _type (id) == "boolean") then
|
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)
|
local nova_instancia = _detalhes:NovaInstancia (#_detalhes.tabela_instancias+1)
|
||||||
_detalhes.tabela_instancias [#_detalhes.tabela_instancias+1] = nova_instancia
|
_detalhes.tabela_instancias [#_detalhes.tabela_instancias+1] = nova_instancia
|
||||||
return nova_instancia
|
return nova_instancia
|
||||||
|
|
||||||
elseif (id) then
|
elseif (id) then
|
||||||
local instancia = _detalhes.tabela_instancias [id]
|
local instancia = _detalhes.tabela_instancias [id]
|
||||||
if (instancia and not instancia:IsAtiva()) then
|
if (instancia and not instancia:IsAtiva()) then
|
||||||
@@ -268,6 +274,10 @@ end
|
|||||||
end
|
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)
|
local nova_instancia = _detalhes:NovaInstancia (#_detalhes.tabela_instancias+1)
|
||||||
_detalhes.tabela_instancias [#_detalhes.tabela_instancias+1] = nova_instancia
|
_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
|
if (instancia.showing and instancia.showing.contra) then
|
||||||
--print ("DEBUG: contra", instancia.showing.contra)
|
--print ("DEBUG: contra", instancia.showing.contra)
|
||||||
end
|
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)
|
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGESEGMENT", nil, instancia, segmento)
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -1205,6 +1184,43 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
|
|||||||
_detalhes.popup:Select (2, instancia.sub_atributo, atributo)
|
_detalhes.popup:Select (2, instancia.sub_atributo, atributo)
|
||||||
end
|
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)
|
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instancia, atributo, sub_atributo)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
+52
-21
@@ -128,8 +128,8 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
GameCooltip:AddLine (" ", " ", 1, "white", "white")
|
--GameCooltip:AddLine (" ", " ", 1, "white", "white")
|
||||||
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], "--", 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)
|
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
|
||||||
|
|
||||||
if (battleress) then
|
if (battleress) then
|
||||||
@@ -516,17 +516,27 @@ function atributo_misc:ToolTip (instancia, numero, barra)
|
|||||||
return self:ToolTipDead (instancia, numero, barra)
|
return self:ToolTipDead (instancia, numero, barra)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
--> tooltip locals
|
||||||
|
local r, g, b
|
||||||
|
local headerColor = "yellow"
|
||||||
|
local barAlha = .6
|
||||||
|
|
||||||
|
|
||||||
function atributo_misc:ToolTipDead (instancia, numero, barra)
|
function atributo_misc:ToolTipDead (instancia, numero, barra)
|
||||||
|
|
||||||
local last_dead = self.dead_log [#self.dead_log]
|
local last_dead = self.dead_log [#self.dead_log]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function atributo_misc:ToolTipCC (instancia, numero, barra)
|
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 meu_total = self ["cc_break"]
|
||||||
local habilidades = self.cc_break_spell_tables._ActorTable
|
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
|
for i = 1, _math_min (3, #meus_cc_breaks) do
|
||||||
local esta_habilidade = meus_cc_breaks[i]
|
local esta_habilidade = meus_cc_breaks[i]
|
||||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
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)
|
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||||
GameTooltip:AddTexture (icone_magia)
|
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
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
|
for i = 1, _math_min (3, #buffs_dispelados) do
|
||||||
local esta_habilidade = buffs_dispelados[i]
|
local esta_habilidade = buffs_dispelados[i]
|
||||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
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)
|
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||||
GameTooltip:AddTexture (icone_magia)
|
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -571,6 +581,13 @@ end
|
|||||||
|
|
||||||
function atributo_misc:ToolTipDispell (instancia, numero, barra)
|
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 meu_total = self ["dispell"]
|
||||||
local habilidades = self.dispell_spell_tables._ActorTable
|
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
|
for i = 1, _math_min (3, #meus_dispells) do
|
||||||
local esta_habilidade = meus_dispells[i]
|
local esta_habilidade = meus_dispells[i]
|
||||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
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)
|
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||||
GameTooltip:AddTexture (icone_magia)
|
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
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
|
for i = 1, _math_min (3, #buffs_dispelados) do
|
||||||
local esta_habilidade = buffs_dispelados[i]
|
local esta_habilidade = buffs_dispelados[i]
|
||||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
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)
|
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||||
GameTooltip:AddTexture (icone_magia)
|
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -615,6 +632,13 @@ end
|
|||||||
|
|
||||||
function atributo_misc:ToolTipRess (instancia, numero, barra)
|
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 meu_total = self ["ress"]
|
||||||
local minha_tabela = self.ress_spell_tables._ActorTable
|
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
|
for i = 1, _math_min (3, #meus_ress) do
|
||||||
local esta_habilidade = meus_ress[i]
|
local esta_habilidade = meus_ress[i]
|
||||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
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)
|
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||||
GameTooltip:AddTexture (icone_magia)
|
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
||||||
@@ -650,8 +674,8 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
|
|||||||
GameTooltip:AddLine (Loc ["STRING_TARGETS"]..":")
|
GameTooltip:AddLine (Loc ["STRING_TARGETS"]..":")
|
||||||
if (#alvos > 0) then
|
if (#alvos > 0) then
|
||||||
for i = 1, _math_min (3, #alvos) do
|
for i = 1, _math_min (3, #alvos) do
|
||||||
GameTooltip:AddDoubleLine (alvos[i][1]..": ", alvos[i][2], 1, 1, 1, 1, 1, 1)
|
GameCooltip:AddLine (alvos[i][1]..": ", alvos[i][2])
|
||||||
GameTooltip:AddTexture ("Interface\\Icons\\PALADIN_HOLY")
|
GameCooltip:AddIcon ("Interface\\Icons\\PALADIN_HOLY", nil, nil, 14, 14)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -661,6 +685,13 @@ end
|
|||||||
|
|
||||||
function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
|
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 meu_total = self ["interrupt"]
|
||||||
local minha_tabela = self.interrupt_spell_tables._ActorTable
|
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
|
for i = 1, _math_min (3, #meus_interrupts) do
|
||||||
local esta_habilidade = meus_interrupts[i]
|
local esta_habilidade = meus_interrupts[i]
|
||||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
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)
|
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||||
GameTooltip:AddTexture (icone_magia)
|
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
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
|
for i = 1, _math_min (3, #habilidades_interrompidas) do
|
||||||
local esta_habilidade = habilidades_interrompidas[i]
|
local esta_habilidade = habilidades_interrompidas[i]
|
||||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
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)
|
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||||
GameTooltip:AddTexture (icone_magia)
|
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -178,16 +178,20 @@ function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwn
|
|||||||
|
|
||||||
--> pega afiliação
|
--> pega afiliação
|
||||||
local details_flag = 0x00000000
|
local details_flag = 0x00000000
|
||||||
|
|
||||||
if (flag) then
|
if (flag) then
|
||||||
--print ("tem flag")
|
--print ("tem flag")
|
||||||
|
|
||||||
if (_bit_band (flag, 0x00000400) ~= 0) then --> é um player
|
if (_bit_band (flag, 0x00000400) ~= 0) then --> é um player
|
||||||
details_flag = details_flag+0x00000001
|
details_flag = details_flag+0x00000001
|
||||||
|
|
||||||
if (IsInInstance()) then
|
novo_objeto.displayName = _detalhes:GetNickname (serial, false, true) --> serial, default, silent
|
||||||
novo_objeto.displayName = nome:gsub (("%-.*"), "")
|
if (not novo_objeto.displayName) then
|
||||||
else
|
if (IsInInstance()) then
|
||||||
novo_objeto.displayName = nome
|
novo_objeto.displayName = nome:gsub (("%-.*"), "")
|
||||||
|
else
|
||||||
|
novo_objeto.displayName = nome
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if (_bit_band (flag, EM_GRUPO) ~= 0) then --> faz parte do grupo
|
if (_bit_band (flag, EM_GRUPO) ~= 0) then --> faz parte do grupo
|
||||||
|
|||||||
+120
-42
@@ -150,7 +150,7 @@
|
|||||||
function _detalhes:EntrarEmCombate (...)
|
function _detalhes:EntrarEmCombate (...)
|
||||||
|
|
||||||
if (_detalhes.debug) then
|
if (_detalhes.debug) then
|
||||||
print ("Details started a new combat.")
|
_detalhes:Msg ("(debug) started a new combat.")
|
||||||
end
|
end
|
||||||
|
|
||||||
--> não tem historico, addon foi resetado, a primeira tabela é descartada -- Erase first table is does not have a firts segment history, this occour after reset or first run
|
--> não tem historico, addon foi resetado, a primeira tabela é descartada -- Erase first table is does not have a firts segment history, this occour after reset or first run
|
||||||
@@ -207,17 +207,17 @@
|
|||||||
if (not _detalhes:CaptureIsAllEnabled()) then
|
if (not _detalhes:CaptureIsAllEnabled()) then
|
||||||
_detalhes:SendCloudRequest()
|
_detalhes:SendCloudRequest()
|
||||||
if (_detalhes.debug) then
|
if (_detalhes.debug) then
|
||||||
_detalhes:Msg ("Details: CloudRequest()")
|
_detalhes:Msg ("(debug) requesting a cloud server.")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if (_detalhes.debug) then
|
if (_detalhes.debug) then
|
||||||
_detalhes:Msg ("Details: instance", _detalhes:IsInInstance())
|
_detalhes:Msg ("(debug) isn't inside a registred instance", _detalhes:IsInInstance())
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if (_detalhes.debug) then
|
if (_detalhes.debug) then
|
||||||
_detalhes:Msg ("Details: group and cloud", _detalhes.in_group, _detalhes.cloud_capture)
|
_detalhes:Msg ("(debug) isn't in group or cloud is turned off", _detalhes.in_group, _detalhes.cloud_capture)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -234,19 +234,20 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
if (_detalhes.debug) then
|
if (_detalhes.debug) then
|
||||||
print ("Details ended a combat.")
|
_detalhes:Msg ("(debug) ended a combat.")
|
||||||
end
|
end
|
||||||
|
|
||||||
if (not _detalhes.tabela_vigente.is_boss) then
|
if (not _detalhes.tabela_vigente.is_boss) then
|
||||||
local inimigo = _detalhes:FindEnemy()
|
local inimigo = _detalhes:FindEnemy()
|
||||||
if (inimigo) then
|
if (inimigo) then
|
||||||
if (_detalhes.debug) then
|
if (_detalhes.debug) then
|
||||||
print ("Details last fight against: " .. inimigo)
|
_detalhes:Msg ("(debug) enemy recognized", inimigo)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
_detalhes.tabela_vigente.enemy = inimigo
|
_detalhes.tabela_vigente.enemy = inimigo
|
||||||
if (_detalhes.debug) then
|
if (_detalhes.debug) then
|
||||||
_detalhes:EqualizeActorsSchedule()
|
_detalhes:Msg ("(debug) forcing equalize actors behavior.")
|
||||||
|
_detalhes:EqualizeActorsSchedule (_detalhes.host_of)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
||||||
@@ -256,7 +257,7 @@
|
|||||||
_detalhes:CaptureSet (false, "heal", false, 30)
|
_detalhes:CaptureSet (false, "heal", false, 30)
|
||||||
|
|
||||||
if (_detalhes.debug) then
|
if (_detalhes.debug) then
|
||||||
print ("Details found a boss on last fight, freezing parser for 30 seconds.")
|
_detalhes:Msg ("(debug) found encounter on last fight, freezing parser for 30 seconds.")
|
||||||
end
|
end
|
||||||
|
|
||||||
local bossFunction, bossFunctionType = _detalhes:GetBossFunction (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index)
|
local bossFunction, bossFunctionType = _detalhes:GetBossFunction (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index)
|
||||||
@@ -266,10 +267,12 @@
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
_detalhes:EqualizeActorsSchedule()
|
_detalhes:EqualizeActorsSchedule (_detalhes.host_of)
|
||||||
|
|
||||||
|
_detalhes:IniciarColetaDeLixo (true)
|
||||||
else
|
else
|
||||||
if (_detalhes.debug) then
|
if (_detalhes.debug) then
|
||||||
_detalhes:EqualizeActorsSchedule()
|
_detalhes:EqualizeActorsSchedule (_detalhes.host_of)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -301,7 +304,7 @@
|
|||||||
local tempo_do_combate = _detalhes.tabela_vigente.end_time - _detalhes.tabela_vigente.start_time
|
local tempo_do_combate = _detalhes.tabela_vigente.end_time - _detalhes.tabela_vigente.start_time
|
||||||
|
|
||||||
--if ( tempo_do_combate >= _detalhes.minimum_combat_time) then --> tempo minimo precisa ser 5 segundos pra acrecentar a tabela ao historico
|
--if ( tempo_do_combate >= _detalhes.minimum_combat_time) then --> tempo minimo precisa ser 5 segundos pra acrecentar a tabela ao historico
|
||||||
if ( tempo_do_combate >= 10) then --> tempo minimo precisa ser 5 segundos pra acrecentar a tabela ao historico
|
if ( tempo_do_combate >= 5) then --> tempo minimo precisa ser 5 segundos pra acrecentar a tabela ao historico
|
||||||
_detalhes.tabela_historico:adicionar (_detalhes.tabela_vigente) --move a tabela atual para dentro do histórico
|
_detalhes.tabela_historico:adicionar (_detalhes.tabela_vigente) --move a tabela atual para dentro do histórico
|
||||||
else
|
else
|
||||||
--> this is a little bit complicated, need a specific function for combat cancellation
|
--> this is a little bit complicated, need a specific function for combat cancellation
|
||||||
@@ -367,14 +370,47 @@
|
|||||||
|
|
||||||
function _detalhes:MakeEqualizeOnActor (player, realm, receivedActor)
|
function _detalhes:MakeEqualizeOnActor (player, realm, receivedActor)
|
||||||
|
|
||||||
|
local combat = _detalhes:GetCombat ("current")
|
||||||
local damage, heal, energy, misc = _detalhes:GetAllActors ("current", player)
|
local damage, heal, energy, misc = _detalhes:GetAllActors ("current", player)
|
||||||
|
|
||||||
if (not damage and not heal) then
|
if (not damage and not heal and not energy and not misc) then
|
||||||
--> add server name
|
|
||||||
|
--> try adding server name
|
||||||
damage, heal, energy, misc = _detalhes:GetAllActors ("current", player.."-"..realm)
|
damage, heal, energy, misc = _detalhes:GetAllActors ("current", player.."-"..realm)
|
||||||
|
|
||||||
|
if (not damage and not heal and not energy and not misc) then
|
||||||
|
--> not found any actor object, so we need to create
|
||||||
|
|
||||||
|
local actorName
|
||||||
|
|
||||||
|
if (realm ~= GetRealmName()) then
|
||||||
|
actorName = player.."-"..realm
|
||||||
|
else
|
||||||
|
actorName = player
|
||||||
|
end
|
||||||
|
|
||||||
|
local guid = _detalhes:FindGUIDFromName (player)
|
||||||
|
|
||||||
|
-- 0x512 normal party
|
||||||
|
-- 0x514 normal raid
|
||||||
|
|
||||||
|
if (guid) then
|
||||||
|
damage = combat [1]:PegarCombatente (guid, actorName, 0x514, true)
|
||||||
|
heal = combat [2]:PegarCombatente (guid, actorName, 0x514, true)
|
||||||
|
energy = combat [3]:PegarCombatente (guid, actorName, 0x514, true)
|
||||||
|
misc = combat [4]:PegarCombatente (guid, actorName, 0x514, true)
|
||||||
|
|
||||||
|
if (_detalhes.debug) then
|
||||||
|
_detalhes:Msg ("(debug) equalize received actor:", actorName, damage, heal)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if (_detalhes.debug) then
|
||||||
|
_detalhes:Msg ("(debug) equalize couldn't get guid for player ",player)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local combat = _detalhes:GetCombat ("current")
|
|
||||||
combat[1].need_refresh = true
|
combat[1].need_refresh = true
|
||||||
combat[2].need_refresh = true
|
combat[2].need_refresh = true
|
||||||
combat[3].need_refresh = true
|
combat[3].need_refresh = true
|
||||||
@@ -429,7 +465,7 @@
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function _detalhes:EqualizeActorsSchedule()
|
function _detalhes:EqualizeActorsSchedule (host_of)
|
||||||
--> check for pets without owner
|
--> check for pets without owner
|
||||||
for _, actor in _ipairs (_detalhes.tabela_vigente[1]._ActorTable) do
|
for _, actor in _ipairs (_detalhes.tabela_vigente[1]._ActorTable) do
|
||||||
--> have flag and the flag tell us he is a pet
|
--> have flag and the flag tell us he is a pet
|
||||||
@@ -440,12 +476,21 @@
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
_detalhes:ScheduleTimer ("EqualizeActors", 2)
|
--> do not equilize if there is any disabled capture
|
||||||
|
if (_detalhes:CaptureIsAllEnabled()) then
|
||||||
|
_detalhes:ScheduleTimer ("EqualizeActors", 2, host_of)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function _detalhes:EqualizeActors()
|
function _detalhes:EqualizeActors (host_of)
|
||||||
|
|
||||||
local damage, heal, energy, misc = _detalhes:GetAllActors ("current", UnitName ("player"))
|
local damage, heal, energy, misc
|
||||||
|
|
||||||
|
if (host_of) then
|
||||||
|
damage, heal, energy, misc = _detalhes:GetAllActors ("current", host_of)
|
||||||
|
else
|
||||||
|
damage, heal, energy, misc = _detalhes:GetAllActors ("current", UnitName ("player"))
|
||||||
|
end
|
||||||
|
|
||||||
if (damage) then
|
if (damage) then
|
||||||
damage = {damage.total, damage.damage_taken, damage.friendlyfire_total}
|
damage = {damage.total, damage.damage_taken, damage.friendlyfire_total}
|
||||||
@@ -472,8 +517,13 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local data = {damage, heal, energy, misc}
|
local data = {damage, heal, energy, misc}
|
||||||
|
|
||||||
_detalhes:SendRaidData ("equalize_actors", data)
|
if (host_of) then
|
||||||
|
_detalhes:SendCustomRaidData ("equalize_actors", host_of, nil, data)
|
||||||
|
_detalhes:EqualizeActors()
|
||||||
|
else
|
||||||
|
_detalhes:SendRaidData ("equalize_actors", data)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -526,23 +576,51 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
--> tooltip fork
|
--> tooltip fork
|
||||||
function _detalhes:MontaTooltip (qual_barra)
|
local avatarPoint = {"bottomleft", "topleft", -3, -4}
|
||||||
|
local backgroundPoint = {{"bottomleft", "topleft", 0, -3}, {"bottomright", "topright", 0, -3}}
|
||||||
|
local textPoint = {"left", "right", -11, -5}
|
||||||
|
|
||||||
|
function _detalhes:MontaTooltip (frame, qual_barra)
|
||||||
|
|
||||||
|
GameCooltip:Reset()
|
||||||
|
GameCooltip:SetType ("tooltip")
|
||||||
|
GameCooltip:SetOption ("LeftBorderSize", -5)
|
||||||
|
GameCooltip:SetOption ("RightBorderSize", 5)
|
||||||
|
GameCooltip:SetOption ("StatusBarTexture", [[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]]) --[[Interface\Addons\Details\images\bar_flat]]
|
||||||
|
GameCooltip:SetOwner (frame)
|
||||||
|
|
||||||
local esta_barra = self.barras [qual_barra] --> barra que o mouse passou em cima e irá mostrar o tooltip
|
local esta_barra = self.barras [qual_barra] --> barra que o mouse passou em cima e irá mostrar o tooltip
|
||||||
local objeto = esta_barra.minha_tabela --> pega a referencia da tabela --> retorna a classe_damage ou classe_heal
|
local objeto = esta_barra.minha_tabela --> pega a referencia da tabela --> retorna a classe_damage ou classe_heal
|
||||||
if (not objeto) then --> a barra não possui um objeto
|
if (not objeto) then --> a barra não possui um objeto
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
_detalhes.popup:Close()
|
|
||||||
|
|
||||||
--verifica por tooltips especiais:
|
--verifica por tooltips especiais:
|
||||||
if (objeto.dead) then --> é uma barra de dead
|
if (objeto.dead) then --> é uma barra de dead
|
||||||
return _detalhes:ToolTipDead (self, objeto, esta_barra) --> instância, [morte], barra
|
return _detalhes:ToolTipDead (self, objeto, esta_barra) --> instância, [morte], barra
|
||||||
end
|
end
|
||||||
|
|
||||||
return objeto:ToolTip (self, qual_barra, esta_barra) --> instância, nº barra, objeto barra
|
local t = objeto:ToolTip (self, qual_barra, esta_barra) --> instância, nº barra, objeto barra
|
||||||
|
if (t) then
|
||||||
|
|
||||||
|
if (esta_barra.minha_tabela.serial and esta_barra.minha_tabela.serial ~= "") then
|
||||||
|
local avatar = NickTag:GetNicknameTable (esta_barra.minha_tabela.serial)
|
||||||
|
if (avatar) then
|
||||||
|
GameCooltip:SetBannerImage (1, avatar [2], 80, 40, avatarPoint, nil, nil) --> overlay [2] avatar path
|
||||||
|
--local l, r, t, b = unpack (avatar [5])
|
||||||
|
--local r, g, b = unpack (avatar [6])
|
||||||
|
GameCooltip:SetBannerImage (2, avatar [4], 200, 55, backgroundPoint, avatar [5], avatar [6]) --> background
|
||||||
|
GameCooltip:SetBannerText (1, avatar [1], textPoint) --> text [1] nickname
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return GameCooltip:ShowCooltip()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function _detalhes.gump:UpdateTooltip (qual_barra, esta_barra, instancia)
|
||||||
|
return instancia:MontaTooltip (esta_barra, qual_barra)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing)
|
function _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing)
|
||||||
_detalhes:EsconderBarrasNaoUsadas (instancia, showing)
|
_detalhes:EsconderBarrasNaoUsadas (instancia, showing)
|
||||||
@@ -576,8 +654,8 @@
|
|||||||
|
|
||||||
if (not tabela_do_combate[self.atributo].need_refresh and not forcar) then
|
if (not tabela_do_combate[self.atributo].need_refresh and not forcar) then
|
||||||
return --> não precisa de refresh
|
return --> não precisa de refresh
|
||||||
else
|
--else
|
||||||
tabela_do_combate[self.atributo].need_refresh = false
|
--tabela_do_combate[self.atributo].need_refresh = false
|
||||||
end
|
end
|
||||||
|
|
||||||
if (self.atributo == 1) then --> damage
|
if (self.atributo == 1) then --> damage
|
||||||
@@ -603,27 +681,27 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
if (instancia == -1) then
|
if (instancia == -1) then
|
||||||
|
|
||||||
local refresh_poll = {}
|
--> update
|
||||||
|
for index, esta_instancia in _ipairs (_detalhes.tabela_instancias) do
|
||||||
for _, esta_instancia in _ipairs (_detalhes.tabela_instancias) do
|
|
||||||
|
|
||||||
if (esta_instancia.ativa) then
|
if (esta_instancia.ativa) then
|
||||||
if (esta_instancia.modo == modo_GROUP or esta_instancia.modo == modo_ALL) then
|
if (esta_instancia.modo == modo_GROUP or esta_instancia.modo == modo_ALL) then
|
||||||
local atributo = esta_instancia:AtualizarALL (forcar)
|
esta_instancia:AtualizarALL (forcar)
|
||||||
|
end
|
||||||
if (atributo) then
|
end
|
||||||
refresh_poll [#refresh_poll+1] = atributo
|
end
|
||||||
|
|
||||||
|
--> marcar que não precisa ser atualizada
|
||||||
|
for index, esta_instancia in _ipairs (_detalhes.tabela_instancias) do
|
||||||
|
if (esta_instancia.ativa and esta_instancia.showing) then
|
||||||
|
if (esta_instancia.modo == modo_GROUP or esta_instancia.modo == modo_ALL) then
|
||||||
|
if (esta_instancia.atributo <= 4) then
|
||||||
|
esta_instancia.showing [esta_instancia.atributo].need_refresh = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, atributo in _ipairs (refresh_poll) do
|
|
||||||
atributo.need_refresh = false
|
|
||||||
end
|
|
||||||
|
|
||||||
if (not forcar) then --atualizar o gump de detalhes também se ele estiver aberto
|
if (not forcar) then --atualizar o gump de detalhes também se ele estiver aberto
|
||||||
if (info.ativo) then
|
if (info.ativo) then
|
||||||
return info.jogador:MontaInfo()
|
return info.jogador:MontaInfo()
|
||||||
|
|||||||
+19
-9
@@ -681,15 +681,25 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function _detalhes:IniciarColetaDeLixo()
|
function _detalhes:IniciarColetaDeLixo (forcar)
|
||||||
|
|
||||||
if (_detalhes.ultima_coleta + _detalhes.intervalo_coleta > _detalhes._tempo + 1) then
|
if (not forcar) then
|
||||||
return
|
if (_detalhes.ultima_coleta + _detalhes.intervalo_coleta > _detalhes._tempo + 1) then
|
||||||
elseif (_detalhes.in_combat or _InCombatLockdown() or _detalhes:IsInInstance()) then
|
return
|
||||||
_detalhes:ScheduleTimer ("IniciarColetaDeLixo", 5)
|
elseif (_detalhes.in_combat or _InCombatLockdown() or _detalhes:IsInInstance()) then
|
||||||
return
|
_detalhes:ScheduleTimer ("IniciarColetaDeLixo", 5)
|
||||||
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if (_detalhes.debug) then
|
||||||
|
if (forcar) then
|
||||||
|
_detalhes:Msg ("collecting garbage with forced state.")
|
||||||
|
else
|
||||||
|
_detalhes:Msg ("collecting garbage.")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
_detalhes:ClearParserCache()
|
_detalhes:ClearParserCache()
|
||||||
|
|
||||||
local limpados = atributo_damage:ColetarLixo() + atributo_heal:ColetarLixo() + atributo_energy:ColetarLixo() + atributo_misc:ColetarLixo()
|
local limpados = atributo_damage:ColetarLixo() + atributo_heal:ColetarLixo() + atributo_energy:ColetarLixo() + atributo_misc:ColetarLixo()
|
||||||
@@ -797,7 +807,7 @@
|
|||||||
local conteudo = _overall_combat [tipo]._ActorTable
|
local conteudo = _overall_combat [tipo]._ActorTable
|
||||||
_iter = {index = 1, data = conteudo[1], cleaned = 0} --> ._ActorTable[1] para pegar o primeiro index
|
_iter = {index = 1, data = conteudo[1], cleaned = 0} --> ._ActorTable[1] para pegar o primeiro index
|
||||||
|
|
||||||
collectgarbage()
|
--collectgarbage()
|
||||||
|
|
||||||
while (_iter.data) do
|
while (_iter.data) do
|
||||||
|
|
||||||
@@ -817,9 +827,9 @@
|
|||||||
_table_wipe (meus_links)
|
_table_wipe (meus_links)
|
||||||
end
|
end
|
||||||
|
|
||||||
if (tipo == 1 and #new_weak_table > 0) then
|
--if (tipo == 1 and #new_weak_table > 0) then
|
||||||
-- print (can_garbage, _actor.nome)
|
-- print (can_garbage, _actor.nome)
|
||||||
end
|
--end
|
||||||
|
|
||||||
|
|
||||||
if (can_garbage or not meus_links) then --> não há referências a este objeto
|
if (can_garbage or not meus_links) then --> não há referências a este objeto
|
||||||
|
|||||||
+30
-18
@@ -39,7 +39,7 @@
|
|||||||
local type, player, realm, dversion, arg6, arg7 = select (2, _detalhes:Deserialize (data))
|
local type, player, realm, dversion, arg6, arg7 = select (2, _detalhes:Deserialize (data))
|
||||||
|
|
||||||
if (_detalhes.debug) then
|
if (_detalhes.debug) then
|
||||||
print ("comm received", type)
|
_detalhes:Msg ("(debug) network received command", type)
|
||||||
end
|
end
|
||||||
|
|
||||||
if (type == "highfive") then
|
if (type == "highfive") then
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
local ownerActor = _detalhes.tabela_vigente[1]:PegarCombatente (owner_table[2], owner_table[1], owner_table[3], true)
|
local ownerActor = _detalhes.tabela_vigente[1]:PegarCombatente (owner_table[2], owner_table[1], owner_table[3], true)
|
||||||
ownerActor.total = ownerActor.total + petActor.total
|
ownerActor.total = ownerActor.total + petActor.total
|
||||||
if (_detalhes.debug) then
|
if (_detalhes.debug) then
|
||||||
_detalhes:Msg ("Received owner for pet ",nome, "assigned to", owner_table[1])
|
_detalhes:Msg ("(debug) received owner for pet ",nome, "assigned to", owner_table[1])
|
||||||
end
|
end
|
||||||
|
|
||||||
local combat = _detalhes:GetCombat ("current")
|
local combat = _detalhes:GetCombat ("current")
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
player = player .."-"..realm
|
player = player .."-"..realm
|
||||||
end
|
end
|
||||||
if (_detalhes.debug) then
|
if (_detalhes.debug) then
|
||||||
_detalhes:Msg ("Received pet owner request of pet, sending owner")
|
_detalhes:Msg ("(debug) received pet owner request, sending owner")
|
||||||
end
|
end
|
||||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("petowner", petserial, petnome, owner_table), "WHISPER", player)
|
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("petowner", petserial, petnome, owner_table), "WHISPER", player)
|
||||||
end
|
end
|
||||||
@@ -109,12 +109,12 @@
|
|||||||
nname = nname.."-"..server
|
nname = nname.."-"..server
|
||||||
end
|
end
|
||||||
if (nname == name) then
|
if (nname == name) then
|
||||||
actor = container:PegarCombatente (UnitGUID ("raid"..i), name, 0x00000417, true)
|
actor = container:PegarCombatente (UnitGUID ("raid"..i), name, 0x514, true)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if (UnitName ("raid"..i) == name) then
|
if (UnitName ("raid"..i) == name) then
|
||||||
actor = container:PegarCombatente (UnitGUID ("raid"..i), name, 0x00000417, true)
|
actor = container:PegarCombatente (UnitGUID ("raid"..i), name, 0x514, true)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -128,12 +128,12 @@
|
|||||||
nname = nname.."-"..server
|
nname = nname.."-"..server
|
||||||
end
|
end
|
||||||
if (nname == name) then
|
if (nname == name) then
|
||||||
actor = container:PegarCombatente (UnitGUID ("party"..i), name, 0x00000417, true)
|
actor = container:PegarCombatente (UnitGUID ("party"..i), name, 0x514, true)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if (UnitName ("party"..i) == name or _detalhes.playername == name) then
|
if (UnitName ("party"..i) == name or _detalhes.playername == name) then
|
||||||
actor = container:PegarCombatente (UnitGUID ("party"..i), name, 0x00000417, true)
|
actor = container:PegarCombatente (UnitGUID ("party"..i), name, 0x514, true)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -146,7 +146,7 @@
|
|||||||
container.need_refresh = true
|
container.need_refresh = true
|
||||||
else
|
else
|
||||||
if (_detalhes.debug) then
|
if (_detalhes.debug) then
|
||||||
print ("Actor not found on cloud data received", name, atributo_name)
|
_detalhes:Msg ("(debug) actor not found on cloud data received", name, atributo_name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -177,17 +177,13 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
if (data) then
|
if (data) then
|
||||||
|
|
||||||
local export = temp
|
local export = temp
|
||||||
local container = _detalhes.tabela_vigente [atributo]._ActorTable
|
local container = _detalhes.tabela_vigente [atributo]._ActorTable
|
||||||
for i = 1, math.min (6, #container) do
|
for i = 1, math.min (6, #container) do
|
||||||
local actor = container [i]
|
local actor = container [i]
|
||||||
|
if (actor.grupo) then
|
||||||
if (not actor.grupo) then
|
export [#export+1] = {actor.nome, actor [atributo_name]}
|
||||||
break
|
|
||||||
end
|
end
|
||||||
|
|
||||||
export [#export+1] = {actor.nome, actor [atributo_name]}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("clouddatareceived", atributo, atributo_name, export), "WHISPER", _detalhes.host_of)
|
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("clouddatareceived", atributo, atributo_name, export), "WHISPER", _detalhes.host_of)
|
||||||
@@ -206,7 +202,7 @@
|
|||||||
_detalhes.host_by = player
|
_detalhes.host_by = player
|
||||||
|
|
||||||
if (_detalhes.debug) then
|
if (_detalhes.debug) then
|
||||||
print ("Details found a cloud for disabled captures.")
|
_detalhes:Msg ("(debug) cloud found for disabled captures.")
|
||||||
end
|
end
|
||||||
|
|
||||||
_detalhes.cloud_process = _detalhes:ScheduleRepeatingTimer ("RequestData", 7)
|
_detalhes.cloud_process = _detalhes:ScheduleRepeatingTimer ("RequestData", 7)
|
||||||
@@ -243,6 +239,22 @@
|
|||||||
|
|
||||||
_detalhes:RegisterComm ("details_comm", "RaidComm")
|
_detalhes:RegisterComm ("details_comm", "RaidComm")
|
||||||
|
|
||||||
|
function _detalhes:SendCustomRaidData (type, player, realm, ...)
|
||||||
|
if (not realm) then
|
||||||
|
--> check if realm is already inside player name
|
||||||
|
for _name, _realm in string.gmatch (player, "(%w+)-(%w+)") do
|
||||||
|
if (_realm) then
|
||||||
|
player = _name
|
||||||
|
realm = _realm
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if (not realm) then
|
||||||
|
--> doesn't have realm at all, so we assume the actor is in same realm as player
|
||||||
|
realm = GetRealmName()
|
||||||
|
end
|
||||||
|
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize (type, player, realm, _detalhes.realversion, ...), "RAID")
|
||||||
|
end
|
||||||
function _detalhes:SendRaidData (type, ...)
|
function _detalhes:SendRaidData (type, ...)
|
||||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize (type, UnitName ("player"), GetRealmName(), _detalhes.realversion, ...), "RAID")
|
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize (type, UnitName ("player"), GetRealmName(), _detalhes.realversion, ...), "RAID")
|
||||||
end
|
end
|
||||||
@@ -256,7 +268,7 @@
|
|||||||
|
|
||||||
function _detalhes:SendPetOwnerRequest (petserial, petnome)
|
function _detalhes:SendPetOwnerRequest (petserial, petnome)
|
||||||
if (_detalhes.debug) then
|
if (_detalhes.debug) then
|
||||||
_detalhes:Msg ("Sent request for a pet",petserial, petnome)
|
_detalhes:Msg ("(debug) sent request for a pet",petserial, petnome)
|
||||||
end
|
end
|
||||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("needpetowner", UnitName ("player"), GetRealmName(), _detalhes.realversion, petserial, petnome), "RAID")
|
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("needpetowner", UnitName ("player"), GetRealmName(), _detalhes.realversion, petserial, petnome), "RAID")
|
||||||
end
|
end
|
||||||
@@ -271,7 +283,7 @@
|
|||||||
end
|
end
|
||||||
_detalhes.host_of = player
|
_detalhes.host_of = player
|
||||||
if (_detalhes.debug) then
|
if (_detalhes.debug) then
|
||||||
_detalhes:Msg ("Sent request for a cloud parser")
|
_detalhes:Msg ("(debug) sent 'okey' answer for a cloud parser request.")
|
||||||
end
|
end
|
||||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("foundcloud", UnitName ("player"), GetRealmName(), _detalhes.realversion), "WHISPER", player)
|
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("foundcloud", UnitName ("player"), GetRealmName(), _detalhes.realversion), "WHISPER", player)
|
||||||
end
|
end
|
||||||
@@ -282,7 +294,7 @@
|
|||||||
|
|
||||||
for index = 1, #_detalhes.tabela_instancias do
|
for index = 1, #_detalhes.tabela_instancias do
|
||||||
local instancia = _detalhes.tabela_instancias [index]
|
local instancia = _detalhes.tabela_instancias [index]
|
||||||
if (instancia.ativa) then
|
if (instancia.ativa and _detalhes.host_by) then
|
||||||
local atributo = instancia.atributo
|
local atributo = instancia.atributo
|
||||||
if (atributo == 1 and not _detalhes:CaptureGet ("damage")) then
|
if (atributo == 1 and not _detalhes:CaptureGet ("damage")) then
|
||||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("clouddatarequest", atributo, instancia.sub_atributo), "WHISPER", _detalhes.host_by)
|
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("clouddatarequest", atributo, instancia.sub_atributo), "WHISPER", _detalhes.host_by)
|
||||||
|
|||||||
+7
-2
@@ -113,7 +113,7 @@
|
|||||||
|
|
||||||
------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------
|
||||||
--> early checks and fixes
|
--> early checks and fixes
|
||||||
|
|
||||||
if (who_serial == "0x0000000000000000") then
|
if (who_serial == "0x0000000000000000") then
|
||||||
if (who_flags and _bit_band (who_flags, OBJECT_TYPE_PETS) ~= 0) then --> é um pet
|
if (who_flags and _bit_band (who_flags, OBJECT_TYPE_PETS) ~= 0) then --> é um pet
|
||||||
--> pets must have an serial
|
--> pets must have an serial
|
||||||
@@ -1934,21 +1934,26 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
elseif (evento == "GROUP_ROSTER_UPDATE") then
|
elseif (evento == "GROUP_ROSTER_UPDATE") then
|
||||||
_detalhes.container_pets:BuscarPets()
|
|
||||||
if (not _detalhes.in_group) then
|
if (not _detalhes.in_group) then
|
||||||
_detalhes.in_group = IsInGroup() or IsInRaid()
|
_detalhes.in_group = IsInGroup() or IsInRaid()
|
||||||
if (_detalhes.in_group) then
|
if (_detalhes.in_group) then
|
||||||
|
--> entrou num grupo
|
||||||
|
_detalhes:IniciarColetaDeLixo (true)
|
||||||
_detalhes:SendHighFive()
|
_detalhes:SendHighFive()
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
_detalhes.in_group = IsInGroup() or IsInRaid()
|
_detalhes.in_group = IsInGroup() or IsInRaid()
|
||||||
if (not _detalhes.in_group) then
|
if (not _detalhes.in_group) then
|
||||||
|
_detalhes:IniciarColetaDeLixo (true)
|
||||||
table.wipe (_detalhes.details_users)
|
table.wipe (_detalhes.details_users)
|
||||||
else
|
else
|
||||||
_detalhes:CheckDetailsUsers()
|
_detalhes:CheckDetailsUsers()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
_detalhes.container_pets:BuscarPets()
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
elseif (evento == "PARTY_MEMBERS_CHANGED") then
|
elseif (evento == "PARTY_MEMBERS_CHANGED") then
|
||||||
|
|||||||
+23
-8
@@ -113,7 +113,7 @@
|
|||||||
|
|
||||||
--> scale
|
--> scale
|
||||||
function _detalhes:Scale (rangeMin, rangeMax, scaleMin, scaleMax, x)
|
function _detalhes:Scale (rangeMin, rangeMax, scaleMin, scaleMax, x)
|
||||||
return 1 + (x-rangeMin)*(scaleMax-scaleMin)/(rangeMax-rangeMin)
|
return 1 + (x - rangeMin) * (scaleMax - scaleMin) / (rangeMax - rangeMin)
|
||||||
end
|
end
|
||||||
|
|
||||||
--> font size
|
--> font size
|
||||||
@@ -189,19 +189,34 @@
|
|||||||
LastDps = 0
|
LastDps = 0
|
||||||
_detalhes:SairDoCombate()
|
_detalhes:SairDoCombate()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function _detalhes:FindGUIDFromName (name)
|
||||||
|
if (_IsInRaid()) then
|
||||||
|
for i = 1, _GetNumGroupMembers(), 1 do
|
||||||
|
local this_name, _ = UnitName ("raid"..i)
|
||||||
|
if (this_name == name) then
|
||||||
|
return UnitGUID ("raid"..i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif (_IsInGroup()) then
|
||||||
|
for i = 1, _GetNumGroupMembers()-1, 1 do
|
||||||
|
local this_name, _ = UnitName ("party"..i)
|
||||||
|
if (this_name == name) then
|
||||||
|
return UnitGUID ("party"..i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if (UnitName ("player") == name) then
|
||||||
|
return UnitGUID ("player")
|
||||||
|
end
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
--> Armazena uma label recém criada - Store a new label on the pool
|
--> Armazena uma label recém criada - Store a new label on the pool
|
||||||
function _detalhes.font_pool:add (_fontstring)
|
function _detalhes.font_pool:add (_fontstring)
|
||||||
self [#self+1] = _fontstring
|
self [#self+1] = _fontstring
|
||||||
end
|
end
|
||||||
|
|
||||||
function gump:UpdateTooltip (qual_barra, esta_barra, instancia)
|
|
||||||
_GameTooltip:Hide()
|
|
||||||
_GameTooltip:SetOwner (esta_barra, "ANCHOR_TOPRIGHT")
|
|
||||||
instancia:MontaTooltip (qual_barra)
|
|
||||||
_GameTooltip:Show()
|
|
||||||
end
|
|
||||||
|
|
||||||
local function frame_task (self, elapsed)
|
local function frame_task (self, elapsed)
|
||||||
|
|
||||||
self.FrameTime = self.FrameTime + elapsed
|
self.FrameTime = self.FrameTime + elapsed
|
||||||
|
|||||||
+222
-62
@@ -45,7 +45,7 @@ function DetailsCreateCoolTip()
|
|||||||
CoolTip.LeftIconTableSub = {}
|
CoolTip.LeftIconTableSub = {}
|
||||||
CoolTip.RightIconTable = {}
|
CoolTip.RightIconTable = {}
|
||||||
CoolTip.RightIconTableSub = {}
|
CoolTip.RightIconTableSub = {}
|
||||||
CoolTip.TopIcon = nil
|
CoolTip.Banner = {false, false, false}
|
||||||
CoolTip.TopIconTableSub = {}
|
CoolTip.TopIconTableSub = {}
|
||||||
CoolTip.StatusBarTable = {}
|
CoolTip.StatusBarTable = {}
|
||||||
CoolTip.StatusBarTableSub = {}
|
CoolTip.StatusBarTableSub = {}
|
||||||
@@ -87,7 +87,9 @@ function DetailsCreateCoolTip()
|
|||||||
["Anchor"] = true,
|
["Anchor"] = true,
|
||||||
["RelativeAnchor"] = true,
|
["RelativeAnchor"] = true,
|
||||||
["NoLastSelectedBar"] = true,
|
["NoLastSelectedBar"] = true,
|
||||||
["SubMenuIsTooltip"] = true
|
["SubMenuIsTooltip"] = true,
|
||||||
|
["LeftBorderSize"] = true,
|
||||||
|
["RightBorderSize"] = true
|
||||||
|
|
||||||
}
|
}
|
||||||
CoolTip.OptionsTable = {
|
CoolTip.OptionsTable = {
|
||||||
@@ -116,7 +118,9 @@ function DetailsCreateCoolTip()
|
|||||||
["Anchor"] = nil,
|
["Anchor"] = nil,
|
||||||
["RelativeAnchor"] = nil,
|
["RelativeAnchor"] = nil,
|
||||||
["NoLastSelectedBar"] = nil,
|
["NoLastSelectedBar"] = nil,
|
||||||
["SubMenuIsTooltip"] = nil
|
["SubMenuIsTooltip"] = nil,
|
||||||
|
["LeftBorderSize"] = nil,
|
||||||
|
["RightBorderSize"] = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
--cprops
|
--cprops
|
||||||
@@ -126,6 +130,7 @@ function DetailsCreateCoolTip()
|
|||||||
CoolTip.SubIndexes = 0 --> amount of lines current on shown on sub menu
|
CoolTip.SubIndexes = 0 --> amount of lines current on shown on sub menu
|
||||||
CoolTip.Type = 1 --> 1 tooltip 2 tooltip with bars 3 menu 4 menu + submenus
|
CoolTip.Type = 1 --> 1 tooltip 2 tooltip with bars 3 menu 4 menu + submenus
|
||||||
CoolTip.Host = nil --> frame to anchor
|
CoolTip.Host = nil --> frame to anchor
|
||||||
|
CoolTip.LastSize = 0 --> last size
|
||||||
|
|
||||||
--defaults
|
--defaults
|
||||||
CoolTip.default_height = 20
|
CoolTip.default_height = 20
|
||||||
@@ -523,18 +528,32 @@ function DetailsCreateCoolTip()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function CoolTip:TextAndIcon (frame, menuButton, leftTextTable, rightTextTable, leftIconTable, rightIconTable, isSub)
|
function CoolTip:TextAndIcon (index, frame, menuButton, leftTextTable, rightTextTable, leftIconTable, rightIconTable, isSub)
|
||||||
|
|
||||||
--> reset width
|
--> reset width
|
||||||
menuButton.leftText:SetWidth (0)
|
menuButton.leftText:SetWidth (0)
|
||||||
menuButton.leftText:SetHeight (0)
|
menuButton.leftText:SetHeight (0)
|
||||||
menuButton.rightText:SetWidth (0)
|
menuButton.rightText:SetWidth (0)
|
||||||
menuButton.rightText:SetHeight (0)
|
menuButton.rightText:SetHeight (0)
|
||||||
|
|
||||||
--> set text
|
--> set text
|
||||||
if (leftTextTable) then
|
if (leftTextTable) then
|
||||||
menuButton.leftText:SetText (leftTextTable [1])
|
menuButton.leftText:SetText (leftTextTable [1])
|
||||||
menuButton.leftText:SetTextColor (leftTextTable [2], leftTextTable [3], leftTextTable [4], leftTextTable [5])
|
menuButton.leftText:SetTextColor (leftTextTable [2], leftTextTable [3], leftTextTable [4], leftTextTable [5])
|
||||||
|
|
||||||
|
if (CoolTip.OptionsTable.TextSize and not leftTextTable [6]) then
|
||||||
|
_detalhes:SetFontSize (menuButton.leftText, CoolTip.OptionsTable.TextSize)
|
||||||
|
end
|
||||||
|
|
||||||
|
if (CoolTip.OptionsTable.TextFont and not leftTextTable [7]) then
|
||||||
|
menuButton.leftText:SetFontObject (CoolTip.OptionsTable.TextFont)
|
||||||
|
end
|
||||||
|
|
||||||
|
local face, size, flags = menuButton.leftText:GetFont()
|
||||||
|
size = leftTextTable [6] or 10
|
||||||
|
face = leftTextTable [7] or [[Fonts\FRIZQT__.TTF]]
|
||||||
|
flags = leftTextTable [8]
|
||||||
|
menuButton.leftText:SetFont (face, size, flags)
|
||||||
else
|
else
|
||||||
menuButton.leftText:SetText ("")
|
menuButton.leftText:SetText ("")
|
||||||
end
|
end
|
||||||
@@ -542,17 +561,23 @@ function DetailsCreateCoolTip()
|
|||||||
if (rightTextTable) then
|
if (rightTextTable) then
|
||||||
menuButton.rightText:SetText (rightTextTable [1])
|
menuButton.rightText:SetText (rightTextTable [1])
|
||||||
menuButton.rightText:SetTextColor (rightTextTable [2], rightTextTable [3], rightTextTable [4], rightTextTable [5])
|
menuButton.rightText:SetTextColor (rightTextTable [2], rightTextTable [3], rightTextTable [4], rightTextTable [5])
|
||||||
|
|
||||||
|
if (CoolTip.OptionsTable.TextSize and not rightTextTable [6]) then
|
||||||
|
_detalhes:SetFontSize (menuButton.rightText, CoolTip.OptionsTable.TextSize)
|
||||||
|
end
|
||||||
|
|
||||||
|
if (CoolTip.OptionsTable.TextFont and not rightTextTable [7]) then
|
||||||
|
menuButton.rightText:SetFontObject (CoolTip.OptionsTable.TextFont)
|
||||||
|
end
|
||||||
|
|
||||||
|
local face, size, flags = menuButton.rightText:GetFont()
|
||||||
|
size = rightTextTable [6] or 10
|
||||||
|
face = rightTextTable [7] or [[Fonts\FRIZQT__.TTF]]
|
||||||
|
flags = rightTextTable [8]
|
||||||
|
menuButton.rightText:SetFont (face, size, flags)
|
||||||
else
|
else
|
||||||
menuButton.rightText:SetText ("")
|
menuButton.rightText:SetText ("")
|
||||||
end
|
end
|
||||||
|
|
||||||
--> overwrite text size
|
|
||||||
_detalhes:SetFontSize (menuButton.leftText, CoolTip.OptionsTable.TextSize or self.default_text_size)
|
|
||||||
_detalhes:SetFontSize (menuButton.rightText, CoolTip.OptionsTable.TextSize or self.default_text_size)
|
|
||||||
|
|
||||||
--> overwrite text font object
|
|
||||||
menuButton.leftText:SetFontObject (CoolTip.OptionsTable.TextFont or self.default_text_font)
|
|
||||||
menuButton.rightText:SetFontObject (CoolTip.OptionsTable.TextFont or self.default_text_font)
|
|
||||||
|
|
||||||
--> left icon
|
--> left icon
|
||||||
if (leftIconTable and leftIconTable [1]) then
|
if (leftIconTable and leftIconTable [1]) then
|
||||||
@@ -560,17 +585,13 @@ function DetailsCreateCoolTip()
|
|||||||
menuButton.leftIcon:SetWidth (leftIconTable [2])
|
menuButton.leftIcon:SetWidth (leftIconTable [2])
|
||||||
menuButton.leftIcon:SetHeight (leftIconTable [3])
|
menuButton.leftIcon:SetHeight (leftIconTable [3])
|
||||||
menuButton.leftIcon:SetTexCoord (leftIconTable [4], leftIconTable [5], leftIconTable [6], leftIconTable [7])
|
menuButton.leftIcon:SetTexCoord (leftIconTable [4], leftIconTable [5], leftIconTable [6], leftIconTable [7])
|
||||||
--[[
|
menuButton.leftIcon:SetVertexColor (unpack (leftIconTable [8]))
|
||||||
if (CoolTip.OptionsTable.IconHeightMod) then
|
--menuButton.leftText:SetPoint ("left", menuButton.leftIcon, "right", 3, 0)
|
||||||
menuButton.leftIcon:SetPoint ("left", menuButton.leftIcon:GetParent(), "left", 0, CoolTip.OptionsTable.IconHeightMod)
|
|
||||||
else
|
|
||||||
menuButton.leftIcon:SetPoint ("left", menuButton.leftIcon:GetParent(), "left", 0, 0)
|
|
||||||
end
|
|
||||||
--]]
|
|
||||||
else
|
else
|
||||||
menuButton.leftIcon:SetTexture (nil)
|
menuButton.leftIcon:SetTexture (nil)
|
||||||
menuButton.leftIcon:SetWidth (3)
|
menuButton.leftIcon:SetWidth (3)
|
||||||
menuButton.leftIcon:SetHeight (3)
|
menuButton.leftIcon:SetHeight (3)
|
||||||
|
--menuButton.leftText:SetPoint ("left", menuButton.leftIcon, "left", -5, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
--> right icon
|
--> right icon
|
||||||
@@ -579,10 +600,13 @@ function DetailsCreateCoolTip()
|
|||||||
menuButton.rightIcon:SetWidth (rightIconTable [2])
|
menuButton.rightIcon:SetWidth (rightIconTable [2])
|
||||||
menuButton.rightIcon:SetHeight (rightIconTable [3])
|
menuButton.rightIcon:SetHeight (rightIconTable [3])
|
||||||
menuButton.rightIcon:SetTexCoord (rightIconTable [4], rightIconTable [5], rightIconTable [6], rightIconTable [7])
|
menuButton.rightIcon:SetTexCoord (rightIconTable [4], rightIconTable [5], rightIconTable [6], rightIconTable [7])
|
||||||
|
menuButton.rightIcon:SetVertexColor (unpack (rightIconTable [8]))
|
||||||
|
--menuButton.rightText:SetPoint ("right", menuButton.rightIcon, "left", -3, 0)
|
||||||
else
|
else
|
||||||
menuButton.rightIcon:SetTexture (nil)
|
menuButton.rightIcon:SetTexture (nil)
|
||||||
menuButton.rightIcon:SetWidth (3)
|
menuButton.rightIcon:SetWidth (1)
|
||||||
menuButton.rightIcon:SetHeight (3)
|
menuButton.rightIcon:SetHeight (1)
|
||||||
|
--menuButton.rightText:SetPoint ("right", menuButton.rightIcon, "right", 5, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
--> overwrite icon size
|
--> overwrite icon size
|
||||||
@@ -601,13 +625,13 @@ function DetailsCreateCoolTip()
|
|||||||
if (not isSub) then --> main frame
|
if (not isSub) then --> main frame
|
||||||
if (not CoolTip.OptionsTable.FixedWidth) then
|
if (not CoolTip.OptionsTable.FixedWidth) then
|
||||||
if (CoolTip.Type == 1 or CoolTip.Type == 2) then
|
if (CoolTip.Type == 1 or CoolTip.Type == 2) then
|
||||||
local stringWidth = menuButton.leftText:GetStringWidth() + menuButton.rightText:GetStringWidth() + menuButton.leftIcon:GetWidth() + menuButton.rightIcon:GetWidth()
|
local stringWidth = menuButton.leftText:GetStringWidth() + menuButton.rightText:GetStringWidth() + menuButton.leftIcon:GetWidth() + menuButton.rightIcon:GetWidth() + 10
|
||||||
if (stringWidth > frame.w) then
|
if (stringWidth > frame.w) then
|
||||||
frame.w = stringWidth
|
frame.w = stringWidth
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
menuButton.leftText:SetWidth (CoolTip.OptionsTable.FixedWidth - menuButton.leftIcon:GetWidth() - 20)
|
menuButton.leftText:SetWidth (CoolTip.OptionsTable.FixedWidth - menuButton.leftIcon:GetWidth() - menuButton.rightText:GetStringWidth() - menuButton.rightIcon:GetWidth() - 30)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if (not CoolTip.OptionsTable.FixedWidthSub) then
|
if (not CoolTip.OptionsTable.FixedWidthSub) then
|
||||||
@@ -655,13 +679,25 @@ function DetailsCreateCoolTip()
|
|||||||
menuButton.statusbar:SetValue (0)
|
menuButton.statusbar:SetValue (0)
|
||||||
menuButton.spark:Hide()
|
menuButton.spark:Hide()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if (CoolTip.OptionsTable.LeftBorderSize) then
|
||||||
|
menuButton.statusbar:SetPoint ("left", menuButton, "left", 10 + CoolTip.OptionsTable.LeftBorderSize, 0)
|
||||||
|
else
|
||||||
|
menuButton.statusbar:SetPoint ("left", menuButton, "left", 10, 0)
|
||||||
|
end
|
||||||
|
|
||||||
|
if (CoolTip.OptionsTable.RightBorderSize) then
|
||||||
|
menuButton.statusbar:SetPoint ("right", menuButton, "right", CoolTip.OptionsTable.RightBorderSize + (- 10), 0)
|
||||||
|
else
|
||||||
|
menuButton.statusbar:SetPoint ("right", menuButton, "right", -10, 0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function CoolTip:SetupMainButton (menuButton, index)
|
function CoolTip:SetupMainButton (menuButton, index)
|
||||||
menuButton.index = index
|
menuButton.index = index
|
||||||
|
|
||||||
--> setup texts and icons
|
--> setup texts and icons
|
||||||
CoolTip:TextAndIcon (frame1, menuButton, CoolTip.LeftTextTable [index], CoolTip.RightTextTable [index], CoolTip.LeftIconTable [index], CoolTip.RightIconTable [index])
|
CoolTip:TextAndIcon (index, frame1, menuButton, CoolTip.LeftTextTable [index], CoolTip.RightTextTable [index], CoolTip.LeftIconTable [index], CoolTip.RightIconTable [index])
|
||||||
--> setup statusbar
|
--> setup statusbar
|
||||||
CoolTip:StatusBar (menuButton, CoolTip.StatusBarTable [index])
|
CoolTip:StatusBar (menuButton, CoolTip.StatusBarTable [index])
|
||||||
|
|
||||||
@@ -687,7 +723,7 @@ function DetailsCreateCoolTip()
|
|||||||
menuButton.mainIndex = mainMenuIndex
|
menuButton.mainIndex = mainMenuIndex
|
||||||
|
|
||||||
--> setup texts and icons
|
--> setup texts and icons
|
||||||
CoolTip:TextAndIcon (frame2, menuButton, CoolTip.LeftTextTableSub [mainMenuIndex] and CoolTip.LeftTextTableSub [mainMenuIndex] [index],
|
CoolTip:TextAndIcon (index, frame2, menuButton, CoolTip.LeftTextTableSub [mainMenuIndex] and CoolTip.LeftTextTableSub [mainMenuIndex] [index],
|
||||||
CoolTip.RightTextTableSub [mainMenuIndex] and CoolTip.RightTextTableSub [mainMenuIndex] [index],
|
CoolTip.RightTextTableSub [mainMenuIndex] and CoolTip.RightTextTableSub [mainMenuIndex] [index],
|
||||||
CoolTip.LeftIconTableSub [mainMenuIndex] and CoolTip.LeftIconTableSub [mainMenuIndex] [index],
|
CoolTip.LeftIconTableSub [mainMenuIndex] and CoolTip.LeftIconTableSub [mainMenuIndex] [index],
|
||||||
CoolTip.RightIconTableSub [mainMenuIndex] and CoolTip.RightIconTableSub [mainMenuIndex] [index], true)
|
CoolTip.RightIconTableSub [mainMenuIndex] and CoolTip.RightIconTableSub [mainMenuIndex] [index], true)
|
||||||
@@ -869,7 +905,7 @@ function DetailsCreateCoolTip()
|
|||||||
button:RegisterForClicks()
|
button:RegisterForClicks()
|
||||||
|
|
||||||
--> setup texts and icons
|
--> setup texts and icons
|
||||||
CoolTip:TextAndIcon (frame1, button, CoolTip.LeftTextTable [i], CoolTip.RightTextTable [i], CoolTip.LeftIconTable [i], CoolTip.RightIconTable [i])
|
CoolTip:TextAndIcon (i, frame1, button, CoolTip.LeftTextTable [i], CoolTip.RightTextTable [i], CoolTip.LeftIconTable [i], CoolTip.RightIconTable [i])
|
||||||
--> setup statusbar
|
--> setup statusbar
|
||||||
CoolTip:StatusBar (button, CoolTip.StatusBarTable [i])
|
CoolTip:StatusBar (button, CoolTip.StatusBarTable [i])
|
||||||
end
|
end
|
||||||
@@ -903,12 +939,18 @@ function DetailsCreateCoolTip()
|
|||||||
menuButton:EnableMouse (false)
|
menuButton:EnableMouse (false)
|
||||||
end
|
end
|
||||||
|
|
||||||
--> set frame sizes
|
|
||||||
if (not CoolTip.OptionsTable.FixedWidth) then
|
if (not CoolTip.OptionsTable.FixedWidth) then
|
||||||
if (CoolTip.Type == 2) then
|
if (CoolTip.Type == 2) then --> with bars
|
||||||
frame1:SetWidth (frame1.w + 34)
|
frame1:SetWidth (frame1.w + 34)
|
||||||
else
|
else
|
||||||
frame1:SetWidth (frame1.w + 24)
|
--> width stability check
|
||||||
|
local width = frame1.w + 24
|
||||||
|
if (width > CoolTip.LastSize-5 and width < CoolTip.LastSize+5) then
|
||||||
|
width = CoolTip.LastSize
|
||||||
|
else
|
||||||
|
CoolTip.LastSize = width
|
||||||
|
end
|
||||||
|
frame1:SetWidth (width)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1303,10 +1345,17 @@ function DetailsCreateCoolTip()
|
|||||||
_table_wipe (CoolTip.LeftIconTableSub)
|
_table_wipe (CoolTip.LeftIconTableSub)
|
||||||
_table_wipe (CoolTip.RightIconTable)
|
_table_wipe (CoolTip.RightIconTable)
|
||||||
_table_wipe (CoolTip.RightIconTableSub)
|
_table_wipe (CoolTip.RightIconTableSub)
|
||||||
|
|
||||||
CoolTip.TopIcon = nil
|
|
||||||
_table_wipe (CoolTip.TopIconTableSub)
|
_table_wipe (CoolTip.TopIconTableSub)
|
||||||
|
CoolTip.Banner [1] = false
|
||||||
|
CoolTip.Banner [2] = false
|
||||||
|
CoolTip.Banner [3] = false
|
||||||
|
|
||||||
frame1.upperImage:Hide()
|
frame1.upperImage:Hide()
|
||||||
|
frame1.upperImage2:Hide()
|
||||||
|
frame1.upperImageText:Hide()
|
||||||
|
frame1.upperImageText2:Hide()
|
||||||
|
|
||||||
frame2.upperImage:Hide()
|
frame2.upperImage:Hide()
|
||||||
|
|
||||||
_table_wipe (CoolTip.StatusBarTable)
|
_table_wipe (CoolTip.StatusBarTable)
|
||||||
@@ -1332,6 +1381,8 @@ function DetailsCreateCoolTip()
|
|||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
--> Menu functions
|
--> Menu functions
|
||||||
|
|
||||||
|
local _default_color = {1, 1, 1}
|
||||||
|
local _default_point = {"center", "center", 0, -3}
|
||||||
|
|
||||||
function CoolTip:AddMenu (menuType, func, param1, param2, param3, leftText, leftIcon, indexUp)
|
function CoolTip:AddMenu (menuType, func, param1, param2, param3, leftText, leftIcon, indexUp)
|
||||||
|
|
||||||
@@ -1396,6 +1447,7 @@ function DetailsCreateCoolTip()
|
|||||||
iconTable [5] = 1 --> default 1
|
iconTable [5] = 1 --> default 1
|
||||||
iconTable [6] = 0 --> default 0
|
iconTable [6] = 0 --> default 0
|
||||||
iconTable [7] = 1 --> default 1
|
iconTable [7] = 1 --> default 1
|
||||||
|
iconTable [8] = _default_color
|
||||||
end
|
end
|
||||||
|
|
||||||
if (leftText) then
|
if (leftText) then
|
||||||
@@ -1411,7 +1463,9 @@ function DetailsCreateCoolTip()
|
|||||||
lineTable_left [3] = 1
|
lineTable_left [3] = 1
|
||||||
lineTable_left [4] = 1
|
lineTable_left [4] = 1
|
||||||
lineTable_left [5] = 1
|
lineTable_left [5] = 1
|
||||||
lineTable_left [6] = true
|
lineTable_left [6] = false
|
||||||
|
lineTable_left [7] = false
|
||||||
|
lineTable_left [8] = false
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1480,6 +1534,7 @@ function DetailsCreateCoolTip()
|
|||||||
subMenuTablesIcons [5] = 1 --> default 1
|
subMenuTablesIcons [5] = 1 --> default 1
|
||||||
subMenuTablesIcons [6] = 0 --> default 0
|
subMenuTablesIcons [6] = 0 --> default 0
|
||||||
subMenuTablesIcons [7] = 1 --> default 1
|
subMenuTablesIcons [7] = 1 --> default 1
|
||||||
|
subMenuTablesIcons [8] = _default_color
|
||||||
end
|
end
|
||||||
|
|
||||||
if (leftText) then
|
if (leftText) then
|
||||||
@@ -1500,7 +1555,9 @@ function DetailsCreateCoolTip()
|
|||||||
subMenuTablesTexts [3] = 1
|
subMenuTablesTexts [3] = 1
|
||||||
subMenuTablesTexts [4] = 1
|
subMenuTablesTexts [4] = 1
|
||||||
subMenuTablesTexts [5] = 1
|
subMenuTablesTexts [5] = 1
|
||||||
subMenuTablesTexts [6] = true
|
subMenuTablesTexts [6] = false
|
||||||
|
subMenuTablesTexts [7] = false
|
||||||
|
subMenuTablesTexts [8] = false
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1591,13 +1648,94 @@ function DetailsCreateCoolTip()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function CoolTip:SetBannerText (index, text, anchor, color, fontsize, fontface, fontflag)
|
||||||
|
local fontstring
|
||||||
|
|
||||||
|
if (index == 1) then
|
||||||
|
fontstring = frame1.upperImageText
|
||||||
|
elseif (index == 2) then
|
||||||
|
fontstring = frame1.upperImageText2
|
||||||
|
end
|
||||||
|
|
||||||
|
fontstring:SetText (text or "")
|
||||||
|
|
||||||
|
if (anchor and index == 1) then
|
||||||
|
local myAnchor, hisAnchor, x, y = unpack (anchor)
|
||||||
|
fontstring:SetPoint (myAnchor, frame1.upperImage, hisAnchor or myAnchor, x or 0, y or 0)
|
||||||
|
elseif (anchor and index == 2) then
|
||||||
|
local myAnchor, hisAnchor, x, y = unpack (anchor)
|
||||||
|
fontstring:SetPoint (myAnchor, frame1, hisAnchor or myAnchor, x or 0, y or 0)
|
||||||
|
end
|
||||||
|
|
||||||
|
if (color) then
|
||||||
|
fontstring:SetTextColor (unpack (color))
|
||||||
|
end
|
||||||
|
|
||||||
|
local face, size, flags = fontstring:GetFont()
|
||||||
|
face = fontface or [[Fonts\FRIZQT__.TTF]]
|
||||||
|
size = fontsize or 13
|
||||||
|
flags = fontflag or nil
|
||||||
|
fontstring:SetFont (face, size, flags)
|
||||||
|
fontstring:Show()
|
||||||
|
end
|
||||||
|
|
||||||
|
function CoolTip:SetBannerImage (index, texturepath, width, height, anchor, texcoord, overlay)
|
||||||
|
|
||||||
|
local texture
|
||||||
|
|
||||||
|
if (index == 1) then
|
||||||
|
texture = frame1.upperImage
|
||||||
|
elseif (index == 2) then
|
||||||
|
texture = frame1.upperImage2
|
||||||
|
end
|
||||||
|
|
||||||
|
if (texturepath) then
|
||||||
|
texture:SetTexture (texturepath)
|
||||||
|
end
|
||||||
|
|
||||||
|
if (width) then
|
||||||
|
texture:SetWidth (width)
|
||||||
|
end
|
||||||
|
if (height) then
|
||||||
|
texture:SetHeight (height)
|
||||||
|
end
|
||||||
|
|
||||||
|
if (anchor) then
|
||||||
|
if (type (anchor[1]) == "table") then
|
||||||
|
for _, t in _ipairs (anchor) do
|
||||||
|
local myAnchor, hisAnchor, x, y = unpack (t)
|
||||||
|
texture:SetPoint (myAnchor, frame1, hisAnchor or myAnchor, x or 0, y or 0)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
local myAnchor, hisAnchor, x, y = unpack (anchor)
|
||||||
|
texture:SetPoint (myAnchor, frame1, hisAnchor or myAnchor, x or 0, y or 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if (texcoord) then
|
||||||
|
local L, R, T, B = unpack (texcoord)
|
||||||
|
texture:SetTexCoord (L, R, T, B)
|
||||||
|
end
|
||||||
|
|
||||||
|
if (overlay) then
|
||||||
|
texture:SetVertexColor (unpack (overlay))
|
||||||
|
end
|
||||||
|
|
||||||
|
CoolTip.Banner [index] = true
|
||||||
|
texture:Show()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
--> adds a icon to the last line added.
|
--> adds a icon to the last line added.
|
||||||
--> only works with cooltip type 1 and 2 (tooltip and tooltip with bars)
|
--> only works with cooltip type 1 and 2 (tooltip and tooltip with bars)
|
||||||
--> parameters: icon [, width [, height [, TexCoords L R T B ]]]
|
--> parameters: icon [, width [, height [, TexCoords L R T B ]]]
|
||||||
--> texture support string path or texture object
|
--> texture support string path or texture object
|
||||||
|
|
||||||
function CoolTip:AddIcon (iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B)
|
function CoolTip:AddTexture (iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B, overlayColor, point)
|
||||||
|
return CoolTip:AddIcon (iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B, overlayColor, point)
|
||||||
|
end
|
||||||
|
function CoolTip:AddIcon (iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B, overlayColor, point)
|
||||||
|
|
||||||
--> need a previous line
|
--> need a previous line
|
||||||
if (CoolTip.Indexes == 0) then
|
if (CoolTip.Indexes == 0) then
|
||||||
@@ -1618,11 +1756,10 @@ function DetailsCreateCoolTip()
|
|||||||
|
|
||||||
if (not side or (type (side) == "string" and side == "left") or (type (side) == "number" and side == 1)) then
|
if (not side or (type (side) == "string" and side == "left") or (type (side) == "number" and side == 1)) then
|
||||||
frameTable = CoolTip.LeftIconTable
|
frameTable = CoolTip.LeftIconTable
|
||||||
|
|
||||||
elseif ((type (side) == "string" and side == "right") or (type (side) == "number" and side == 2)) then
|
elseif ((type (side) == "string" and side == "right") or (type (side) == "number" and side == 2)) then
|
||||||
frameTable = CoolTip.RightIconTable
|
frameTable = CoolTip.RightIconTable
|
||||||
elseif ((type (side) == "string" and side == "top") or (type (side) == "number" and side == 3)) then
|
|
||||||
CoolTip.TopIcon = iconTexture
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if (CoolTip.isSpecial) then
|
if (CoolTip.isSpecial) then
|
||||||
@@ -1652,6 +1789,7 @@ function DetailsCreateCoolTip()
|
|||||||
CoolTip.TopIconTableSub [CoolTip.Indexes] [5] = R or 1
|
CoolTip.TopIconTableSub [CoolTip.Indexes] [5] = R or 1
|
||||||
CoolTip.TopIconTableSub [CoolTip.Indexes] [6] = T or 0
|
CoolTip.TopIconTableSub [CoolTip.Indexes] [6] = T or 0
|
||||||
CoolTip.TopIconTableSub [CoolTip.Indexes] [7] = B or 1
|
CoolTip.TopIconTableSub [CoolTip.Indexes] [7] = B or 1
|
||||||
|
CoolTip.TopIconTableSub [CoolTip.Indexes] [8] = overlayColor or _default_color
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1683,6 +1821,7 @@ function DetailsCreateCoolTip()
|
|||||||
iconTable [5] = R or 1 --> default 1
|
iconTable [5] = R or 1 --> default 1
|
||||||
iconTable [6] = T or 0 --> default 0
|
iconTable [6] = T or 0 --> default 0
|
||||||
iconTable [7] = B or 1 --> default 1
|
iconTable [7] = B or 1 --> default 1
|
||||||
|
iconTable [8] = overlayColor or _default_color --> default 1, 1, 1
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -1692,8 +1831,13 @@ function DetailsCreateCoolTip()
|
|||||||
--> only works with cooltip type 1 and 2 (tooltip and tooltip with bars)
|
--> only works with cooltip type 1 and 2 (tooltip and tooltip with bars)
|
||||||
--> parameters: left text, right text [, L color R, L color G, L color B, L color A [, R color R, R color G, R color B, R color A [, wrap]]]
|
--> parameters: left text, right text [, L color R, L color G, L color B, L color A [, R color R, R color G, R color B, R color A [, wrap]]]
|
||||||
|
|
||||||
|
--> alias
|
||||||
|
function CoolTip:AddDoubleLine (leftText, rightText, frame, ColorR1, ColorG1, ColorB1, ColorA1, ColorR2, ColorG2, ColorB2, ColorA2, fontSize, fontFace, fontFlag)
|
||||||
|
return CoolTip:AddLine (leftText, rightText, frame, ColorR1, ColorG1, ColorB1, ColorA1, ColorR2, ColorG2, ColorB2, ColorA2, fontSize, fontFace, fontFlag)
|
||||||
|
end
|
||||||
|
|
||||||
--> adds a line for tooltips
|
--> adds a line for tooltips
|
||||||
function CoolTip:AddLine (leftText, rightText, frame, ColorR, ColorG, ColorB, ColorA, ColorR1, ColorG2, ColorB3, ColorA4, wrapLine)
|
function CoolTip:AddLine (leftText, rightText, frame, ColorR1, ColorG1, ColorB1, ColorA1, ColorR2, ColorG2, ColorB2, ColorA2, fontSize, fontFace, fontFlag)
|
||||||
|
|
||||||
--> check data integrity
|
--> check data integrity
|
||||||
if (type (leftText) ~= "string") then
|
if (type (leftText) ~= "string") then
|
||||||
@@ -1703,20 +1847,24 @@ function DetailsCreateCoolTip()
|
|||||||
rightText = ""
|
rightText = ""
|
||||||
end
|
end
|
||||||
|
|
||||||
if (type (ColorR) == "table" or type (ColorR) == "string") then
|
if (type (ColorR1) ~= "number") then
|
||||||
ColorR1, ColorG2, ColorB3, ColorA4, wrapLine, ColorR, ColorG, ColorB, ColorA = ColorG, ColorB, ColorA, ColorR1, ColorG2, gump:ParseColors (ColorR)
|
ColorR2, ColorG2, ColorB2, ColorA2, fontSize, fontFace, fontFlag = ColorG1, ColorB1, ColorA1, ColorR2, ColorG2, ColorB2, ColorA2
|
||||||
if (type (ColorR1) == "table" or type (ColorR1) == "string") then
|
|
||||||
wrapLine = ColorG2
|
if (type (ColorR1) == "boolean" or not ColorR1) then
|
||||||
ColorR1, ColorG2, ColorB3, ColorA4 = gump:ParseColors (ColorR1)
|
ColorR1, ColorG1, ColorB1, ColorA1 = 1, 1, 1, 1
|
||||||
|
else
|
||||||
|
ColorR1, ColorG1, ColorB1, ColorA1 = gump:ParseColors (ColorR1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if (type (ColorR2) ~= "number") then
|
||||||
|
fontSize, fontFace, fontFlag = ColorG2, ColorB2, ColorA2
|
||||||
|
|
||||||
|
if (type (ColorR2) == "boolean" or not ColorR2) then
|
||||||
|
ColorR2, ColorG2, ColorB2, ColorA2 = 1, 1, 1, 1
|
||||||
|
else
|
||||||
|
ColorR2, ColorG2, ColorB2, ColorA2 = gump:ParseColors (ColorR2)
|
||||||
end
|
end
|
||||||
elseif (type (ColorR) == "boolean") then
|
|
||||||
wrapLine = ColorR
|
|
||||||
ColorR, ColorG, ColorB, ColorA = 1, 1, 1, 1
|
|
||||||
ColorR1, ColorG2, ColorB3, ColorA4 = 1, 1, 1, 1
|
|
||||||
else
|
|
||||||
ColorR, ColorG, ColorB, ColorA = 1, 1, 1, 1
|
|
||||||
ColorR1, ColorG2, ColorB3, ColorA4 = 1, 1, 1, 1
|
|
||||||
wrapLine = true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local frameTableLeft
|
local frameTableLeft
|
||||||
@@ -1808,18 +1956,22 @@ function DetailsCreateCoolTip()
|
|||||||
end
|
end
|
||||||
|
|
||||||
lineTable_left [1] = leftText --> line text
|
lineTable_left [1] = leftText --> line text
|
||||||
lineTable_left [2] = ColorR
|
lineTable_left [2] = ColorR1
|
||||||
lineTable_left [3] = ColorG
|
lineTable_left [3] = ColorG1
|
||||||
lineTable_left [4] = ColorB
|
lineTable_left [4] = ColorB1
|
||||||
lineTable_left [5] = ColorA
|
lineTable_left [5] = ColorA1
|
||||||
lineTable_left [6] = wrapLine
|
lineTable_left [6] = fontSize
|
||||||
|
lineTable_left [7] = fontFace
|
||||||
|
lineTable_left [8] = fontFlag
|
||||||
|
|
||||||
lineTable_right [1] = rightText --> line text
|
lineTable_right [1] = rightText --> line text
|
||||||
lineTable_right [2] = ColorR1
|
lineTable_right [2] = ColorR2
|
||||||
lineTable_right [3] = ColorG2
|
lineTable_right [3] = ColorG2
|
||||||
lineTable_right [4] = ColorB3
|
lineTable_right [4] = ColorB2
|
||||||
lineTable_right [5] = ColorA4
|
lineTable_right [5] = ColorA2
|
||||||
lineTable_right [6] = wrapLine
|
lineTable_right [6] = fontSize
|
||||||
|
lineTable_right [7] = fontFace
|
||||||
|
lineTable_right [8] = fontFlag
|
||||||
end
|
end
|
||||||
|
|
||||||
function CoolTip:AddSpecial (widgetType, index, subIndex, ...)
|
function CoolTip:AddSpecial (widgetType, index, subIndex, ...)
|
||||||
@@ -1906,7 +2058,7 @@ function DetailsCreateCoolTip()
|
|||||||
elseif (menu.icon) then
|
elseif (menu.icon) then
|
||||||
CoolTip:AddIcon (menu.icon, menu.type or 1, menu.side or 1, menu.width, menu.height, menu.l, menu.r, menu.t, menu.b)
|
CoolTip:AddIcon (menu.icon, menu.type or 1, menu.side or 1, menu.width, menu.height, menu.l, menu.r, menu.t, menu.b)
|
||||||
elseif (menu.textleft or menu.textright or menu.text) then
|
elseif (menu.textleft or menu.textright or menu.text) then
|
||||||
CoolTip:AddLine (menu.text, "", menu.type, menu.color, menu.color, true)
|
CoolTip:AddLine (menu.text, "", menu.type, menu.color, menu.color)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1915,6 +2067,10 @@ function DetailsCreateCoolTip()
|
|||||||
--> show cooltip
|
--> show cooltip
|
||||||
|
|
||||||
--> serach key: ~start
|
--> serach key: ~start
|
||||||
|
function CoolTip:Show (frame, menuType, color)
|
||||||
|
return CoolTip:ShowCooltip (frame, menuType, color)
|
||||||
|
end
|
||||||
|
|
||||||
function CoolTip:ShowCooltip (frame, menuType, color)
|
function CoolTip:ShowCooltip (frame, menuType, color)
|
||||||
|
|
||||||
if (frame) then
|
if (frame) then
|
||||||
@@ -1943,6 +2099,10 @@ function DetailsCreateCoolTip()
|
|||||||
|
|
||||||
local emptyOptions = {}
|
local emptyOptions = {}
|
||||||
|
|
||||||
|
function CoolTip:Hide()
|
||||||
|
return CoolTip:Close()
|
||||||
|
end
|
||||||
|
|
||||||
function CoolTip:Close()
|
function CoolTip:Close()
|
||||||
CoolTip.active = false
|
CoolTip.active = false
|
||||||
gump:Fade (frame1, 1)
|
gump:Fade (frame1, 1)
|
||||||
|
|||||||
+24
-6
@@ -15,7 +15,7 @@
|
|||||||
<AbsValue val="16"/>
|
<AbsValue val="16"/>
|
||||||
</TileSize>
|
</TileSize>
|
||||||
<BackgroundInsets>
|
<BackgroundInsets>
|
||||||
<AbsInset left="5" right="5" top="5" bottom="5"/>
|
<AbsInset left="3" right="3" top="4" bottom="4"/>
|
||||||
</BackgroundInsets>
|
</BackgroundInsets>
|
||||||
</Backdrop>
|
</Backdrop>
|
||||||
|
|
||||||
@@ -50,16 +50,34 @@
|
|||||||
<Anchor point="RIGHT" relativeTo="$parent" relativePoint="RIGHT" x="-3" y="0"/>
|
<Anchor point="RIGHT" relativeTo="$parent" relativePoint="RIGHT" x="-3" y="0"/>
|
||||||
</Anchors>
|
</Anchors>
|
||||||
</Texture>
|
</Texture>
|
||||||
|
<Texture name="$parent_UpperImage2" hidden="true" parentKey="upperImage2" file = "">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="CENTER" relativeTo="$parent" relativePoint="CENTER" x="0" y="-3"/>
|
||||||
|
<Anchor point="BOTTOM" relativeTo="$parent" relativePoint="TOP" x="0" y="-3"/>
|
||||||
|
</Anchors>
|
||||||
|
</Texture>
|
||||||
</Layer>
|
</Layer>
|
||||||
|
|
||||||
<Layer level="OVERLAY">
|
<Layer level="OVERLAY">
|
||||||
<!-- upper image -->
|
<!-- upper image2 -->
|
||||||
<Texture name="$parent_UpperImage" hidden="true" parentKey="upperImage" file = "">
|
<Texture name="$parent_UpperImage" hidden="true" parentKey="upperImage" file = "">
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="CENTER" relativeTo="$parent" relativePoint="CENTER" x="0" y="-3"/>
|
<Anchor point="CENTER" relativeTo="$parent" relativePoint="CENTER" x="0" y="-3"/>
|
||||||
<Anchor point="BOTTOM" relativeTo="$parent" relativePoint="TOP" x="0" y="-3"/>
|
<Anchor point="BOTTOM" relativeTo="$parent" relativePoint="TOP" x="0" y="-3"/>
|
||||||
</Anchors>
|
</Anchors>
|
||||||
</Texture>
|
</Texture>
|
||||||
|
<FontString name="$parent_UpperImageText" parentKey="upperImageText" inherits="GameTooltipHeaderText" justifyH="LEFT" nonspacewrap="true">
|
||||||
|
<FontHeight val="13"/>
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="LEFT" relativeTo="$parent_UpperImage" relativePoint="RIGHT" x="5" y="0"/>
|
||||||
|
</Anchors>
|
||||||
|
</FontString>
|
||||||
|
<FontString name="$parent_UpperImageText2" parentKey="upperImageText2" inherits="GameTooltipHeaderText" justifyH="LEFT" nonspacewrap="true">
|
||||||
|
<FontHeight val="13"/>
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="BOTTOMRIGHT" relativeTo="$parent" relativePoint="TOPRIGHT" x="0" y="3"/>
|
||||||
|
</Anchors>
|
||||||
|
</FontString>
|
||||||
<!-- title icon -->
|
<!-- title icon -->
|
||||||
<Texture name="$parent_TitleIcon" hidden="true" parentKey="titleIcon" file = "Interface\Challenges\challenges-main">
|
<Texture name="$parent_TitleIcon" hidden="true" parentKey="titleIcon" file = "Interface\Challenges\challenges-main">
|
||||||
<Anchors>
|
<Anchors>
|
||||||
@@ -143,8 +161,8 @@
|
|||||||
</Texture>
|
</Texture>
|
||||||
|
|
||||||
<!-- left text -->
|
<!-- left text -->
|
||||||
<FontString name="$parent_LeftText" parentKey="leftText" inherits="GameFontHighlight" justifyH="LEFT" nonspacewrap="false">
|
<FontString name="$parent_LeftText" parentKey="leftText" inherits="GameTooltipHeaderText" justifyH="LEFT" nonspacewrap="false">
|
||||||
<FontHeight val="10.5"/>
|
<FontHeight val="10"/>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="CENTER" relativeTo="$parent_LeftIcon" relativePoint="CENTER" x="0" y="0"/>
|
<Anchor point="CENTER" relativeTo="$parent_LeftIcon" relativePoint="CENTER" x="0" y="0"/>
|
||||||
<Anchor point="LEFT" relativeTo="$parent_LeftIcon" relativePoint="RIGHT" x="3" y="0"/>
|
<Anchor point="LEFT" relativeTo="$parent_LeftIcon" relativePoint="RIGHT" x="3" y="0"/>
|
||||||
@@ -152,8 +170,8 @@
|
|||||||
</FontString>
|
</FontString>
|
||||||
|
|
||||||
<!-- right text -->
|
<!-- right text -->
|
||||||
<FontString name="$parent_TextRight" parentKey="rightText" inherits="GameFontHighlight" justifyH="RIGHT" nonspacewrap="false">
|
<FontString name="$parent_TextRight" parentKey="rightText" inherits="GameTooltipHeaderText" justifyH="RIGHT" nonspacewrap="false">
|
||||||
<FontHeight val="10.5"/>
|
<FontHeight val="10"/>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="CENTER" relativeTo="$parent_RightIcon" relativePoint="CENTER" x="0" y="0"/>
|
<Anchor point="CENTER" relativeTo="$parent_RightIcon" relativePoint="CENTER" x="0" y="0"/>
|
||||||
<Anchor point="RIGHT" relativeTo="$parent_RightIcon" relativePoint="LEFT" x="-3" y="0"/>
|
<Anchor point="RIGHT" relativeTo="$parent_RightIcon" relativePoint="LEFT" x="-3" y="0"/>
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ function _detalhes:SaveDataOnLogout()
|
|||||||
-- max segments
|
-- max segments
|
||||||
_detalhes_database.segments_amount = _detalhes.segments_amount
|
_detalhes_database.segments_amount = _detalhes.segments_amount
|
||||||
_detalhes_database.segments_amount_to_save = _detalhes.segments_amount_to_save
|
_detalhes_database.segments_amount_to_save = _detalhes.segments_amount_to_save
|
||||||
|
_detalhes_database.instances_amount = _detalhes.instances_amount
|
||||||
_detalhes_database.clear_ungrouped = _detalhes.clear_ungrouped
|
_detalhes_database.clear_ungrouped = _detalhes.clear_ungrouped
|
||||||
_detalhes_database.clear_graphic = _detalhes.clear_graphic
|
_detalhes_database.clear_graphic = _detalhes.clear_graphic
|
||||||
-- row animation
|
-- row animation
|
||||||
@@ -184,6 +185,7 @@ end --]]
|
|||||||
_detalhes.window_clamp = _detalhes_database.window_clamp
|
_detalhes.window_clamp = _detalhes_database.window_clamp
|
||||||
-- max segments
|
-- max segments
|
||||||
_detalhes.segments_amount = _detalhes_database.segments_amount
|
_detalhes.segments_amount = _detalhes_database.segments_amount
|
||||||
|
_detalhes.instances_amount = _detalhes_database.instances_amount
|
||||||
_detalhes.clear_ungrouped = _detalhes_database.clear_ungrouped
|
_detalhes.clear_ungrouped = _detalhes_database.clear_ungrouped
|
||||||
_detalhes.clear_graphic = _detalhes_database.clear_graphic
|
_detalhes.clear_graphic = _detalhes_database.clear_graphic
|
||||||
--> text sizes
|
--> text sizes
|
||||||
|
|||||||
+43
-7
@@ -65,6 +65,35 @@ function SlashCmdList.DETAILS (msg, editbox)
|
|||||||
_G.DetailsCopy.MyObject.text:HighlightText()
|
_G.DetailsCopy.MyObject.text:HighlightText()
|
||||||
_G.DetailsCopy.MyObject.text:SetFocus()
|
_G.DetailsCopy.MyObject.text:SetFocus()
|
||||||
|
|
||||||
|
elseif (msg == "raid") then
|
||||||
|
|
||||||
|
local player, realm = "Marleyieu", "Azralon"
|
||||||
|
|
||||||
|
local actorName
|
||||||
|
if (realm ~= GetRealmName()) then
|
||||||
|
actorName = player.."-"..realm
|
||||||
|
else
|
||||||
|
actorName = player
|
||||||
|
end
|
||||||
|
|
||||||
|
print (actorName)
|
||||||
|
|
||||||
|
local guid = _detalhes:FindGUIDFromName ("Marleyieu")
|
||||||
|
print (guid)
|
||||||
|
|
||||||
|
for i = 1, GetNumGroupMembers()-1, 1 do
|
||||||
|
local name, realm = UnitName ("party"..i)
|
||||||
|
print (name, " -- ", realm)
|
||||||
|
end
|
||||||
|
|
||||||
|
elseif (msg == "captures") then
|
||||||
|
for k, v in pairs (_detalhes.capture_real) do
|
||||||
|
print ("real -",k,":",v)
|
||||||
|
end
|
||||||
|
for k, v in pairs (_detalhes.capture_current) do
|
||||||
|
print ("current -",k,":",v)
|
||||||
|
end
|
||||||
|
|
||||||
elseif (msg == "slider") then
|
elseif (msg == "slider") then
|
||||||
|
|
||||||
local f = CreateFrame ("frame", "TESTEDESCROLL", UIParent)
|
local f = CreateFrame ("frame", "TESTEDESCROLL", UIParent)
|
||||||
@@ -129,15 +158,10 @@ function SlashCmdList.DETAILS (msg, editbox)
|
|||||||
--nname = nname.."-"..server
|
--nname = nname.."-"..server
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
elseif (msg == "teste") then
|
elseif (msg == "teste") then
|
||||||
|
|
||||||
local teste = nil
|
print (time())
|
||||||
local tabela = {um = 1, dois = 2}
|
|
||||||
|
|
||||||
local a = tabela [teste]
|
|
||||||
print (a)
|
|
||||||
|
|
||||||
elseif (msg == "yesno") then
|
elseif (msg == "yesno") then
|
||||||
--_detalhes:Show()
|
--_detalhes:Show()
|
||||||
@@ -172,6 +196,18 @@ function SlashCmdList.DETAILS (msg, editbox)
|
|||||||
print ("Instances opened: " .. _detalhes.opened_windows)
|
print ("Instances opened: " .. _detalhes.opened_windows)
|
||||||
|
|
||||||
--> debug, get a guid of something
|
--> debug, get a guid of something
|
||||||
|
elseif (command == "myguid") then --> localize-me
|
||||||
|
|
||||||
|
local g = UnitGUID ("player")
|
||||||
|
print (type (g))
|
||||||
|
print (g)
|
||||||
|
print (string.len (g))
|
||||||
|
local serial = g:sub (12, 18)
|
||||||
|
serial = tonumber ("0x"..serial)
|
||||||
|
print (serial)
|
||||||
|
|
||||||
|
--tonumber((UnitGUID("target")):sub(-12, -9), 16))
|
||||||
|
|
||||||
elseif (command == "guid") then --> localize-me
|
elseif (command == "guid") then --> localize-me
|
||||||
|
|
||||||
local pass_guid = rest:match("^(%S*)%s*(.-)$")
|
local pass_guid = rest:match("^(%S*)%s*(.-)$")
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ function _detalhes:OpenOptionsWindow (instance)
|
|||||||
|
|
||||||
-- Most of details widgets have the same 6 first parameters: parent, container, global name, parent key, width, height
|
-- Most of details widgets have the same 6 first parameters: parent, container, global name, parent key, width, height
|
||||||
|
|
||||||
window = g:NewPanel (UIParent, _, "DetailsOptionsWindow", _, 500, 320)
|
window = g:NewPanel (UIParent, _, "DetailsOptionsWindow", _, 700, 340)
|
||||||
window.instance = instance
|
window.instance = instance
|
||||||
tinsert (UISpecialFrames, "DetailsOptionsWindow")
|
tinsert (UISpecialFrames, "DetailsOptionsWindow")
|
||||||
window:SetPoint ("center", UIParent, "Center")
|
window:SetPoint ("center", UIParent, "Center")
|
||||||
@@ -256,6 +256,16 @@ function _detalhes:OpenOptionsWindow (instance)
|
|||||||
_detalhes.cloud_capture = value
|
_detalhes.cloud_capture = value
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--------------- Max Instances
|
||||||
|
g:NewLabel (window, _, "$parentLabelMaxInstances", "maxInstancesLabel", "max instances")
|
||||||
|
window.maxInstancesLabel:SetPoint (10, -288)
|
||||||
|
--
|
||||||
|
g:NewSlider (window, _, "$parentSliderMaxInstances", "maxInstancesSlider", 150, 20, 12, 30, 1, _detalhes.instances_amount) -- min, max, step, defaultv
|
||||||
|
window.maxInstancesSlider:SetPoint ("left", window.maxInstancesLabel, "right")
|
||||||
|
window.maxInstancesSlider:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue
|
||||||
|
_detalhes.instances_amount = amount
|
||||||
|
end)
|
||||||
|
window.maxInstancesSlider.tooltip = "Amount of windows which can be created."
|
||||||
|
|
||||||
-- Current Instalnce --------------------------------------------------------------------------------------------------------------------------------------------
|
-- Current Instalnce --------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -749,10 +759,41 @@ function _detalhes:OpenOptionsWindow (instance)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
g:NewButton (window, _, "$parentToAllStyleButton", "applyToAll", 130, 14, applyToAll, nil, nil, nil, "apply to all instances")
|
g:NewButton (window, _, "$parentToAllStyleButton", "applyToAll", 140, 14, applyToAll, nil, nil, nil, "apply to all instances")
|
||||||
window.applyToAll:InstallCustomTexture()
|
window.applyToAll:InstallCustomTexture()
|
||||||
window.applyToAll:SetPoint ("bottomright", window.removeStyle, "topright", 1, 3)
|
window.applyToAll:SetPoint ("bottomright", window.removeStyle, "topright", 1, 3)
|
||||||
|
|
||||||
|
|
||||||
|
-- Persona --------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
local onPressEnter = function (_, _, text)
|
||||||
|
local accepted, errortext = _detalhes:SetNickname (text)
|
||||||
|
if (not accepted) then
|
||||||
|
_detalhes:Msg (errortext)
|
||||||
|
end
|
||||||
|
--> we call again here, because if not accepted the box return the previous value and if successful accepted, update the value for formated string.
|
||||||
|
window.nicknameEntry.text = _detalhes:GetNickname (UnitGUID ("player"), UnitName ("player"), true)
|
||||||
|
end
|
||||||
|
|
||||||
|
g:NewTextEntry (window, _, "$parentNicknameEntry", "nicknameEntry", nil, 20, onPressEnter, _, _, 198) --width will be auto adjusted if space parameter is passed
|
||||||
|
window.nicknameEntry:SetLabelText ("nickname")
|
||||||
|
window.nicknameEntry:SetPoint (510, -35)
|
||||||
|
|
||||||
|
local avatarcallback = function (textureAvatar, textureAvatarTexCoord, textureBackground, textureBackgroundTexCoord, textureBackgroundColor)
|
||||||
|
_detalhes:SetNicknameBackground (textureBackground, textureBackgroundTexCoord, textureBackgroundColor, true)
|
||||||
|
_detalhes:SetNicknameAvatar (textureAvatar, textureAvatarTexCoord)
|
||||||
|
_G.AvatarPickFrame.callback = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local openAtavarPickFrame = function()
|
||||||
|
_G.AvatarPickFrame.callback = avatarcallback
|
||||||
|
_G.AvatarPickFrame:Show()
|
||||||
|
end
|
||||||
|
|
||||||
|
g:NewButton (window, _, "$parentAvatarFrame", "chooseAvatarButton", 120, 14, openAtavarPickFrame, nil, nil, nil, "Choose Avatar")
|
||||||
|
window.chooseAvatarButton:InstallCustomTexture()
|
||||||
|
window.chooseAvatarButton:SetPoint (510, -55)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -790,6 +831,8 @@ function _detalhes:OpenOptionsWindow (instance)
|
|||||||
--
|
--
|
||||||
GameCooltip:SetFixedParameter (_G.DetailsOptionsWindowLoadStyleButton, instance)
|
GameCooltip:SetFixedParameter (_G.DetailsOptionsWindowLoadStyleButton, instance)
|
||||||
|
|
||||||
|
_G.DetailsOptionsWindowNicknameEntry.MyObject.text = _detalhes:GetNickname (UnitGUID ("player"), UnitName ("player"), true) --> serial, default, silent
|
||||||
|
|
||||||
_G.DetailsOptionsWindow.MyObject.instance = instance
|
_G.DetailsOptionsWindow.MyObject.instance = instance
|
||||||
window:Show()
|
window:Show()
|
||||||
|
|
||||||
|
|||||||
@@ -1089,12 +1089,15 @@ local function barra_scripts (esta_barra, instancia, i)
|
|||||||
resize_fade (instancia, "out")
|
resize_fade (instancia, "out")
|
||||||
gump:Fade (instancia.baseframe.button_stretch, "alpha", 0.3)
|
gump:Fade (instancia.baseframe.button_stretch, "alpha", 0.3)
|
||||||
|
|
||||||
|
instancia:MontaTooltip (self, i)
|
||||||
|
|
||||||
|
--[[
|
||||||
_GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT")
|
_GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT")
|
||||||
if (not instancia:MontaTooltip (i)) then
|
if (not instancia:MontaTooltip (i)) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
_GameTooltip:Show()
|
_GameTooltip:Show()
|
||||||
|
--]]
|
||||||
--
|
--
|
||||||
self:SetBackdrop({
|
self:SetBackdrop({
|
||||||
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
|
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
|
||||||
@@ -1154,7 +1157,7 @@ local function barra_scripts (esta_barra, instancia, i)
|
|||||||
move_janela (parent, false, instancia) --> novo movedor da janela
|
move_janela (parent, false, instancia) --> novo movedor da janela
|
||||||
instancia:SaveMainWindowPosition()
|
instancia:SaveMainWindowPosition()
|
||||||
_GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT")
|
_GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT")
|
||||||
if (instancia:MontaTooltip (i)) then
|
if (instancia:MontaTooltip (self, i)) then
|
||||||
_GameTooltip:Show()
|
_GameTooltip:Show()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -15,6 +15,8 @@ if not Loc then return end
|
|||||||
Loc ["STRING_TOOOLD"] = "could not be installed because your Details! version is too old."
|
Loc ["STRING_TOOOLD"] = "could not be installed because your Details! version is too old."
|
||||||
Loc ["STRING_TOOOLD2"] = "your Details! version isn't the same."
|
Loc ["STRING_TOOOLD2"] = "your Details! version isn't the same."
|
||||||
|
|
||||||
|
Loc ["STRING_INSTANCE_LIMIT"] = "max instance number has been reached, you can modify this limit over options panel."
|
||||||
|
|
||||||
Loc ["STRING_PLEASE_WAIT"] = "Please wait"
|
Loc ["STRING_PLEASE_WAIT"] = "Please wait"
|
||||||
|
|
||||||
Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"] = "Right click to close."
|
Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"] = "Right click to close."
|
||||||
@@ -150,7 +152,9 @@ if not Loc then return end
|
|||||||
Loc ["STRING_NO_SPELL"] = "no spell has been used"
|
Loc ["STRING_NO_SPELL"] = "no spell has been used"
|
||||||
Loc ["STRING_TARGET"] = "Target"
|
Loc ["STRING_TARGET"] = "Target"
|
||||||
Loc ["STRING_TARGETS"] = "Targets"
|
Loc ["STRING_TARGETS"] = "Targets"
|
||||||
|
Loc ["STRING_FROM"] = "From"
|
||||||
Loc ["STRING_PET"] = "Pet"
|
Loc ["STRING_PET"] = "Pet"
|
||||||
|
Loc ["STRING_PETS"] = "Pets"
|
||||||
Loc ["STRING_DPS"] = "Dps"
|
Loc ["STRING_DPS"] = "Dps"
|
||||||
Loc ["STRING_SEE_BELOW"] = "see below"
|
Loc ["STRING_SEE_BELOW"] = "see below"
|
||||||
Loc ["STRING_GERAL"] = "Geral"
|
Loc ["STRING_GERAL"] = "Geral"
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ if not Loc then return end
|
|||||||
Loc ["STRING_TOOOLD"] = "nao pode ser instalado pois sua versao do Details! e muito antiga."
|
Loc ["STRING_TOOOLD"] = "nao pode ser instalado pois sua versao do Details! e muito antiga."
|
||||||
Loc ["STRING_TOOOLD2"] = "a sua versao do Details! nao e a mesma."
|
Loc ["STRING_TOOOLD2"] = "a sua versao do Details! nao e a mesma."
|
||||||
|
|
||||||
|
Loc ["STRING_INSTANCE_LIMIT"] = "o limite de instancias foi atingido, voce pode modificar este limite no painel de opcoes."
|
||||||
|
|
||||||
Loc ["STRING_PLEASE_WAIT"] = "Por favor espere"
|
Loc ["STRING_PLEASE_WAIT"] = "Por favor espere"
|
||||||
|
|
||||||
Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"] = "Botao direito para fechar."
|
Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"] = "Botao direito para fechar."
|
||||||
@@ -147,7 +149,9 @@ if not Loc then return end
|
|||||||
Loc ["STRING_NO_SPELL"] = "Nenhuma habilidade foi usada"
|
Loc ["STRING_NO_SPELL"] = "Nenhuma habilidade foi usada"
|
||||||
Loc ["STRING_TARGET"] = "Alvo"
|
Loc ["STRING_TARGET"] = "Alvo"
|
||||||
Loc ["STRING_TARGETS"] = "Alvos"
|
Loc ["STRING_TARGETS"] = "Alvos"
|
||||||
|
Loc ["STRING_FROM"] = "Fonte"
|
||||||
Loc ["STRING_PET"] = "Ajudante"
|
Loc ["STRING_PET"] = "Ajudante"
|
||||||
|
Loc ["STRING_PETS"] = "Ajudantes"
|
||||||
Loc ["STRING_DPS"] = "Dps"
|
Loc ["STRING_DPS"] = "Dps"
|
||||||
Loc ["STRING_SEE_BELOW"] = "veja abaixo"
|
Loc ["STRING_SEE_BELOW"] = "veja abaixo"
|
||||||
Loc ["STRING_GERAL"] = "Geral"
|
Loc ["STRING_GERAL"] = "Geral"
|
||||||
|
|||||||
+2
-1
@@ -28,6 +28,7 @@ function _G._detalhes:Start()
|
|||||||
--> combat
|
--> combat
|
||||||
self.in_combat = false
|
self.in_combat = false
|
||||||
self.combat_id = self.combat_id or 0
|
self.combat_id = self.combat_id or 0
|
||||||
|
self.instances_amount = self.instances_amount or 12
|
||||||
self.segments_amount = self.segments_amount or 8
|
self.segments_amount = self.segments_amount or 8
|
||||||
self.segments_amount_to_save = self.segments_amount_to_save or 2
|
self.segments_amount_to_save = self.segments_amount_to_save or 2
|
||||||
self.deadlog_limit = self.deadlog_limit or 12
|
self.deadlog_limit = self.deadlog_limit or 12
|
||||||
@@ -216,7 +217,7 @@ function _G._detalhes:Start()
|
|||||||
|
|
||||||
--> start garbage collector
|
--> start garbage collector
|
||||||
self.ultima_coleta = 0
|
self.ultima_coleta = 0
|
||||||
self.intervalo_coleta = 1800
|
self.intervalo_coleta = 720
|
||||||
self.garbagecollect = self:ScheduleRepeatingTimer ("IniciarColetaDeLixo", self.intervalo_coleta)
|
self.garbagecollect = self:ScheduleRepeatingTimer ("IniciarColetaDeLixo", self.intervalo_coleta)
|
||||||
|
|
||||||
--> start parser
|
--> start parser
|
||||||
|
|||||||
Reference in New Issue
Block a user