- fixed issue when reporting a custom heal attribute.

- fixed problem with dps with isn't showing after a new combat start.
- fixed icon problem on actor details panel.
- fixed a rare issue when switching between healing and damage throws a lua error.
- fixed custom list which wasn't showing the correct custom selected.
- added single click report for damage prevented.
- added a alert when data share is running.
- added single click report for cooldowns.
- cooldowns tooltip now show 15 cooldowns up from 3.
- added API: _detalhes:GetEncounterEqualize (mapid, bossindex)
- added API CoolTip options: "MinWidth".
This commit is contained in:
Tercio
2013-10-08 18:12:25 -03:00
parent 3c1e8b784d
commit 7c93260db7
18 changed files with 370 additions and 49 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
--> global name declaration
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
_detalhes.userversion = "v1.4.13"
_detalhes.userversion = "v1.4.15"
_detalhes.version = "Alpha 007"
_detalhes.realversion = 7
+1 -1
View File
@@ -107,7 +107,7 @@ function atributo_custom:RefreshWindow (instancia, _combat, forcar, exportar)
if (CustomObject.attribute == 1) then
return _detalhes.atributo_damage:RefreshWindow (instancia, _combat, forcar, exportar)
elseif (CustomObject.attribute == 2) then
_detalhes.atributo_heal:RefreshWindow (instancia, _combat, forcar, exportar)
return _detalhes.atributo_heal:RefreshWindow (instancia, _combat, forcar, exportar)
end
--> aqui precisa fazer algo para retornar algo pro report reconhecer a tabela
+95 -22
View File
@@ -1,4 +1,4 @@
--why do a cleanup on classes today if i can do tomorrow?
--lua locals
local _cstr = string.format
@@ -139,7 +139,7 @@ end
--[[exported]] function _detalhes.SortKeySimple (table1, table2)
return table1 [keyName] > table2 [keyName]
end
--[[exported]] function _detalhes:ContainerSort (container, amount, keyName2)
keyName = keyName2
_table_sort (container, _detalhes.SortKeySimple)
@@ -166,6 +166,24 @@ end
return false
end
function atributo_damage:ContainerRefreshDps (container, combat_time)
if (_detalhes.time_type == 2 or not _detalhes:CaptureGet ("damage")) then
for _, actor in _ipairs (container) do
if (actor.grupo) then
actor.last_dps = actor.total / combat_time
else
actor.last_dps = actor.total / actor:Tempo()
end
end
else
for _, actor in _ipairs (container) do
actor.last_dps = actor.total / actor:Tempo()
end
end
end
function _detalhes:ToolTipFrags (instancia, frag, esta_barra)
--vardump (frag)
@@ -236,7 +254,16 @@ function _detalhes:ToolTipFrags (instancia, frag, esta_barra)
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
GameCooltip:ShowCooltip()
else
GameCooltip:AddLine (Loc ["STRING_NO_DATA"], nil, 1, "white")
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords ["UNKNOW"]))
GameCooltip:ShowCooltip()
end
else
GameCooltip:AddLine (Loc ["STRING_NO_DATA"], nil, 1, "white")
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords ["UNKNOW"]))
GameCooltip:ShowCooltip()
end
end
@@ -327,6 +354,8 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
local using_cache = false
local combat_time = instancia.showing:GetCombatTime()
local sub_atributo = instancia.sub_atributo --> o que esta sendo mostrado nesta instância
local conteudo = showing._ActorTable --> pega a lista de jogadores -- get actors table from container
local amount = #conteudo
@@ -441,6 +470,11 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
elseif (modo == modo_ALL) then --> mostrando ALL
--> faz o sort da categoria e retorna o amount corrigido
--print (keyName)
if (sub_atributo == 2) then
atributo_damage:ContainerRefreshDps (conteudo, combat_time)
end
amount = _detalhes:ContainerSort (conteudo, amount, keyName)
--> pega o total ja aplicado na tabela do combate
@@ -458,7 +492,12 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
if (using_cache) then
conteudo = _detalhes.cache_damage_group
if (sub_atributo == 2) then
atributo_damage:ContainerRefreshDps (conteudo, combat_time)
end
if (#conteudo < 1) then
return _detalhes:EsconderBarrasNaoUsadas (instancia, showing)
@@ -477,6 +516,9 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
total = total + conteudo[i][keyName]
end
else
if (sub_atributo == 2) then
atributo_damage:ContainerRefreshDps (conteudo, combat_time)
end
_table_sort (conteudo, _detalhes.SortKeyGroup)
end
--
@@ -568,7 +610,6 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
else
local combat_time = instancia.showing:GetCombatTime()
for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time) --> instância, index, total, valor da 1º barra
qual_barra = qual_barra+1
@@ -623,11 +664,13 @@ function atributo_damage:Custom (_customName, _combat, sub_atributo, spell, alvo
for _, TargetActor in _ipairs (SkillTargets) do
--print (TargetActor.nome)
local TargetActorSelf = _combat (class_type, TargetActor.nome)
--print (TargetActor.total)
TargetActorSelf.custom = TargetActor.total + TargetActorSelf.custom
--print (TargetActorSelf.custom)
_combat.totals [_customName] = _combat.totals [_customName] + TargetActor.total
--print (self.nome .. " " ..TargetActor.total)
if (TargetActorSelf) then
--print (TargetActor.total)
TargetActorSelf.custom = TargetActor.total + TargetActorSelf.custom
--print (TargetActorSelf.custom)
_combat.totals [_customName] = _combat.totals [_customName] + TargetActor.total
--print (self.nome .. " " ..TargetActor.total)
end
end
end
--end
@@ -878,12 +921,8 @@ end
--------------------------------------------- // TOOLTIPS // ---------------------------------------------
--[[Exported]] function _detalhes:TooltipForCustom (barra)
_detalhes.popup:Close()
GameTooltip:ClearLines()
GameTooltip:AddLine (barra.colocacao..". "..self.nome)
GameTooltip:AddLine ("-> Left click for report", 1, 1, 1, 1) --> localize-me
--GameCooltip:AddLine (barra.colocacao..". "..self.nome)
GameCooltip:AddLine (Loc ["STRING_LEFT_CLICK_SHARE"])
return true
end
@@ -1456,12 +1495,33 @@ function atributo_damage:MontaInfoDamageTaken()
return true
end
_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)
_table_sort (meus_agressores, _detalhes.Sort2)
gump:JI_AtualizaContainerBarras (amt)
local max_ = meus_agressores [1] and meus_agressores [1][2] or 0
local barra
for index, tabela in _ipairs (meus_agressores) do
barra = barras [index]
if (not barra) then
barra = gump:CriaNovaBarraInfo1 (instancia, index)
end
self:FocusLock (barra, tabela[1])
--hes:UpdadeInfoBar (row, index, spellid, name, value, max, percent, icon, detalhes)
local texCoords = CLASS_ICON_TCOORDS [tabela[4]]
if (not texCoords) then
texCoords = _detalhes.class_coords ["UNKNOW"]
end
self:UpdadeInfoBar (barra, index, tabela[1], tabela[1], tabela[2], max_, tabela[3], "Interface\\AddOns\\Details\\images\\classes_small", true, texCoords)
end
--[[
for index, tabela in _ipairs (meus_agressores) do
local barra = barras [index]
@@ -1469,7 +1529,6 @@ function atributo_damage:MontaInfoDamageTaken()
if (not barra) then
barra = gump:CriaNovaBarraInfo1 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra.on_focus = false
end
@@ -1516,7 +1575,7 @@ function atributo_damage:MontaInfoDamageTaken()
end
end
--]]
end
--[[
@@ -1538,7 +1597,7 @@ end
_table_sort (ActorTargetsSortTable, _detalhes.Sort2)
--]]
--[[exported]] function _detalhes:UpdadeInfoBar (row, index, spellid, name, value, max, percent, icon, detalhes)
--[[exported]] function _detalhes:UpdadeInfoBar (row, index, spellid, name, value, max, percent, icon, detalhes, texCoords)
--> seta o tamanho da barra
if (index == 1) then
row.textura:SetValue (100)
@@ -1558,10 +1617,19 @@ end
--> seta o icone
if (icon) then
row.icone:SetTexture (icon)
if (icon == "Interface\\AddOns\\Details\\images\\classes_small") then
row.icone:SetTexCoord (0.25, 0.49609375, 0.75, 1)
else
row.icone:SetTexCoord (0, 1, 0, 1)
end
else
row.icone:SetTexture ("")
end
if (texCoords) then
row.icone:SetTexCoord (unpack (texCoords))
end
row.minha_tabela = self
row.show = spellid
row:Show() --> mostra a barra
@@ -1606,13 +1674,13 @@ function atributo_damage:MontaInfoDamageDone()
local nome, _, icone = _GetSpellInfo (_spellid)
_table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome, icone})
end
--> add pets
local ActorPets = self.pets
for _, PetName in _ipairs (ActorPets) do
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
_table_insert (ActorSkillsSortTable, {PetName, PetActor.total, PetActor.total/ActorTotalDamage*100, PetName:gsub ((" <.*"), ""), "Interface\\ICONS\\Ability_Hunter_Pet_Wolf"})
_table_insert (ActorSkillsSortTable, {PetName, PetActor.total, PetActor.total/ActorTotalDamage*100, PetName:gsub ((" <.*"), ""), "Interface\\AddOns\\Details\\images\\classes_small"})
end
end
@@ -1858,11 +1926,15 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra)
if (not _barra.pet) then
_barra.bg.PetIcon = _barra.bg:CreateTexture (nil, "overlay")
_barra.bg.PetIcon:SetTexture ("Interface\\ICONS\\Ability_Druid_SkinTeeth")
--_barra.bg.PetIcon:SetTexture ("Interface\\ICONS\\Ability_Druid_SkinTeeth")
_barra.bg.PetIcon:SetTexture ("Interface\\AddOns\\Details\\images\\classes")
_barra.bg.PetIcon:SetTexCoord (0.25, 0.49609375, 0.75, 1)
_barra.bg.PetIcon:SetPoint ("left", _barra.bg, "left", 2, 2)
_barra.bg.PetIcon:SetWidth (40)
_barra.bg.PetIcon:SetHeight (40)
gump:NewLabel (_barra.bg, _barra.bg, nil, "PetText", "The Actor is a Pet", "GameFontHighlightLeft")
gump:NewLabel (_barra.bg, _barra.bg, nil, "PetText", Loc ["STRING_ISA_PET"], "GameFontHighlightLeft")
_barra.bg.PetText:SetPoint ("topleft", _barra.bg.PetIcon, "topright", 10, -2)
gump:NewLabel (_barra.bg, _barra.bg, nil, "PetDps", "", "GameFontHighlightSmall")
_barra.bg.PetDps:SetPoint ("left", _barra.bg.PetIcon, "right", 10, 2)
@@ -1875,6 +1947,7 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra)
gump:Fade (_barra.bg.overlay, "OUT")
_barra.bg:SetStatusBarColor (1, 1, 1)
_barra.bg_end:SetPoint ("LEFT", _barra.bg, "LEFT", (_barra.bg:GetValue()*2.19)-6, 0)
_barra.bg.PetIcon:SetVertexColor (_unpack (_detalhes.class_colors [self.classe]))
_barra.bg:Show()
_barra.bg.PetIcon:Show()
_barra.bg.PetText:Show()
+39 -1
View File
@@ -112,6 +112,44 @@ function atributo_energy:NovaTabela (serial, nome, link)
return _new_energyActor
end
function _detalhes.SortGroupEnergy (container, keyName2)
keyName = keyName2
return _table_sort (container, _detalhes.SortKeyGroupEnergy)
end
function _detalhes.SortKeyGroupEnergy (table1, table2)
if (table1.grupo and table2.grupo) then
return table1 [keyName] > table2 [keyName]
elseif (table1.grupo and not table2.grupo) then
return true
elseif (not table1.grupo and table2.grupo) then
return false
else
return table1 [keyName] > table2 [keyName]
end
end
function _detalhes.SortKeySimpleEnergy (table1, table2)
return table1 [keyName] > table2 [keyName]
end
function _detalhes:ContainerSortEnergy (container, amount, keyName2)
keyName = keyName2
_table_sort (container, _detalhes.SortKeySimpleEnergy)
if (amount) then
for i = amount, 1, -1 do --> de trás pra frente
if (container[i][keyName] < 1) then
amount = amount-1
else
break
end
end
return amount
end
end
function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, exportar)
local showing = tabela_do_combate [class_type] --> o que esta sendo mostrado -> [1] - dano [2] - cura --> pega o container com ._NameIndexTable ._ActorTable
@@ -162,7 +200,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
if (instancia.atributo == 5) then --> custom
--> faz o sort da categoria e retorna o amount corrigido
amount = _detalhes:ContainerSort (conteudo, amount, keyName)
amount = _detalhes:ContainerSortEnergy (conteudo, amount, keyName)
--> grava o total
instancia.top = conteudo[1][keyName]
+88 -7
View File
@@ -112,6 +112,59 @@ function atributo_heal:NovaTabela (serial, nome, link)
end
function _detalhes.SortGroupHeal (container, keyName2)
keyName = keyName2
return _table_sort (container, _detalhes.SortKeyGroupHeal)
end
function _detalhes.SortKeyGroupHeal (table1, table2)
if (table1.grupo and table2.grupo) then
return table1 [keyName] > table2 [keyName]
elseif (table1.grupo and not table2.grupo) then
return true
elseif (not table1.grupo and table2.grupo) then
return false
else
return table1 [keyName] > table2 [keyName]
end
end
function _detalhes.SortKeySimpleHeal (table1, table2)
return table1 [keyName] > table2 [keyName]
end
function _detalhes:ContainerSortHeal (container, amount, keyName2)
keyName = keyName2
_table_sort (container, _detalhes.SortKeySimpleHeal)
if (amount) then
for i = amount, 1, -1 do --> de trás pra frente
if (container[i][keyName] < 1) then
amount = amount-1
else
break
end
end
return amount
end
end
function atributo_heal:ReportSingleDamagePreventedLine (actor, instancia)
local barra = instancia.barras [actor.minha_barra]
local reportar = {"Details! " .. Loc ["STRING_ATTRIBUTE_HEAL_PREVENT"].. ": " .. actor.nome} --> localize-me
for i = 1, GameCooltip:GetNumLines() do
local texto_left, texto_right = GameCooltip:GetText (i)
if (texto_left and texto_right) then
texto_left = texto_left:gsub (("|T(.*)|t "), "")
reportar [#reportar+1] = ""..texto_left.." "..texto_right..""
end
end
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
end
function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, exportar)
local showing = tabela_do_combate [class_type] --> o que esta sendo mostrado -> [1] - dano [2] - cura
@@ -176,14 +229,14 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
if (instancia.atributo == 5) then --> custom
--> faz o sort da categoria e retorna o amount corrigido
amount = _detalhes:ContainerSort (conteudo, amount, keyName)
amount = _detalhes:ContainerSortHeal (conteudo, amount, keyName)
--> grava o total
instancia.top = conteudo[1][keyName]
elseif (instancia.modo == modo_ALL or sub_atributo == 5) then --> mostrando ALL
amount = _detalhes:ContainerSort (conteudo, amount, keyName)
amount = _detalhes:ContainerSortHeal (conteudo, amount, keyName)
--> pega o total ja aplicado na tabela do combate
total = tabela_do_combate.totals [class_type]
@@ -205,7 +258,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
return _detalhes:EsconderBarrasNaoUsadas (instancia, showing)
end
_detalhes:ContainerSort (conteudo, nil, keyName)
_detalhes:ContainerSortHeal (conteudo, nil, keyName)
if (conteudo[1][keyName] < 1) then
amount = 0
@@ -219,7 +272,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
end
else
--_table_sort (conteudo, _detalhes.SortKeyGroup)
_detalhes.SortGroup (conteudo, keyName)
_detalhes.SortGroupHeal (conteudo, keyName)
end
--_table_sort (conteudo, _detalhes.SortKeyGroup)
@@ -317,8 +370,10 @@ function atributo_heal:Custom (_customName, _combat, sub_atributo, spell, alvo)
for _, TargetActor in _ipairs (SkillTargets) do
local TargetActorSelf = _combat (class_type, TargetActor.nome)
TargetActorSelf.custom = TargetActor.total + TargetActorSelf.custom
_combat.totals [_customName] = _combat.totals [_customName] + TargetActor.total
if (TargetActorSelf) then
TargetActorSelf.custom = TargetActor.total + TargetActorSelf.custom
_combat.totals [_customName] = _combat.totals [_customName] + TargetActor.total
end
end
end
end
@@ -713,6 +768,12 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
end
if (instancia.sub_atributo == 6) then
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, "white")
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
GameCooltip:ShowCooltip()
end
local container = instancia.showing [2]
if (instancia.sub_atributo == 1) then -- 1 or 2 -> healing done or hps
@@ -915,6 +976,26 @@ function atributo_heal:MontaInfoHealTaken()
local max_ = meus_curandeiros [1] and meus_curandeiros [1][2] or 0
local barra
for index, tabela in _ipairs (meus_curandeiros) do
barra = barras [index]
if (not barra) then
barra = gump:CriaNovaBarraInfo1 (instancia, index)
end
self:FocusLock (barra, tabela[1])
--hes:UpdadeInfoBar (row, index, spellid, name, value, max, percent, icon, detalhes)
local texCoords = CLASS_ICON_TCOORDS [tabela[4]]
if (not texCoords) then
texCoords = _detalhes.class_coords ["UNKNOW"]
end
self:UpdadeInfoBar (barra, index, tabela[1], tabela[1], tabela[2], max_, tabela[3], "Interface\\AddOns\\Details\\images\\classes_small", true, texCoords)
end
--[[
for index, tabela in _ipairs (meus_curandeiros) do
local barra = barras [index]
@@ -969,7 +1050,7 @@ function atributo_heal:MontaInfoHealTaken()
end
end
--]]
end
function atributo_heal:MontaInfoOverHealing()
+9 -5
View File
@@ -1273,6 +1273,8 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
end
end
local atributo_changed = false
if (atributo ~= meu_atributo or _detalhes.initializing or iniciando_instancia or (instancia.modo == modo_alone or instancia.modo == modo_raid)) then
if (instancia.modo == modo_alone and not (_detalhes.initializing or iniciando_instancia)) then
@@ -1297,6 +1299,8 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
return _detalhes.RaidTables.switch (_, _, -1)
end
atributo_changed = true
instancia.m2_last [instancia.atributo] = instancia.sub_atributo --> salta o último sub-atributo do atributo que esta sendo mostrado na instÇancia
instancia.atributo = atributo
@@ -1355,8 +1359,8 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instancia, atributo, sub_atributo)
end
if (sub_atributo ~= meu_sub_atributo or _detalhes.initializing or iniciando_instancia) then
if (sub_atributo ~= meu_sub_atributo or _detalhes.initializing or iniciando_instancia or atributo_changed) then
instancia.m2_last [instancia.atributo] = sub_atributo
instancia.sub_atributo = sub_atributo
@@ -1453,9 +1457,7 @@ function _detalhes:MontaAtributosOption (instancia, func)
for index, custom in _ipairs (_detalhes.custom) do
CoolTip:AddMenu (2, func, nil, 5, index, custom.name, custom.icon, true)
end
CoolTip:SetLastSelected (2, 5, instancia.m2_last [5])
CoolTip:SetLastSelected (2, 5, instancia.m2_last [5]+1)
CoolTip:SetLastSelected (1, atributo_ativo)
return menu_principal, sub_menus
@@ -1770,6 +1772,8 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
total = self.showing.totals [self.customName]
atributo = _detalhes.custom [self.sub_atributo].attribute
container = self.showing [atributo]._ActorTable
print (total, keyName, first, atributo)
end
for i = 1, amt do
+61 -2
View File
@@ -92,6 +92,44 @@ function _detalhes.SortGroupIfHaveKey (table1, table2)
end
end
function _detalhes.SortGroupMisc (container, keyName2)
keyName = keyName2
return _table_sort (container, _detalhes.SortKeyGroupMisc)
end
function _detalhes.SortKeyGroupMisc (table1, table2)
if (table1.grupo and table2.grupo) then
return table1 [keyName] > table2 [keyName]
elseif (table1.grupo and not table2.grupo) then
return true
elseif (not table1.grupo and table2.grupo) then
return false
else
return table1 [keyName] > table2 [keyName]
end
end
function _detalhes.SortKeySimpleMisc (table1, table2)
return table1 [keyName] > table2 [keyName]
end
function _detalhes:ContainerSortMisc (container, amount, keyName2)
keyName = keyName2
_table_sort (container, _detalhes.SortKeySimpleMisc)
if (amount) then
for i = amount, 1, -1 do --> de trás pra frente
if (container[i][keyName] < 1) then
amount = amount-1
else
break
end
end
return amount
end
end
function atributo_misc:NovaTabela (serial, nome, link)
local _new_miscActor = {
@@ -197,7 +235,7 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
local barra = instancia.barras [morte.minha_barra]
local reportar = {"Detalhes da morte de " .. morte [3] .. " " .. barra.texto_esquerdo:GetText()} --> localize-me
local reportar = {"Details! " .. Loc ["STRING_REPORT_SINGLE_DEATH"] .. " " .. morte [3] .. " " .. barra.texto_esquerdo:GetText()} --> localize-me
for i = 1, GameCooltip:GetNumLines() do
local texto_left, texto_right = GameCooltip:GetText (i)
@@ -210,6 +248,27 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
end
function atributo_misc:ReportSingleCooldownLine (misc_actor, instancia)
local barra = misc_actor.minha_barra
local reportar = {"Details! " .. Loc ["STRING_REPORT_SINGLE_COOLDOWN"] .. " " .. barra.texto_esquerdo:GetText()} --> localize-me
reportar [#reportar+1] = "> " .. Loc ["STRING_SPELLS"] .. ":"
for i = 1, GameCooltip:GetNumLines() do
local texto_left, texto_right = GameCooltip:GetText (i)
if (texto_left and texto_right) then
texto_left = texto_left:gsub (("|T(.*)|t "), "")
reportar [#reportar+1] = " "..texto_left.." "..texto_right..""
elseif (i ~= 1) then
reportar [#reportar+1] = "> " .. Loc ["STRING_TARGETS"] .. ":"
end
end
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
end
function atributo_misc:DeadAtualizarBarra (morte, qual_barra, colocacao, instancia)
morte ["dead"] = true --> marca que esta tabela é uma tabela de mortes, usado no controla na hora de montar o tooltip
@@ -867,7 +926,7 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (#cooldowns_usados > 0) then
for i = 1, _math_min (3, #cooldowns_usados) do
for i = 1, _math_min (15, #cooldowns_usados) do
local esta_habilidade = cooldowns_usados[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
+11 -1
View File
@@ -350,6 +350,15 @@
--> schedule sync
_detalhes:EqualizeActorsSchedule (_detalhes.host_of)
if (_detalhes:GetEncounterEqualize (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index)) then
local lower_instance = _detalhes:GetLowerInstanceNumber()
if (lower_instance) then
lower_instance = _detalhes:GetInstance (lower_instance)
if (lower_instance) then
lower_instance:InstanceAlert (Loc ["STRING_EQUILIZING"], {[[Interface\COMMON\StreamCircle]], 22, 22, true}, 5)
end
end
end
--> schedule clean up
_detalhes:ScheduleTimer ("IniciarColetaDeLixo", 15, true)
@@ -661,7 +670,7 @@
return _detalhes.combat_id
end
--> tooltip fork
--> tooltip fork search key: ~tooltip
local avatarPoint = {"bottomleft", "topleft", -3, -4}
local backgroundPoint = {{"bottomleft", "topleft", 0, -3}, {"bottomright", "topright", 0, -3}}
local textPoint = {"left", "right", -11, -5}
@@ -672,6 +681,7 @@
GameCooltip:SetType ("tooltip")
GameCooltip:SetOption ("LeftBorderSize", -5)
GameCooltip:SetOption ("RightBorderSize", 5)
GameCooltip:SetOption ("MinWidth", 180)
GameCooltip:SetOption ("StatusBarTexture", [[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]]) --[[Interface\Addons\Details\images\bar_flat]]
GameCooltip:SetOwner (frame)
+14 -3
View File
@@ -423,7 +423,8 @@
if (_detalhes.segments_amount_to_save and _detalhes.segments_amount_to_save < _detalhes.segments_amount) then
for i = _detalhes.segments_amount, _detalhes.segments_amount_to_save+1, -1 do
if (_detalhes.tabela_historico.tabelas [i]) then
_detalhes.tabela_historico.tabelas [i] = nil
--_detalhes.tabela_historico.tabelas [i] = nil
table.remove (_detalhes.tabela_historico.tabelas, i)
end
end
end
@@ -437,8 +438,8 @@
tabelas_de_combate [#tabelas_de_combate+1] = _tabela
end
tabelas_de_combate [#tabelas_de_combate+1] = tabela_atual
--tabelas_de_combate [#tabelas_de_combate+1] = tabela_overall
--tabelas_de_combate [#tabelas_de_combate+1] = tabela_atual --não salva mais a atual
--tabelas_de_combate [#tabelas_de_combate+1] = tabela_overall --não salva mais a overall
--> make sure details database exists
_detalhes_database = _detalhes_database or {}
@@ -481,15 +482,25 @@
if (_iter.data.grupo or _iter.data.boss or _iter.data.boss_fight_component or IsBossEncounter) then
can_erase = false
--if (class_type == 1) then
-- print ("SAVE ", _iter.data.nome, tabela_index)
--end
else
local owner = _iter.data.owner
if (owner) then
local owner_actor = _combate (class_type, owner.nome)
if (owner_actor) then
if (owner.grupo or owner.boss or owner.boss_fight_component) then
--if (class_type == 1) then
-- print ("SAVE", _iter.data.nome, "| owner:",_iter.data.owner.nome, tabela_index)
--end
can_erase = false
end
end
else
--if (class_type == 1) then
-- print ("DELETANDO", _iter.data.nome, tabela_index)
--end
end
end
+20 -3
View File
@@ -65,6 +65,7 @@ function DetailsCreateCoolTip()
["IconSize"] = true,
["HeightAnchorMod"] = true,
["WidthAnchorMod"] = true,
["MinWidth"] = true,
["FixedWidth"] = true,
["FixedHeight"] = true,
["FixedWidthSub"] = true,
@@ -96,6 +97,7 @@ function DetailsCreateCoolTip()
["IconSize"] = nil,
["HeightAnchorMod"] = nil,
["WidthAnchorMod"] = nil,
["MinWidth"] = nil,
["FixedWidth"] = nil,
["FixedHeight"] = nil,
["FixedWidthSub"] = nil,
@@ -978,7 +980,12 @@ function DetailsCreateCoolTip()
if (not CoolTip.OptionsTable.FixedWidth) then
if (CoolTip.Type == 2) then --> with bars
frame1:SetWidth (frame1.w + 34)
if (CoolTip.OptionsTable.MinWidth) then
local w = frame1.w + 34
frame1:SetWidth (math.max (w, CoolTip.OptionsTable.MinWidth))
else
frame1:SetWidth (frame1.w + 34)
end
else
--> width stability check
local width = frame1.w + 24
@@ -987,7 +994,12 @@ function DetailsCreateCoolTip()
else
CoolTip.LastSize = width
end
frame1:SetWidth (width)
if (CoolTip.OptionsTable.MinWidth) then
frame1:SetWidth (math.max (width, CoolTip.OptionsTable.MinWidth))
else
frame1:SetWidth (width)
end
end
end
@@ -1111,7 +1123,12 @@ function DetailsCreateCoolTip()
end
if (not CoolTip.OptionsTable.FixedWidth) then
frame1:SetWidth (frame1.w + 24)
if (CoolTip.OptionsTable.MinWidth) then
local w = frame1.w + 24
frame1:SetWidth (math.max (w, CoolTip.OptionsTable.MinWidth))
else
frame1:SetWidth (frame1.w + 24)
end
end
if (CoolTip.OptionsTable.FixedHeight) then
+5
View File
@@ -35,6 +35,11 @@ do
return
end
--> return if the boss need sync
function _detalhes:GetEncounterEqualize (mapid, bossindex)
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex] and _detalhes.EncounterInformation [mapid].encounters [bossindex].equalize
end
--> return the function for the boss
function _detalhes:GetBossFunction (mapid, bossindex)
local func = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex] and _detalhes.EncounterInformation [mapid].encounters [bossindex].func
+4
View File
@@ -379,6 +379,10 @@ function SlashCmdList.DETAILS (msg, editbox)
f:Show()
--> debug
elseif (msg == "save") then
print ("running...")
_detalhes:PrepareTablesForSave()
elseif (msg == "id") then
local one, two = rest:match("^(%S*)%s*(.-)$")
if (one ~= "") then
+2 -1
View File
@@ -496,7 +496,8 @@ do
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
_detalhes.SpellOverwrite = {
[124464] = {name = GetSpellInfo (124464) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> shadow word: pain mastery proc (priest)
[124465] = {name = GetSpellInfo (124465) .. " (" .. Loc ["STRING_MASTERY"] .. ")"} --> vampiric touch mastery proc (priest)
[124465] = {name = GetSpellInfo (124465) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> vampiric touch mastery proc (priest)
[124468] = {name = GetSpellInfo (124468) .. " (" .. Loc ["STRING_MASTERY"] .. ")"} --> mind flay mastery proc (priest)
}
end
+7
View File
@@ -17,6 +17,11 @@ if not Loc then return end
Loc ["STRING_CHANGED_TO_CURRENT"] = "Segment changed to current"
Loc ["STRING_SEGMENT_TRASH"] = "Next Boss Cleanup"
Loc ["STRING_NO_DATA"] = "data already has been cleaned"
Loc ["STRING_ISA_PET"] = "This Actor is a Pet"
Loc ["STRING_EQUILIZING"] = "Sharing encounter data"
Loc ["STRING_LEFT_CLICK_SHARE"] = "Left click to report."
Loc ["STRING_INSTANCE_LIMIT"] = "max instance number has been reached, you can modify this limit over options panel."
Loc ["STRING_PLEASE_WAIT"] = "Please wait"
@@ -252,6 +257,8 @@ if not Loc then return end
Loc ["STRING_REPORT_LASTFIGHT"] = "last fight"
Loc ["STRING_REPORT_PREVIOUSFIGHTS"] = "previous fights"
Loc ["STRING_REPORT_INVALIDTARGET"] = "Whisper target not found"
Loc ["STRING_REPORT_SINGLE_DEATH"] = "death details of"
Loc ["STRING_REPORT_SINGLE_COOLDOWN"] = "cooldowns used by"
Loc ["STRING_NOCLOSED_INSTANCES"] = "There are no closed instances,\nclick to open a new one."
--> report frame
+7
View File
@@ -17,6 +17,11 @@ if not Loc then return end
Loc ["STRING_CHANGED_TO_CURRENT"] = "Segmento trocado para atual"
Loc ["STRING_SEGMENT_TRASH"] = "Caminho do Proximo Boss"
Loc ["STRING_NO_DATA"] = "data já foi limpada"
Loc ["STRING_ISA_PET"] = "Este Ator e um Ajudante"
Loc ["STRING_EQUILIZING"] = "Comparilhando dados"
Loc ["STRING_LEFT_CLICK_SHARE"] = "Clique para enviar relatorio."
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"
@@ -247,6 +252,8 @@ if not Loc then return end
Loc ["STRING_REPORT_LASTFIGHT"] = "ultima luta"
Loc ["STRING_REPORT_PREVIOUSFIGHTS"] = "lutas anteriores"
Loc ["STRING_REPORT_INVALIDTARGET"] = "O alvo nao pode ser encontrado"
Loc ["STRING_REPORT_SINGLE_DEATH"] = "detalhes da morte de"
Loc ["STRING_REPORT_SINGLE_COOLDOWN"] = "cooldowns usados por"
Loc ["STRING_NOCLOSED_INSTANCES"] = "Nao ha instancias fechadas,\nclique para abrir uma nova."
--Loc ["STRING_REPORT_FRAG"] =
@@ -306,6 +306,7 @@ local siege_of_orgrimmar = {
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Norushen]],
combat_end = {1, 72276},
equalize = true,
spell_mechanics = {
[146707] = {0x1}, --> Disheartening Laugh
@@ -1323,6 +1324,7 @@ local siege_of_orgrimmar = {
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Garrosh Hellscream]],
combat_end = {1, 71865},
equalize = true,
spell_mechanics = {
[144582] = {0x1}, --Hamstring (Kor'kron Warbringers)
@@ -115,6 +115,7 @@ local throne_of_thunder = {
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Horridon]],
combat_end = {1, 68476},
equalize = true,
spell_mechanics = {
[136719] = {0x10}, --> Blazing Sunlight (Wastewalker)
@@ -747,6 +748,7 @@ local throne_of_thunder = {
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Empyreal Queens]],
combat_end = {2, {68904, 68905}},
equalize = true,
spell_mechanics = {
[137410] = {0x200, 0x1}, --> Blazing Radiance
+2 -2
View File
@@ -136,11 +136,11 @@ function _G._detalhes:Start()
--damage, dps, damage taken, friendly fire
self.row_singleclick_overwrite [1] = {true, true, true, true, self.atributo_damage.ReportSingleFragsLine}
--healing, hps, overheal, healing taken
self.row_singleclick_overwrite [2] = {true, true, true, true, false, false}
self.row_singleclick_overwrite [2] = {true, true, true, true, false, self.atributo_heal.ReportSingleDamagePreventedLine}
--mana, rage, energy, runepower
self.row_singleclick_overwrite [3] = {true, true, true, true}
--cc breaks, ress, interrupts, dispells, deaths
self.row_singleclick_overwrite [4] = {true, true, true, true, self.atributo_misc.ReportSingleDeadLine, false}
self.row_singleclick_overwrite [4] = {true, true, true, true, self.atributo_misc.ReportSingleDeadLine, self.atributo_misc.ReportSingleCooldownLine}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> initialize