- added new sub attribute: buff uptime.

- minor bug fixes when updating energy attribute.
- fixed issue were changing attributes clicking directly on attribute name.
- some fixes to prevent unknown pet owner name.
- pet scan now is more smooth and scheduled to 1 scan per second.
- disabling auras doesn't disable healing absorbs any more.
- friendly fire doesn't check pets any more, only players.
- fixed problem were pet damage on target isn't added to the owner target.
- fixed issue with cooldown refresh which isn't tracked before.
- added cooldown to death log and also the time of last cooldown used.
- added command /details worldboss which runs the macro showing world boss killed.
- added command /details updates showing change log window.
- added absorbs for monk 2P, shammy 2P and Stolen Relic of Zuldazar trinket.
- added a change log inside the addon showing latest changes.
This commit is contained in:
Tercio
2013-10-23 19:26:15 -02:00
parent a748a2aa2d
commit 65de37e962
30 changed files with 1082 additions and 284 deletions
+2
View File
@@ -55,6 +55,7 @@ gumps\janela_report.lua
gumps\janela_principal.lua
gumps\janela_custom.lua
gumps\janela_welcome.lua
gumps\janela_news.lua
gumps\fw_mods.lua
gumps\switch.lua
gumps\toolbar_button.xml
@@ -89,6 +90,7 @@ core\gears.lua
core\windows.lua
core\meta.lua
core\network.lua
core\parser.lua
startup.lua
+3 -3
View File
@@ -8,9 +8,9 @@
_ = nil
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
_detalhes.userversion = "v1.4.19"
_detalhes.version = "Alpha 007"
_detalhes.realversion = 8
_detalhes.userversion = "v1.5.0"
_detalhes.version = "Alpha 009"
_detalhes.realversion = 9
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> initialization stuff
+5 -3
View File
@@ -127,14 +127,15 @@ function combate:NovaTabela (iniciada, _tabela_overall, combatId, ...)
e_rage = 0, --> rage
e_energy = 0, --> energy (rogues cat)
runepower = 0 --> runepower (dk)
},
},
{--> misc
cc_break = 0, --> armazena quantas quebras de CC
ress = 0, --> armazena quantos pessoas ele reviveu
interrupt = 0, --> armazena quantos interrupt a pessoa deu
dispell = 0, --> armazena quantos dispell esta pessoa recebeu
dead = 0, --> armazena quantas vezes essa pessia morreu
dead = 0, --> armazena quantas vezes essa pessia morreu
cooldowns_defensive = 0, --> armazena quantos cooldowns a raid usou
buff_uptime = 0 --> armazena quantos cooldowns a raid usou
}
}
@@ -153,7 +154,8 @@ function combate:NovaTabela (iniciada, _tabela_overall, combatId, ...)
interrupt = 0, --> armazena quantos interrupt a pessoa deu
dispell = 0, --> armazena quantos dispell esta pessoa recebeu
dead = 0, --> armazena quantas vezes essa oessia morreu
cooldowns_defensive = 0 --> armazena quantos cooldowns a raid usou
cooldowns_defensive = 0, --> armazena quantos cooldowns a raid usou
buff_uptime = 0
}
}
+3 -1
View File
@@ -521,6 +521,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
local combat_time = instancia.showing:GetCombatTime()
atributo_damage:ContainerRefreshDps (conteudo, combat_time)
end
_table_sort (conteudo, _detalhes.SortKeyGroup)
end
--
@@ -541,7 +542,8 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
if (not using_cache) then
for index, player in _ipairs (conteudo) do
if (_bit_band (player.flag, DFLAG_player_group) >= 0x101) then --> é um player e esta em grupo
--if (_bit_band (player.flag, DFLAG_player_group) >= 0x101) then --> é um player e esta em grupo
if (player.grupo) then --> é um player e esta em grupo
if (player[keyName] < 1) then --> dano menor que 1, interromper o loop
amount = index - 1
break
+8 -2
View File
@@ -196,6 +196,9 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
keyName = "e_energy"
elseif (sub_atributo == 4) then --> RUNEPOWER GANHO
keyName = "runepower"
else
--> not sure why this is happening
return
end
end
@@ -223,9 +226,11 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
total = tabela_do_combate.totals [class_type] [keyName] --> pega o total de dano já aplicado
instancia.top = conteudo[1] [keyName]
elseif (modo == modo_GROUP) then --> mostrando GROUP
--print ("energy", keyName)
_table_sort (conteudo, function (a, b)
if (a.grupo and b.grupo) then
return a[keyName] > b[keyName]
@@ -239,7 +244,8 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end)
for index, player in _ipairs (conteudo) do
if (_bit_band (player.flag, DFLAG_player_group) >= 0x101) then --> é um player e esta em grupo
--if (_bit_band (player.flag, DFLAG_player_group) >= 0x101) then --> é um player e esta em grupo
if (player.grupo) then --> é um player e esta em grupo
if (player[keyName] < 1) then --> dano menor que 1, interromper o loop
amount = index - 1
break
+2 -1
View File
@@ -292,7 +292,8 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
end)--]]
for index, player in _ipairs (conteudo) do
if (_bit_band (player.flag, DFLAG_player_group) >= 0x101) then --> é um player e esta em grupo
--if (_bit_band (player.flag, DFLAG_player_group) >= 0x101) then --> é um player e esta em grupo
if (player.grupo) then --> é um player e esta em grupo
if (player[keyName] < 1) then --> dano menor que 1, interromper o loop
amount = index - 1
break
+24 -18
View File
@@ -747,9 +747,7 @@ end
nova_instancia.atributo = 1 --> dano
nova_instancia.sub_atributo = 1 --> damage done
nova_instancia.m2_last = {
[nova_instancia.atributo] = nova_instancia.sub_atributo
}
nova_instancia.sub_atributo_last = {1, 1, 1, 1, 1}
nova_instancia.segmento = -1 --> combate atual
@@ -827,6 +825,10 @@ function _detalhes:RestauraJanela (index, temp)
self.barrasInfo.textureNameBackground = _detalhes.default_texture_name
end
if (not self.sub_atributo_last) then
self.sub_atributo_last = {1, 1, 1, 1, 1}
end
local _baseframe, _bgframe, _bgframe_display, _scrollframe = gump:CriaJanelaPrincipal (self.meu_id, self)
self.baseframe = _baseframe
@@ -1220,9 +1222,9 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
if (not atributo) then
atributo = instancia.atributo
end
if (not sub_atributo) then
sub_atributo = instancia.sub_atributo
end
--if (not sub_atributo) then
-- sub_atributo = instancia.sub_atributo
--end
--print ("DEBUG: trocando para "..atributo.." "..sub_atributo)
@@ -1276,6 +1278,10 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
end
local atributo_changed = false
local last_sub_atributo = instancia.sub_atributo_last [atributo]
if (not sub_atributo) then
sub_atributo = instancia.sub_atributo_last [atributo]
end
if (atributo ~= meu_atributo or _detalhes.initializing or iniciando_instancia or (instancia.modo == modo_alone or instancia.modo == modo_raid)) then
@@ -1303,14 +1309,10 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
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.sub_atributo_last [instancia.atributo] = meu_sub_atributo
--print ("atributo last changed:",instancia.atributo, "->", meu_sub_atributo)
instancia.atributo = atributo
local last_sub_atributo = instancia.m2_last [atributo] --> isso aqui é invalido, pois sempre vai haver um sub atributo e nao precisa conferir se ele realmente existe.
if (not last_sub_atributo) then
last_sub_atributo = 1
end
instancia.sub_atributo = last_sub_atributo
--> troca icone
@@ -1363,7 +1365,10 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
end
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_last [meu_atributo] = meu_sub_atributo
--print ("atributo last changed:",meu_atributo, "->", meu_sub_atributo)
instancia.sub_atributo = sub_atributo
if (instancia.atributo == 5) then --> custom
@@ -1388,6 +1393,7 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
if (not _detalhes.initializing and not iniciando_instancia) then
instancia:ResetaGump()
--print ("atualizando: ", instancia.atributo, instancia.sub_atributo)
instancia:AtualizaGumpPrincipal (true)
end
@@ -1448,7 +1454,7 @@ function _detalhes:MontaAtributosOption (instancia, func)
CoolTip:AddMenu (2, func, nil, i, o, options[o], nil, true)
CoolTip:AddIcon (icones[i], 2, 1, 20, 20, p*(o-1), p*(o), 0, 1)
end
CoolTip:SetLastSelected (2, i, instancia.m2_last [i])
CoolTip:SetLastSelected (2, i, instancia.sub_atributo_last [i])
end
--> custom
@@ -1460,10 +1466,10 @@ function _detalhes:MontaAtributosOption (instancia, func)
CoolTip:AddMenu (2, func, nil, 5, index, custom.name, custom.icon, true)
end
if (not instancia.m2_last [5]) then
if (not instancia.sub_atributo_last [5]) then
CoolTip:SetLastSelected (2, 5, 1)
else
CoolTip:SetLastSelected (2, 5, instancia.m2_last [5]+1)
CoolTip:SetLastSelected (2, 5, instancia.sub_atributo_last [5]+1)
end
CoolTip:SetLastSelected (1, atributo_ativo)
@@ -1781,7 +1787,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
atributo = _detalhes.custom [self.sub_atributo].attribute
container = self.showing [atributo]._ActorTable
print (total, keyName, first, atributo)
--print (total, keyName, first, atributo)
end
for i = 1, amt do
+246 -10
View File
@@ -18,6 +18,12 @@ local _type = type
--api locals
local _GetSpellInfo = _detalhes.getspellinfo
local GameTooltip = GameTooltip
local _IsInRaid = IsInRaid
local _IsInGroup = IsInGroup
local _GetNumGroupMembers = GetNumGroupMembers
local _UnitAura = UnitAura
local _UnitGUID = UnitGUID
local _UnitName = UnitName
local _detalhes = _G._detalhes
local AceLocale = LibStub ("AceLocale-3.0")
@@ -176,13 +182,27 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra)
amt_golpes = ""
end
--> [1] left text [2] right text [3] main 1 or sub 2 [...] color
GameCooltip:AddLine ("".._cstr ("%.1f", evento[4] - hora_da_morte) .."s "..amt_golpes..nome_magia.." ("..evento[6]..")", "-".._detalhes:ToK (evento[3]).." (".. hp .."%)", 1, "white", "white")
--> [1] icon [2] main 1 or sub 2 [3] left or right [4,5] width height [...] texcoord
GameCooltip:AddIcon (icone_magia)
--> [1] value [2] main 1 or sub 2 [...] color [4] glow
GameCooltip:AddStatusBar (hp, 1, "red", true)
if (type (evento [1]) ~= "boolean" and evento [1] == 2) then --> last cooldown
if (evento[3] == 1) then
GameCooltip:AddLine (_cstr ("%.1f", evento[4] - hora_da_morte) .. "s " .. nome_magia .. " (" .. Loc ["STRING_LAST_COOLDOWN"] .. ")")
GameCooltip:AddIcon (icone_magia)
else
GameCooltip:AddLine (Loc ["STRING_NOLAST_COOLDOWN"])
end
else
--> [1] left text [2] right text [3] main 1 or sub 2 [...] color
GameCooltip:AddLine ("".._cstr ("%.1f", evento[4] - hora_da_morte) .."s "..amt_golpes..nome_magia.." ("..evento[6]..")", "-".._detalhes:ToK (evento[3]).." (".. hp .."%)", 1, "white", "white")
--> [1] icon [2] main 1 or sub 2 [3] left or right [4,5] width height [...] texcoord
GameCooltip:AddIcon (icone_magia)
--> [1] value [2] main 1 or sub 2 [...] color [4] glow
if (type (evento [1]) ~= "boolean" and evento [1] == 1) then --> cooldown
GameCooltip:AddStatusBar (100, 1, "yellow", true)
else
GameCooltip:AddStatusBar (hp, 1, "red", true)
end
end
elseif (not battleress) then --> battle ress
GameCooltip:AddLine ("+".._cstr ("%.1f", evento[4] - hora_da_morte) .."s "..nome_magia.." ("..evento[6]..")", "", 1, "white")
GameCooltip:AddIcon ("Interface\\Glues\\CharacterSelect\\Glues-AddOn-Icons", 1, 1, nil, nil, .75, 1, 0, 1)
@@ -269,6 +289,27 @@ function atributo_misc:ReportSingleCooldownLine (misc_actor, instancia)
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
end
function atributo_misc:ReportSingleBuffUptimeLine (misc_actor, instancia)
local barra = misc_actor.minha_barra
local reportar = {"Details! " .. Loc ["STRING_REPORT_SINGLE_BUFFUPTIME"] .. " " .. 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
@@ -313,7 +354,7 @@ end
function atributo_misc: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
if (#showing._ActorTable < 1) then --> não há barras para mostrar
return _detalhes:EsconderBarrasNaoUsadas (instancia, showing)
end
@@ -340,6 +381,8 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
keyName = "dead"
elseif (sub_atributo == 6) then --> DEFENSIVE COOLDOWNS
keyName = "cooldowns_defensive"
elseif (sub_atributo == 7) then --> BUFF UPTIME
keyName = "buff_uptime"
end
else
keyName = exportar.key
@@ -365,6 +408,8 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
keyName = "dead"
elseif (sub_atributo == 6) then --> DEFENSIVE COOLDOWNS
keyName = "cooldowns_defensive"
elseif (sub_atributo == 7) then --> BUFF UPTIME
keyName = "buff_uptime"
end
end
@@ -445,7 +490,8 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
_table_sort (conteudo, _detalhes.SortGroupIfHaveKey)
for index, player in _ipairs (conteudo) do
if (_bit_band (player.flag, DFLAG_player_group) >= 0x101) then --> é um player e esta em grupo
--if (_bit_band (player.flag, DFLAG_player_group) >= 0x101) then --> é um player e esta em grupo
if (player.grupo) then --> é um player e esta em grupo
if (not player[keyName] or player[keyName] < 1) then --> dano menor que 1, interromper o loop
amount = index - 1
break
@@ -470,7 +516,7 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
if (exportar) then
return total, keyName, instancia.top
end
if (amount < 1) then --> não há barras para mostrar
instancia:EsconderScrollBar() --> precisaria esconder a scroll bar
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh
@@ -741,6 +787,8 @@ function atributo_misc:ToolTip (instancia, numero, barra)
return self:ToolTipDead (instancia, numero, barra)
elseif (instancia.sub_atributo == 6) then --> defensive cooldowns
return self:ToolTipDefensiveCooldowns (instancia, numero, barra)
elseif (instancia.sub_atributo == 7) then --> buff uptime
return self:ToolTipBuffUptime (instancia, numero, barra)
end
end
--> tooltip locals
@@ -900,6 +948,142 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
return true
end
function _detalhes:CatchRaidBuffUptime (in_or_out)
if (_IsInRaid()) then
for raidIndex = 1, _GetNumGroupMembers() do
for buffIndex = 1, 41 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("raid"..raidIndex, buffIndex, nil, "HELPFUL")
--print (name, unitCaster, "==", "raid"..raidIndex)
if (name and unitCaster == "raid"..raidIndex) then
local playerName, realmName = _UnitName ("raid"..raidIndex)
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
end
_detalhes.parser:add_buff_uptime (nil, GetTime(), _UnitGUID ("raid"..raidIndex), playerName, 0x00000417, _UnitGUID ("raid"..raidIndex), playerName, 0x00000417, spellid, name, in_or_out)
else
--break
end
end
end
for buffIndex = 1, 41 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster == "player") then
local playerName = _UnitName ("player")
_detalhes.parser:add_buff_uptime (nil, GetTime(), _UnitGUID ("player"), playerName, 0x00000417, _UnitGUID ("player"), playerName, 0x00000417, spellid, name, in_or_out)
else
break
end
end
elseif (_IsInGroup()) then
for groupIndex = 1, _GetNumGroupMembers()-1 do
for buffIndex = 1, 41 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("party"..groupIndex, buffIndex, nil, "HELPFUL")
if (name and unitCaster == "party"..groupIndex) then
local playerName, realmName = _UnitName ("party"..groupIndex)
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
end
_detalhes.parser:add_buff_uptime (nil, GetTime(), _UnitGUID ("party"..groupIndex), playerName, 0x00000417, _UnitGUID ("party"..groupIndex), playerName, 0x00000417, spellid, name, in_or_out)
else
--break
end
end
end
for buffIndex = 1, 41 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster == "player") then
local playerName = _UnitName ("player")
_detalhes.parser:add_buff_uptime (nil, GetTime(), _UnitGUID ("player"), playerName, 0x00000417, _UnitGUID ("player"), playerName, 0x00000417, spellid, name, in_or_out)
else
break
end
end
else
for buffIndex = 1, 41 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster == "player") then
local playerName = _UnitName ("player")
_detalhes.parser:add_buff_uptime (nil, GetTime(), _UnitGUID ("player"), playerName, 0x00000417, _UnitGUID ("player"), playerName, 0x00000417, spellid, name, in_or_out)
else
break
end
end
end
end
local Sort2Reverse = function (a, b)
return a[2] < b[2]
end
function atributo_misc:ToolTipBuffUptime (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 ["buff_uptime"]
local minha_tabela = self.buff_uptime_spell_tables._ActorTable
--> habilidade usada para interromper
local buffs_usados = {}
local _combat_time = instancia.showing:GetCombatTime()
for _spellid, _tabela in _pairs (minha_tabela) do
buffs_usados [#buffs_usados+1] = {_spellid, _tabela.uptime}
end
--_table_sort (buffs_usados, Sort2Reverse)
_table_sort (buffs_usados, _detalhes.Sort2)
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Warrior_Safeguard]], 1, 1, 14, 14, 0.9375, 0.078125, 0.078125, 0.953125)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (#buffs_usados > 0) then
for i = 1, _math_min (30, #buffs_usados) do
local esta_habilidade = buffs_usados[i]
if (esta_habilidade[2] > 0) then
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
local minutos, segundos = _math_floor (esta_habilidade[2]/60), _math_floor (esta_habilidade[2]%60)
if (esta_habilidade[2] >= _combat_time) then
GameCooltip:AddLine (nome_magia..": ", minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)", nil, "gray", "gray")
GameCooltip:AddStatusBar (100, nil, 1, 0, 1, .3, false)
elseif (minutos > 0) then
GameCooltip:AddLine (nome_magia..": ", minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)")
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
else
GameCooltip:AddLine (nome_magia..": ", segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)")
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
end
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14) --0.03125, 0.96875, 0.03125, 0.96875
end
end
else
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
end
return true
end
function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
local owner = self.owner
@@ -1590,6 +1774,51 @@ atributo_misc.__add = function (shadow, tabela2)
end
if (tabela2.buff_uptime) then
if (not shadow.buff_uptime) then
shadow.buff_uptime = 0
shadow.buff_uptime_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.buff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas
end
shadow.buff_uptime = shadow.buff_uptime + tabela2.buff_uptime
if ( not (shadow.shadow and tabela2.shadow) ) then
--_detalhes.tabela_overall.totals[4]["cooldowns_defensive"] = _detalhes.tabela_overall.totals[4]["cooldowns_defensive"] + tabela2.cooldowns_defensive
--if (tabela2.grupo) then
-- _detalhes.tabela_overall.totals_grupo[4]["cooldowns_defensive"] = _detalhes.tabela_overall.totals_grupo[4]["cooldowns_defensive"] + tabela2.cooldowns_defensive
--end
end
for index, alvo in _ipairs (tabela2.buff_uptime_targets._ActorTable) do
local alvo_shadow = shadow.buff_uptime_targets:PegarCombatente (alvo.serial, alvo.nome, alvo.flag_original, true)
alvo_shadow.total = alvo_shadow.total + alvo.total
end
for spellid, habilidade in _pairs (tabela2.buff_uptime_spell_tables._ActorTable) do
local habilidade_shadow = shadow.buff_uptime_spell_tables:PegaHabilidade (spellid, true, nil, true)
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
local alvo_shadow = habilidade_shadow.targets:PegarCombatente (alvo.serial, alvo.nome, alvo.flag_original, true)
alvo_shadow.total = alvo_shadow.total + alvo.total
end
for key, value in _pairs (habilidade) do
if (_type (value) == "number") then
if (key ~= "id") then
if (not habilidade_shadow [key]) then
habilidade_shadow [key] = 0
end
habilidade_shadow [key] = habilidade_shadow [key] + value
end
end
end
end
end
if (tabela2.cooldowns_defensive) then
if (not shadow.cooldowns_defensive) then
@@ -1811,6 +2040,11 @@ atributo_misc.__sub = function (tabela1, tabela2)
tabela1.interrompeu_oque [spellid] = tabela1.interrompeu_oque [spellid] - amt
end
end
if (tabela1.buff_uptime and tabela2.buff_uptime) then
tabela1.buff_uptime = tabela1.buff_uptime - tabela2.buff_uptime
end
if (tabela1.cooldowns_defensive and tabela2.cooldowns_defensive) then
tabela1.cooldowns_defensive = tabela1.cooldowns_defensive - tabela2.cooldowns_defensive
end
@@ -1821,10 +2055,12 @@ atributo_misc.__sub = function (tabela1, tabela2)
if (tabela1.dispell and tabela2.dispell) then
tabela1.dispell = tabela1.dispell - tabela2.dispell
-- precisaria diminuir o que foi dispelado
end
if (tabela1.cc_break and tabela2.cc_break) then
tabela1.cc_break = tabela1.cc_break - tabela2.cc_break
-- precisaria diminuir o que foi quebrado
end
return tabela1
+91 -14
View File
@@ -18,13 +18,15 @@ local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
function habilidade_misc:NovaTabela (id, link, token) --aqui eu não sei que parâmetros passar
local _newMiscSpell = {
id = id,
counter = 0,
targets = container_combatentes:NovoContainer (container_misc_target)
}
if (token == "SPELL_INTERRUPT") then
if (token == "BUFF_UPTIME") then
_newMiscSpell.uptime = 0
_newMiscSpell.actived = false
elseif (token == "SPELL_INTERRUPT") then
_newMiscSpell.interrompeu_oque = {}
elseif (token == "SPELL_DISPEL" or token == "SPELL_STOLEN") then
_newMiscSpell.dispell_oque = {}
@@ -43,20 +45,52 @@ end
function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spellName)
--local alvo = self.targets:PegarCombatente (serial, nome, flag, true)
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
alvo.total = alvo.total + 1
--alvo:AddQuantidade (1)
if (spellID == "BUFF") then
if (spellName == "COOLDOWN") then
self.counter = self.counter + 1
--alvo
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
alvo.total = alvo.total + 1
elseif (spellName == "BUFF_UPTIME_IN") then
self.actived = true
self.actived_at = _detalhes._tempo
--print ("in",self.uptime)
elseif (spellName == "BUFF_UPTIME_REFRESH") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
token.buff_uptime = token.buff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object
end
self.actived_at = _detalhes._tempo
self.actived = true
if (self.shadow) then
return self.shadow:Add (serial, nome, flag, who_nome, token.shadow, spellID, spellName)
end
--print ("refresh",self.uptime)
elseif (spellName == "BUFF_UPTIME_OUT") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
token.buff_uptime = token.buff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object
end
self.actived = false
self.actived_at = nil
if (self.shadow) then
return self.shadow:Add (serial, nome, flag, who_nome, token.shadow, spellID, spellName)
end
--print ("out",self.uptime)
end
elseif (token == "SPELL_INTERRUPT") then
@@ -67,6 +101,15 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel
else
self.interrompeu_oque [spellID] = self.interrompeu_oque [spellID] + 1
end
--alvo
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
alvo.total = alvo.total + 1
elseif (token == "SPELL_RESURRECT") then
if (not self.ress) then
@@ -75,6 +118,16 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel
self.ress = self.ress + 1
end
--alvo
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
alvo.total = alvo.total + 1
elseif (token == "SPELL_DISPEL" or token == "SPELL_STOLEN") then
if (not self.dispell) then
self.dispell = 1
@@ -87,6 +140,16 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel
else
self.dispell_oque [spellID] = self.dispell_oque [spellID] + 1
end
--alvo
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
alvo.total = alvo.total + 1
elseif (token == "SPELL_AURA_BROKEN_SPELL" or token == "SPELL_AURA_BROKEN") then
@@ -101,6 +164,15 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel
else
self.cc_break_oque [spellID] = self.cc_break_oque [spellID] + 1
end
--alvo
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
alvo.total = alvo.total + 1
end
if (self.shadow) then
@@ -131,9 +203,14 @@ end
habilidade_misc.__sub = function (tabela1, tabela2)
--interrupts
--interrupts & cooldowns
tabela1.counter = tabela1.counter - tabela2.counter
--buff uptime
if (tabela1.uptime and tabela2.uptime) then
tabela1.uptime = tabela1.uptime - tabela2.uptime
end
--ressesrs
if (tabela1.ress and tabela2.ress) then
tabela1.ress = tabela1.ress - tabela2.ress
@@ -148,6 +225,6 @@ habilidade_misc.__sub = function (tabela1, tabela2)
if (tabela1.cc_break and tabela2.cc_break) then
tabela1.cc_break = tabela1.cc_break - tabela2.cc_break
end
return tabela1
end
+4 -1
View File
@@ -138,9 +138,12 @@ local read_flag_ = function (novo_objeto, shadow_objeto, dono_do_pet, serial, fl
end
end
if (_bit_band (flag, EM_GRUPO) ~= 0) then --> faz parte do grupo
if (_bit_band (flag, EM_GRUPO) ~= 0 and novo_objeto.classe ~= "UNGROUPPLAYER") then --> faz parte do grupo
details_flag = details_flag+0x00000100
novo_objeto.grupo = true
--if (nome:find ("[*]")) then
-- print ("Objeto em grupo:", nome, "flag:", flag, "classe:", novo_objeto.classe)
--end
if (shadow_objeto) then
shadow_objeto.grupo = true
end
+39 -9
View File
@@ -47,6 +47,10 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
end
dono_nome = nome
if (nome:find ("Unknown")) then
--print ("owner name with Unknown: ", nome)
end
--print ("Dono encontrado na raide",nome,realm)
end
end
@@ -63,6 +67,7 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
--print ("tem realm: ", realm)
nome = nome.."-"..realm
end
dono_nome = nome
--print ("Dono encontrado na party",nome,realm)
--print ("DEBUG Dono encontrado na party")
@@ -107,12 +112,18 @@ function container_pets:BuscarPets()
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
local nome, realm = _UnitName ("raid"..i)
if (realm and realm ~= "") then
nome = nome.."-"..realm
--print ("tem realm: ", realm, nome)
if (nome == "Unknown Entity") then
_detalhes:SchedulePetUpdate (1)
--print ("unknown owner name, rescheduling...")
else
if (realm and realm ~= "") then
nome = nome.."-"..realm
--print ("tem realm: ", realm, nome)
end
--print ("pet found: ", nome)
--print ("bp dono encontrado na raide:",nome, realm)
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("raidpet"..i), 2600, _UnitGUID ("raid"..i), nome, 0x514, true)
end
--print ("bp dono encontrado na raide:",nome, realm)
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("raidpet"..i), 2600, _UnitGUID ("raid"..i), nome, 0x514, true)
end
end
end
@@ -122,11 +133,17 @@ function container_pets:BuscarPets()
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
local nome, realm = _UnitName ("party"..i)
if (realm and realm ~= "") then
nome = nome.."-"..realm
if (nome == "Unknown Entity") then
_detalhes:SchedulePetUpdate (1)
--print ("unknown owner name, rescheduling...")
else
if (realm and realm ~= "") then
nome = nome.."-"..realm
end
--print ("pet found: ", nome)
--print ("bp dono encontrado no grupo:",nome, realm)
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("partypet"..i), 2600, _UnitGUID ("party"..i), nome, 0x514)
end
--print ("bp dono encontrado no grupo:",nome, realm)
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("partypet"..i), 2600, _UnitGUID ("party"..i), nome, 0x514)
end
end
end
@@ -148,6 +165,19 @@ function container_pets:Adicionar (pet_serial, pet_nome, pet_flags, dono_serial,
end
local have_schedule = false
function _detalhes:UpdatePets()
have_schedule = false
return container_pets:BuscarPets()
end
function _detalhes:SchedulePetUpdate (seconds)
if (have_schedule) then
return
end
have_schedule = true
_detalhes:ScheduleTimer ("UpdatePets", seconds or 5)
end
function _detalhes.refresh:r_container_pets (container)
_setmetatable (container, container_pets)
--container.__index = container_pets
+6 -1
View File
@@ -274,9 +274,12 @@
end
end
_detalhes:CatchRaidBuffUptime ("BUFF_UPTIME_IN")
_detalhes:UptadeRaidMembersCache()
_detalhes:HaveOneCurrentInstance()
_detalhes:SendEvent ("COMBAT_PLAYER_ENTER", nil, _detalhes.tabela_vigente)
_detalhes:HaveOneCurrentInstance()
end
function _detalhes:SairDoCombate (bossKilled)
@@ -285,6 +288,8 @@
_detalhes:Msg ("(debug) ended a combat.")
end
_detalhes:CatchRaidBuffUptime ("BUFF_UPTIME_OUT")
--> pega a zona do jogador e vê se foi uma luta contra um Boss -- identifica se a luta foi com um boss
if (not _detalhes.tabela_vigente.is_boss) then
_detalhes.tabela_vigente.is_boss = _detalhes:FindBoss()
+44
View File
@@ -117,6 +117,7 @@
_combate.totals_grupo [_actor.tipo] ["dead"] = _combate.totals_grupo [_actor.tipo] ["dead"] - _actor.dead
end
end
--buff uptime não precisa
end
end
@@ -259,6 +260,14 @@
end
end
if (esta_classe.buff_uptime) then
if (not shadow.buff_uptime_spell_targets) then
shadow.buff_uptime = 0
shadow.buff_uptime_spell_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.buff_uptime_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper
end
end
if (esta_classe.interrupt) then
if (not shadow.interrupt_targets) then
shadow.interrupt = 0
@@ -302,6 +311,11 @@
_detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.interrupt_targets)
end
end
if (esta_classe.buff_uptime) then
for _, este_alvo in _ipairs (esta_classe.buff_uptime_targets._ActorTable) do
_detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.buff_uptime_targets)
end
end
if (esta_classe.cooldowns_defensive) then
for _, este_alvo in _ipairs (esta_classe.cooldowns_defensive_targets._ActorTable) do
_detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.cooldowns_defensive_targets)
@@ -354,6 +368,17 @@
end
end
end
if (esta_classe.buff_uptime) then
for _, habilidade in _pairs (esta_classe.buff_uptime_spell_tables._ActorTable) do
_detalhes.refresh:r_habilidade_misc (habilidade, shadow.buff_uptime_spell_tables)
for _, este_alvo in _ipairs (habilidade.targets._ActorTable) do
_detalhes.refresh:r_alvo_da_habilidade (este_alvo, habilidade.targets.shadow)
end
end
end
if (esta_classe.cooldowns_defensive) then
for _, habilidade in _pairs (esta_classe.cooldowns_defensive_spell_tables._ActorTable) do
_detalhes.refresh:r_habilidade_misc (habilidade, shadow.cooldowns_defensive_spell_tables)
@@ -538,6 +563,7 @@
_combate.totals_grupo [myself.tipo] ["ress"] = _combate.totals_grupo [myself.tipo] ["ress"] - myself.ress
end
end
--> não precisa diminuir o total dos buffs e debuffs
if (myself.cooldowns_defensive) then
_combate.totals [myself.tipo] ["cooldowns_defensive"] = _combate.totals [myself.tipo] ["cooldowns_defensive"] - myself.cooldowns_defensive
if (myself.grupo) then
@@ -600,6 +626,13 @@
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
if (esta_classe.buff_uptime) then
for _, _alvo in _ipairs (esta_classe.buff_uptime_targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
if (esta_classe.cooldowns_defensive) then
for _, _alvo in _ipairs (esta_classe.cooldowns_defensive_targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
@@ -653,6 +686,17 @@
end
end
end
if (esta_classe.buff_uptime) then
for _, habilidade in _pairs (esta_classe.buff_uptime_spell_tables._ActorTable) do
_detalhes.clear:c_habilidade_misc (habilidade)
for _, _alvo in ipairs (habilidade.targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
end
if (esta_classe.cooldowns_defensive) then
for _, habilidade in _pairs (esta_classe.cooldowns_defensive_spell_tables._ActorTable) do
_detalhes.clear:c_habilidade_misc (habilidade)
+376 -188
View File
@@ -16,7 +16,11 @@
local _UnitHealth = UnitHealth --wow api local
local _UnitHealthMax = UnitHealthMax --wow api local
local _UnitIsFeignDeath = UnitIsFeignDeath --wow api local
local _UnitGUID = UnitGUID
local _GetInstanceInfo = GetInstanceInfo --wow api local
local _IsInRaid = IsInRaid --wow api local
local _IsInGroup = IsInGroup --wow api local
local _GetNumGroupMembers = GetNumGroupMembers --wow api local
local _cstr = string.format --lua local
local _table_insert = table.insert --lua local
@@ -29,6 +33,7 @@
local _table_sort = table.sort --lua local
local _type = type --lua local
local _math_ceil = math.ceil --lua local
local _table_wipe = table.wipe
local escudo = _detalhes.escudos --details local
local parser = _detalhes.parser --details local
@@ -73,6 +78,8 @@
local energy_cache = setmetatable ({}, _detalhes.weaktable)
--> misc
local misc_cache = setmetatable ({}, _detalhes.weaktable)
--> party & raid members
local raid_members_cache = setmetatable ({}, _detalhes.weaktable)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
@@ -88,7 +95,9 @@
--> recording data options shortcuts
local _recording_self_buffs = false
local _recording_ability_with_buffs = false
local _recording_took_damage = false
--local _recording_took_damage = false
local _recording_healing = false
local _recording_buffs_and_debuffs = false
--> in combat shortcut
local _in_combat = false
@@ -135,7 +144,16 @@
--> no actor name, use spell name instead
who_name = "[*] "..spellname
end
--[[
if (who_name:find ("[*]")) then
print ("Objeto [*]:", who_name, "flag:", who_flags)
if (_bit_band (who_flags, AFFILIATION_GROUP) ~= 0) then
print ("A flag ja veio com grupo")
end
end
--]]
------------------------------------------------------------------------------------------------
--> check if need start an combat
@@ -164,18 +182,7 @@
local jogador_alvo, alvo_dono, alvo_name = _current_damage_container:PegarCombatente (alvo_serial, alvo_name, alvo_flags, true)
--]]
--[
--[[
if (who_name:find ("Lyl")) then
if (who_name:find ("-")) then
print ("nome com -", isOwner)
else
--print ("nome okey", isOwner)
end
end
--]]
--> damager
local este_jogador, meu_dono = damage_cache [who_name] or damage_cache_pets [who_serial], damage_cache_petsOwners [who_serial]
@@ -319,7 +326,8 @@
------------------------------------------------------------------------------------------------
--> firendly fire
if (_bit_band (who_flags, REACTION_FRIENDLY) ~= 0 and _bit_band (alvo_flags, REACTION_FRIENDLY) ~= 0) then
--if (_bit_band (who_flags, REACTION_FRIENDLY) ~= 0 and _bit_band (alvo_flags, REACTION_FRIENDLY) ~= 0) then
if (raid_members_cache [who_serial] and raid_members_cache [alvo_serial]) then
--> investigation about mind control and reaction switch done
--> details will do count mind control and reaction switch as normal damage.
@@ -357,6 +365,14 @@
if (meu_dono) then --> se for dano de um Pet
meu_dono.total = meu_dono.total + amount --> e adiciona o dano ao pet
meu_dono.shadow.total = meu_dono.shadow.total + amount --> e adiciona o dano ao pet
local owner_target = meu_dono.targets._NameIndexTable [alvo_name]
if (not owner_target) then
owner_target = meu_dono.targets:PegarCombatente (alvo_serial, alvo_name, alvo_flags, true) --retorna o objeto classe_target -> ALVO_DA_HABILIDADE:NovaTabela()
else
owner_target = meu_dono.targets._ActorTable [owner_target]
end
owner_target.total = owner_target.total + amount
end
--> actor
@@ -639,8 +655,17 @@
--> pet
if (meu_dono) then
meu_dono.total = meu_dono.total + cura_efetiva --> e adiciona o dano ao pet
meu_dono.shadow.total = meu_dono.shadow.total + cura_efetiva --> e adiciona o dano ao pet
meu_dono.total = meu_dono.total + cura_efetiva --> heal do pet
meu_dono.shadow.total = meu_dono.shadow.total + cura_efetiva --> heal do pet na shadow
local owner_target = meu_dono.targets._NameIndexTable [alvo_name]
if (not owner_target) then
owner_target = meu_dono.targets:PegarCombatente (alvo_serial, alvo_name, alvo_flags, true) --retorna o objeto classe_target -> ALVO_DA_HABILIDADE:NovaTabela()
else
owner_target = meu_dono.targets._ActorTable [owner_target]
end
owner_target.total = owner_target.total + amount
end
--> target amount
@@ -672,8 +697,6 @@
end
end
-----------------------------------------------------------------------------------------------------------------------------------------
--> BUFFS & DEBUFFS serach key: ~buff ~aura ~shield |
-----------------------------------------------------------------------------------------------------------------------------------------
@@ -691,106 +714,119 @@
--> handle shields
if (tipo == "BUFF") then
if (absorb_spell_list [spellid] and amount) then
if (not escudo [alvo_name]) then
escudo [alvo_name] = {}
escudo [alvo_name] [spellid] = {}
escudo [alvo_name] [spellid] [who_name] = amount
elseif (not escudo [alvo_name] [spellid]) then
escudo [alvo_name] [spellid] = {}
escudo [alvo_name] [spellid] [who_name] = amount
else
escudo [alvo_name] [spellid] [who_name] = amount
end
elseif (defensive_cooldown_spell_list [spellid]) then
--> usou cooldown
return parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname)
------------------------------------------------------------------------------------------------
--> recording buffs
elseif (_recording_self_buffs) then
--> or alvo_name needded, seems jade spirit not send who_name correctly
if (who_name == _detalhes.playername or alvo_name == _detalhes.playername) then
local bufftable = _detalhes.Buffs.BuffsTable [spellname]
if (bufftable) then
return bufftable:UpdateBuff ("new")
else
return false
------------------------------------------------------------------------------------------------
--> buff uptime
if (_recording_buffs_and_debuffs) then
if (who_name == alvo_name and raid_members_cache [who_serial] and _in_combat) then
--> call record buffs uptime
--[[not tail call, need to fix this]] parser:add_buff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_IN")
end
end
------------------------------------------------------------------------------------------------
--> healing done absorbs
if (absorb_spell_list [spellid] and _recording_healing and amount) then
if (not escudo [alvo_name]) then
escudo [alvo_name] = {}
escudo [alvo_name] [spellid] = {}
escudo [alvo_name] [spellid] [who_name] = amount
elseif (not escudo [alvo_name] [spellid]) then
escudo [alvo_name] [spellid] = {}
escudo [alvo_name] [spellid] [who_name] = amount
else
escudo [alvo_name] [spellid] [who_name] = amount
end
------------------------------------------------------------------------------------------------
--> defensive cooldowns
elseif (defensive_cooldown_spell_list [spellid]) then
--> usou cooldown
return parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname)
--else
--> record buff uptime
------------------------------------------------------------------------------------------------
--> recording buffs
elseif (_recording_self_buffs) then
--> or alvo_name needded, seems jade spirit not send who_name correctly
if (who_name == _detalhes.playername or alvo_name == _detalhes.playername) then
local bufftable = _detalhes.Buffs.BuffsTable [spellname]
if (bufftable) then
return bufftable:UpdateBuff ("new")
else
return false
end
end
end
------------------------------------------------------------------------------------------------
--> recording debuffs applied by player
elseif (tipo == "DEBUFF") then
if (_recording_ability_with_buffs and _in_combat) then
if (who_name == _detalhes.playername) then
if (_in_combat) then
if (_recording_ability_with_buffs) then
if (who_name == _detalhes.playername) then
--> record debuff uptime
local SoloDebuffUptime = _current_combat.SoloDebuffUptime
if (not SoloDebuffUptime) then
SoloDebuffUptime = {}
_current_combat.SoloDebuffUptime = SoloDebuffUptime
end
local ThisDebuff = SoloDebuffUptime [spellid]
if (not ThisDebuff) then
ThisDebuff = {name = spellname, duration = 0, start = _tempo, castedAmt = 1, refreshAmt = 0, droppedAmt = 0, Active = true}
SoloDebuffUptime [spellid] = ThisDebuff
else
ThisDebuff.castedAmt = ThisDebuff.castedAmt + 1
ThisDebuff.start = _tempo
ThisDebuff.Active = true
end
--> record debuff spell and attack power
local SoloDebuffPower = _current_combat.SoloDebuffPower
if (not SoloDebuffPower) then
SoloDebuffPower = {}
_current_combat.SoloDebuffPower = SoloDebuffPower
end
local ThisDebuff = SoloDebuffPower [spellid]
if (not ThisDebuff) then
ThisDebuff = {}
SoloDebuffPower [spellid] = ThisDebuff
end
local ThisDebuffOnTarget = ThisDebuff [alvo_serial]
local base, posBuff, negBuff = UnitAttackPower ("player")
local AttackPower = base+posBuff+negBuff
local base, posBuff, negBuff = UnitRangedAttackPower ("player")
local RangedAttackPower = base+posBuff+negBuff
local SpellPower = GetSpellBonusDamage (3)
--> record buffs active on player when the debuff was applied
local BuffsOn = {}
for BuffName, BuffTable in _pairs (_detalhes.Buffs.BuffsTable) do
if (BuffTable.active) then
BuffsOn [#BuffsOn+1] = BuffName
--> record debuff uptime
local SoloDebuffUptime = _current_combat.SoloDebuffUptime
if (not SoloDebuffUptime) then
SoloDebuffUptime = {}
_current_combat.SoloDebuffUptime = SoloDebuffUptime
end
local ThisDebuff = SoloDebuffUptime [spellid]
if (not ThisDebuff) then
ThisDebuff = {name = spellname, duration = 0, start = _tempo, castedAmt = 1, refreshAmt = 0, droppedAmt = 0, Active = true}
SoloDebuffUptime [spellid] = ThisDebuff
else
ThisDebuff.castedAmt = ThisDebuff.castedAmt + 1
ThisDebuff.start = _tempo
ThisDebuff.Active = true
end
--> record debuff spell and attack power
local SoloDebuffPower = _current_combat.SoloDebuffPower
if (not SoloDebuffPower) then
SoloDebuffPower = {}
_current_combat.SoloDebuffPower = SoloDebuffPower
end
local ThisDebuff = SoloDebuffPower [spellid]
if (not ThisDebuff) then
ThisDebuff = {}
SoloDebuffPower [spellid] = ThisDebuff
end
local ThisDebuffOnTarget = ThisDebuff [alvo_serial]
local base, posBuff, negBuff = UnitAttackPower ("player")
local AttackPower = base+posBuff+negBuff
local base, posBuff, negBuff = UnitRangedAttackPower ("player")
local RangedAttackPower = base+posBuff+negBuff
local SpellPower = GetSpellBonusDamage (3)
--> record buffs active on player when the debuff was applied
local BuffsOn = {}
for BuffName, BuffTable in _pairs (_detalhes.Buffs.BuffsTable) do
if (BuffTable.active) then
BuffsOn [#BuffsOn+1] = BuffName
end
end
if (not ThisDebuffOnTarget) then --> apply
ThisDebuff [alvo_serial] = {power = math.max (AttackPower, RangedAttackPower, SpellPower), onTarget = true, buffs = BuffsOn}
else --> re applying
ThisDebuff [alvo_serial].power = math.max (AttackPower, RangedAttackPower, SpellPower)
ThisDebuff [alvo_serial].buffs = BuffsOn
ThisDebuff [alvo_serial].onTarget = true
end
--> send event for plugins
_detalhes:SendEvent ("BUFF_UPDATE_DEBUFFPOWER")
end
if (not ThisDebuffOnTarget) then --> apply
ThisDebuff [alvo_serial] = {power = math.max (AttackPower, RangedAttackPower, SpellPower), onTarget = true, buffs = BuffsOn}
else --> re applying
ThisDebuff [alvo_serial].power = math.max (AttackPower, RangedAttackPower, SpellPower)
ThisDebuff [alvo_serial].buffs = BuffsOn
ThisDebuff [alvo_serial].onTarget = true
end
--> send event for plugins
_detalhes:SendEvent ("BUFF_UPDATE_DEBUFFPOWER")
end
end
end
@@ -802,37 +838,55 @@
--> handle shields
if (tipo == "BUFF") then
if (absorb_spell_list [spellid] and amount) then
if (escudo [alvo_name] and escudo [alvo_name][spellid] and escudo [alvo_name][spellid][who_name]) then
--print ("refresh", escudo [alvo_name][spellid][who_name], amount)
local absorb = escudo [alvo_name][spellid][who_name] - amount
local overheal = amount - absorb
escudo [alvo_name][spellid][who_name] = amount
--if (absorb > 0) then
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, nil, _math_ceil (absorb), _math_ceil (overheal), 0, 0, true)
--end
else
--> should apply aura if not found in already applied buff list?
end
------------------------------------------------------------------------------------------------
--> recording buffs
elseif (_recording_self_buffs) then
if (who_name == _detalhes.playername or alvo_name == _detalhes.playername) then --> foi colocado pelo player
local bufftable = _detalhes.Buffs.BuffsTable [spellname]
if (bufftable) then
return bufftable:UpdateBuff ("refresh")
else
return false
------------------------------------------------------------------------------------------------
--> buff uptime
if (_recording_buffs_and_debuffs) then
if (who_name == alvo_name and raid_members_cache [who_serial] and _in_combat) then
--> call record buffs uptime
--[[not tail call, need to fix this]] parser:add_buff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_REFRESH")
end
end
------------------------------------------------------------------------------------------------
--> healing done (shields)
if (absorb_spell_list [spellid] and _recording_healing and amount) then
if (escudo [alvo_name] and escudo [alvo_name][spellid] and escudo [alvo_name][spellid][who_name]) then
--print ("refresh", escudo [alvo_name][spellid][who_name], amount)
local absorb = escudo [alvo_name][spellid][who_name] - amount
local overheal = amount - absorb
escudo [alvo_name][spellid][who_name] = amount
--if (absorb > 0) then
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, nil, _math_ceil (absorb), _math_ceil (overheal), 0, 0, true)
--end
else
--> should apply aura if not found in already applied buff list?
end
------------------------------------------------------------------------------------------------
--> defensive cooldowns
elseif (defensive_cooldown_spell_list [spellid]) then
--> usou cooldown
return parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname)
------------------------------------------------------------------------------------------------
--> recording buffs
elseif (_recording_self_buffs) then
if (who_name == _detalhes.playername or alvo_name == _detalhes.playername) then --> foi colocado pelo player
local bufftable = _detalhes.Buffs.BuffsTable [spellname]
if (bufftable) then
return bufftable:UpdateBuff ("refresh")
else
return false
end
end
end
end
------------------------------------------------------------------------------------------------
--> recording debuffs applied by player
@@ -895,46 +949,53 @@
--> handle shields
if (tipo == "BUFF") then
if (absorb_spell_list [spellid]) then
if (escudo [alvo_name] and escudo [alvo_name][spellid] and escudo [alvo_name][spellid][who_name]) then
if (amount) then
-- o amount é o que sobrou do escudo
local escudo_antigo = escudo [alvo_name][spellid][who_name] --> quantidade total do escudo que foi colocado
--print (escudo_antigo, amount)
--if (escudo_antigo and escudo_antigo > amount) then
local absorb = escudo_antigo - amount
local overheal = escudo_antigo - absorb
escudo [alvo_name][spellid][who_name] = nil
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, nil, _math_ceil (absorb), _math_ceil (overheal), 0, 0, true) --> último parametro IS_SHIELD
--end
------------------------------------------------------------------------------------------------
--> buff uptime
if (_recording_buffs_and_debuffs) then
if (who_name == alvo_name and raid_members_cache [who_serial] and _in_combat) then
--> call record buffs uptime
--[[not tail call, need to fix this]] parser:add_buff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_OUT")
end
escudo [alvo_name][spellid][who_name] = nil
end
------------------------------------------------------------------------------------------------
--> healing done (shields)
if (absorb_spell_list [spellid] and _recording_healing) then
if (escudo [alvo_name] and escudo [alvo_name][spellid] and escudo [alvo_name][spellid][who_name]) then
if (amount) then
-- o amount é o que sobrou do escudo
local escudo_antigo = escudo [alvo_name][spellid][who_name] --> quantidade total do escudo que foi colocado
--print (escudo_antigo, amount)
--if (escudo_antigo and escudo_antigo > amount) then
local absorb = escudo_antigo - amount
local overheal = escudo_antigo - absorb
escudo [alvo_name][spellid][who_name] = nil
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, nil, _math_ceil (absorb), _math_ceil (overheal), 0, 0, true) --> último parametro IS_SHIELD
end
escudo [alvo_name][spellid][who_name] = nil
end
--end
------------------------------------------------------------------------------------------------
--> recording buffs
elseif (_recording_self_buffs) then
if (who_name == _detalhes.playername or alvo_name == _detalhes.playername) then --> foi colocado pelo player
local bufftable = _detalhes.Buffs.BuffsTable [spellname]
if (bufftable) then
return bufftable:UpdateBuff ("remove")
else
return false
------------------------------------------------------------------------------------------------
--> recording buffs
elseif (_recording_self_buffs) then
if (who_name == _detalhes.playername or alvo_name == _detalhes.playername) then --> foi colocado pelo player
local bufftable = _detalhes.Buffs.BuffsTable [spellname]
if (bufftable) then
return bufftable:UpdateBuff ("remove")
else
return false
end
end
end
end
end
------------------------------------------------------------------------------------------------
--> recording debuffs applied by player
elseif (tipo == "DEBUFF") then
if (_recording_ability_with_buffs and _in_combat) then
if (who_name == _detalhes.playername) then
@@ -971,7 +1032,59 @@
end
end
-----------------------------------------------------------------------------------------------------------------------------------------
--> MISC search key: ~buffuptime ~buffsuptime |
-----------------------------------------------------------------------------------------------------------------------------------------
function parser:add_buff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, in_out)
------------------------------------------------------------------------------------------------
--> early checks and fixes
_current_misc_container.need_refresh = true
_overall_misc_container.need_refresh = true
------------------------------------------------------------------------------------------------
--> get actors
local este_jogador = misc_cache [who_name]
if (not este_jogador) then --> pode ser um desconhecido ou um pet
este_jogador = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
misc_cache [who_name] = este_jogador
end
local shadow = este_jogador.shadow
------------------------------------------------------------------------------------------------
--> build containers on the fly
if (not este_jogador.buff_uptime) then
este_jogador.buff_uptime = 0
este_jogador.buff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc)
este_jogador.buff_uptime_targets = container_combatentes:NovoContainer (container_damage_target)
if (not shadow.buff_uptime_targets) then
shadow.buff_uptime = 0
shadow.buff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc)
shadow.buff_uptime_targets = container_combatentes:NovoContainer (container_damage_target)
end
este_jogador.buff_uptime_targets.shadow = shadow.buff_uptime_targets
este_jogador.buff_uptime_spell_tables.shadow = shadow.buff_uptime_spell_tables
end
------------------------------------------------------------------------------------------------
--> add amount
--> update last event
este_jogador.last_event = _tempo
--> actor spells table
local spell = este_jogador.buff_uptime_spell_tables._ActorTable [spellid]
if (not spell) then
spell = este_jogador.buff_uptime_spell_tables:PegaHabilidade (spellid, true, "BUFF_UPTIME")
end
return spell:Add (alvo_serial, alvo_name, alvo_flags, who_name, este_jogador, "BUFF", in_out)
end
-----------------------------------------------------------------------------------------------------------------------------------------
--> ENERGY serach key: ~energy |
@@ -1172,6 +1285,39 @@
if (este_jogador.grupo) then
_current_gtotal [4].cooldowns_defensive = _current_gtotal [4].cooldowns_defensive + 1
_overall_gtotal [4].cooldowns_defensive = _overall_gtotal [4].cooldowns_defensive + 1
if (who_name == alvo_name) then
local damage_actor = damage_cache [who_name]
if (not damage_actor) then --> pode ser um desconhecido ou um pet
damage_actor = _current_damage_container:PegarCombatente (who_serial, who_name, who_flags, true)
if (who_flags) then --> se não for um pet, adicionar no cache
damage_cache [who_name] = damage_actor
end
end
local t = damage_actor.last_events_table
local i = t.n
t.n = i + 1
t = t [i]
t [1] = 1 --> true if this is a damage || false for healing || 1 for cooldown?
t [2] = spellid --> spellid || false if this is a battle ress line
t [3] = 1 --> amount of damage or healing
t [4] = time --> parser time
t [5] = _UnitHealth (who_name) --> current unit heal
t [6] = who_name --> source name
i = i + 1
if (i == 9) then
damage_actor.last_events_table.n = 1
end
este_jogador.last_cooldown = {time, spellid}
end
end
--> update last event
@@ -1306,13 +1452,12 @@
function parser:spellcast (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype)
--print (token, time, "WHO:",who_serial, who_name, who_flags, "TARGET:",alvo_serial, alvo_name, alvo_flags, "SPELL:",spellid, spellname, spelltype)
--> esta dando erro onde o nome é NIL, fazendo um fix para isso
if (who_flags and _bit_band (who_flags, OBJECT_TYPE_PLAYER) ~= 0) then
if (raid_members_cache [who_serial]) then
--> check if is a cooldown :D
if (defensive_cooldown_spell_list_no_buff [spellid]) then
--> usou cooldown
if (not alvo_name) then
if (not alvo_name) then
if (defensive_cooldown_spell_list_no_buff [spellid][3] == 1) then
alvo_name = who_name
else
@@ -1919,7 +2064,27 @@
_table_remove (esta_morte, i)
end
end
if (este_jogador.last_cooldown) then
local t = {}
t [1] = 2 --> true if this is a damage || false for healing || 1 for cooldown usage || 2 for last cooldown
t [2] = este_jogador.last_cooldown[2] --> spellid || false if this is a battle ress line
t [3] = 1 --> amount of damage or healing
t [4] = este_jogador.last_cooldown[1] --> parser time
t [5] = 0 --> current unit heal
t [6] = alvo_name --> source name
esta_morte [#esta_morte+1] = t
else
local t = {}
t [1] = 2 --> true if this is a damage || false for healing || 1 for cooldown usage || 2 for last cooldown
t [2] = 0 --> spellid || false if this is a battle ress line
t [3] = 0 --> amount of damage or healing
t [4] = 0 --> parser time
t [5] = 0 --> current unit heal
t [6] = alvo_name --> source name
esta_morte [#esta_morte+1] = t
end
local decorrido = _tempo - _current_combat.start_time
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
@@ -2016,11 +2181,13 @@
elseif (capture_type == "heal") then
token_list ["SPELL_HEAL"] = nil
token_list ["SPELL_PERIODIC_HEAL"] = nil
_recording_healing = false
elseif (capture_type == "aura") then
token_list ["SPELL_AURA_APPLIED"] = nil
token_list ["SPELL_AURA_REMOVED"] = nil
token_list ["SPELL_AURA_REFRESH"] = nil
--token_list ["SPELL_AURA_APPLIED"] = nil
--token_list ["SPELL_AURA_REMOVED"] = nil
--token_list ["SPELL_AURA_REFRESH"] = nil
_recording_buffs_and_debuffs = false
elseif (capture_type == "energy") then
token_list ["SPELL_ENERGIZE"] = nil
@@ -2066,11 +2233,13 @@
elseif (capture_type == "heal") then
token_list ["SPELL_HEAL"] = parser.heal
token_list ["SPELL_PERIODIC_HEAL"] = parser.heal
_recording_healing = true
elseif (capture_type == "aura") then
token_list ["SPELL_AURA_APPLIED"] = parser.buff
token_list ["SPELL_AURA_REMOVED"] = parser.unbuff
token_list ["SPELL_AURA_REFRESH"] = parser.buff_refresh
_recording_buffs_and_debuffs = true
elseif (capture_type == "energy") then
token_list ["SPELL_ENERGIZE"] = parser.energize
@@ -2180,7 +2349,7 @@
end
end
_detalhes.container_pets:BuscarPets()
_detalhes:SchedulePetUpdate (7)
return
@@ -2198,7 +2367,8 @@
return
elseif (evento == "UNIT_PET") then
_detalhes.container_pets:BuscarPets()
--_detalhes.container_pets:BuscarPets()
_detalhes:SchedulePetUpdate (1)
elseif (evento == "PLAYER_REGEN_DISABLED") then -- Entrou em Combate
--> inicia um timer para pegar qual é a luta:
@@ -2240,13 +2410,14 @@
_detalhes.in_group = IsInGroup() or IsInRaid()
if (not _detalhes.in_group) then
_detalhes:IniciarColetaDeLixo (true)
table.wipe (_detalhes.details_users)
_table_wipe (_detalhes.details_users)
else
_detalhes:CheckDetailsUsers()
end
end
_detalhes.container_pets:BuscarPets()
--_detalhes.container_pets:BuscarPets()
_detalhes:SchedulePetUpdate (6)
return
@@ -2341,12 +2512,12 @@
--> clear cache | not sure if replacing the old table is the best approach
table.wipe (damage_cache)
table.wipe (damage_cache_pets)
table.wipe (damage_cache_petsOwners)
table.wipe (healing_cache)
table.wipe (energy_cache)
table.wipe (misc_cache)
_table_wipe (damage_cache)
_table_wipe (damage_cache_pets)
_table_wipe (damage_cache_petsOwners)
_table_wipe (healing_cache)
_table_wipe (energy_cache)
_table_wipe (misc_cache)
damage_cache = setmetatable ({}, _detalhes.weaktable)
damage_cache_pets = setmetatable ({}, _detalhes.weaktable)
@@ -2360,6 +2531,22 @@
end
function _detalhes:UptadeRaidMembersCache()
_table_wipe (raid_members_cache)
if (_IsInRaid()) then
for i = 1, _GetNumGroupMembers() do
raid_members_cache [_UnitGUID ("raid"..i)] = true
end
elseif (_IsInGroup()) then
for i = 1, _GetNumGroupMembers()-1 do
raid_members_cache [_UnitGUID ("party"..i)] = true
end
raid_members_cache [_UnitGUID ("player")] = true
else
raid_members_cache [_UnitGUID ("player")] = true
end
end
--serach key: ~cache
function _detalhes:UpdateParserGears()
@@ -2385,7 +2572,8 @@
--> refresh data capture options
_recording_self_buffs = _detalhes.RecordPlayerSelfBuffs
_recording_took_damage = _detalhes.RecordRealTimeTookDamage
--_recording_healing = _detalhes.RecordHealingDone
--_recording_took_damage = _detalhes.RecordRealTimeTookDamage
_recording_ability_with_buffs = _detalhes.RecordPlayerAbilityWithBuffs
_in_combat = _detalhes.in_combat
+7 -3
View File
@@ -30,7 +30,7 @@ do
--[[ MISC ]]
misc = 4, --> identifier
[4] = 6, --> sub attributes
[4] = 7, --> sub attributes
--[[ CUSTOM ]]
custom = 5,
@@ -130,6 +130,7 @@ do
dispell = 4,
deaths = 5,
cooldowns_defensive = 6,
buff_uptime = 7,
lista = { --[[ String Names ]]
Loc ["STRING_ATTRIBUTE_MISC_CCBREAK"],
Loc ["STRING_ATTRIBUTE_MISC_RESS"],
@@ -137,6 +138,7 @@ do
Loc ["STRING_ATTRIBUTE_MISC_DISPELL"],
Loc ["STRING_ATTRIBUTE_MISC_DEAD"],
Loc ["STRING_ATTRIBUTE_MISC_DEFENSIVE_COOLDOWNS"],
Loc ["STRING_ATTRIBUTE_MISC_BUFF_UPTIME"],
},
icones = {
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {0, .125, 0, 1}},
@@ -144,9 +146,10 @@ do
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {.25, .375, 0, 1}},
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {.375, .5, 0, 1}},
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {.5, .625, 0, 1}},
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {.625, 0.75, 0, 1}}
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {.625, 0.75, 0, 1}},
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {0.75, 0.875, 0, 1}}
},
internal = {"cc_break", "ress", "interrupt", "dispell", "dead", "cooldowns_defensive"}
internal = {"cc_break", "ress", "interrupt", "dispell", "dead", "cooldowns_defensive", "buff_uptime"}
}
}
@@ -157,6 +160,7 @@ do
function _detalhes:GetSubAttributeName (attribute, subAttribute)
if (attribute == 5) then
local CustomObject = _detalhes.custom [subAttribute]
-- ??
return CustomObject.name
end
return _detalhes.sub_atributos [attribute].lista [subAttribute]
+9 -2
View File
@@ -97,7 +97,8 @@ function _detalhes:SaveDataOnLogout()
_detalhes_database.custom = _detalhes.custom
--> version
_detalhes_database.last_realversion = _detalhes.realversion
_detalhes_database.last_realversion = _detalhes.realversion --> core number
_detalhes_database.last_version = _detalhes.userversion --> version
-- On Account
@@ -158,7 +159,9 @@ end --]]
_detalhes.tabela_pets = _detalhes_database.tabela_pets or _detalhes.container_pets:NovoContainer() -- pets
--> version
_detalhes.last_realversion = _detalhes_database.last_realversion or _detalhes.realversion
_detalhes.last_realversion = _detalhes_database.last_realversion or _detalhes.realversion --> core
_detalhes.last_version = _detalhes_database.last_version or "v1.0.0" --> version
if (_detalhes.last_realversion < _detalhes.realversion) then
--> details was been hard upgraded
_detalhes.tabela_historico = _detalhes.historico:NovoHistorico()
@@ -167,6 +170,10 @@ end --]]
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
end
if (_detalhes.last_version ~= _detalhes.userversion) then
_detalhes.is_version_first_run = true
end
--> re-build all indexes and metatables
_detalhes:RestauraMetaTables()
+41 -5
View File
@@ -69,7 +69,17 @@ function SlashCmdList.DETAILS (msg, editbox)
print (_detalhes:GetInstance (lower_instance))
_detalhes:OpenOptionsWindow (_detalhes:GetInstance (lower_instance))
end
elseif (command == Loc ["STRING_SLASH_WORLDBOSS"]) then
--local questIds = {Galleon = 32098, Sha = 32099, Oondasta = 32519, Celestials = 33117, Ordos = 33118, Nalak = 32518}
local questIds = {{"The Celestials", 33117}, {"Ordos", 33118}, {"Nalak", 32518}, {"Oondasta", 32519}, {"Salyis's Warband (Galleon)", 32098}, {"Sha of Anger", 32099}}
for _, _table in pairs (questIds) do
print (format ("%s: \124cff%s\124r", _table [1], IsQuestFlaggedCompleted (_table [2]) and "ff0000"..Loc ["STRING_KILLED"] or "00ff00"..Loc ["STRING_ALIVE"]))
end
elseif (command == Loc ["STRING_SLASH_CHANGES"]) then
_detalhes:OpenNewsWindow()
-------- debug ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -99,7 +109,7 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (msg == "raid") then
local player, realm = "Marleyieu", "Azralon"
local player, realm = "Ditador", "Azralon"
local actorName
if (realm ~= GetRealmName()) then
@@ -110,7 +120,7 @@ function SlashCmdList.DETAILS (msg, editbox)
print (actorName)
local guid = _detalhes:FindGUIDFromName ("Marleyieu")
local guid = _detalhes:FindGUIDFromName ("Ditador")
print (guid)
for i = 1, GetNumGroupMembers()-1, 1 do
@@ -234,6 +244,7 @@ function SlashCmdList.DETAILS (msg, editbox)
}
_detalhes.capture_current = _detalhes.capture_real
_detalhes:CaptureRefresh()
print (Loc ["STRING_DETAILS1"] .. "capture has been reseted.")
--> debug
elseif (msg == "opened") then
@@ -317,10 +328,33 @@ function SlashCmdList.DETAILS (msg, editbox)
--> debug
elseif (msg == "auras") then
if (IsInRaid()) then
for raidIndex = 1, GetNumGroupMembers() do
for buffIndex = 1, 41 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitAura ("raid"..raidIndex, buffIndex, nil, "HELPFUL")
print (name, unitCaster, "==", "raid"..raidIndex)
if (name and unitCaster == "raid"..raidIndex) then
local playerName, realmName = UnitName ("raid"..raidIndex)
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
end
_detalhes.parser:add_buff_uptime (nil, GetTime(), UnitGUID ("raid"..raidIndex), playerName, 0x00000417, UnitGUID ("raid"..raidIndex), playerName, 0x00000417, spellid, name, in_or_out)
else
--break
end
end
end
end
elseif (msg == "users") then
_detalhes.users = {}
_detalhes.sent_highfive = GetTime()
_detalhes:SendRaidData ("highfive")
print (Loc ["STRING_DETAILS1"] .. "highfive sent.")
elseif (command == "showusers") then
local users = _detalhes.users
@@ -392,7 +426,7 @@ function SlashCmdList.DETAILS (msg, editbox)
--> debug
elseif (msg == "save") then
print ("running...")
print ("running... this is a debug command, details wont work until next /reload.")
_detalhes:PrepareTablesForSave()
elseif (msg == "id") then
@@ -408,10 +442,10 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (msg == "debug") then
if (_detalhes.debug) then
_detalhes.debug = false
_detalhes:Msg ("diagnostic mode has been turned off.")
print (Loc ["STRING_DETAILS1"] .. "diagnostic mode has been turned off.")
else
_detalhes.debug = true
_detalhes:Msg ("diagnostic mode has been turned on.")
print (Loc ["STRING_DETAILS1"] .. "diagnostic mode has been turned on.")
end
--> debug combat log
@@ -450,6 +484,8 @@ function SlashCmdList.DETAILS (msg, editbox)
print ("|cffffaeae/details " .. Loc ["STRING_SLASH_ENABLE"] .. "|r: " .. Loc ["STRING_SLASH_ENABLE_DESC"])
print ("|cffffaeae/details " .. Loc ["STRING_SLASH_DISABLE"] .. "|r: " .. Loc ["STRING_SLASH_DISABLE_DESC"])
print ("|cffffaeae/details " .. Loc ["STRING_SLASH_OPTIONS"] .. "|r|cfffcffb0 <instance number>|r: " .. Loc ["STRING_SLASH_OPTIONS_DESC"])
print ("|cffffaeae/details " .. Loc ["STRING_SLASH_CHANGES"] .. "|r: " .. Loc ["STRING_SLASH_CHANGES_DESC"])
print ("|cffffaeae/details " .. Loc ["STRING_SLASH_WORLDBOSS"] .. "|r: " .. Loc ["STRING_SLASH_WORLDBOSS_DESC"])
print (" ")
end
+7
View File
@@ -338,6 +338,8 @@ do
--shaman
[114893] = true, --Stone Bulwark (stone bulwark totem)
[145379] = true, --Barreira da Natureza
[145378] = true, --2P T16
--paladin
[86273] = true, --Illuminated Healing (holy)
@@ -347,6 +349,10 @@ do
[116849] = true, --Life Cocoon (mistweaver)
[115295] = true, --Guard (brewmaster)
[118604] = true, --Guard (brewmaster)
[145051] = true, --Proteção de Niuzao
[145056] = true, --
[145441] = true, --2P T16
[145439] = true, --2P T16
--warlock
[6229] = true, --Twilight Ward
@@ -365,6 +371,7 @@ do
--others
[116631] = true, -- enchant "Enchant Weapon - Colossus"
[140380] = true, -- trinket "Inscribed Bag of Hydra-Spawn"
[138925] = true, -- trinket "Stolen Relic of Zuldazar"
}
+78
View File
@@ -0,0 +1,78 @@
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local g = _detalhes.gump
local _
function _detalhes:OpenNewsWindow()
local news_window = _detalhes:CreateOrOpenNewsWindow()
news_window:Title (Loc ["STRING_NEWS_TITLE"])
news_window:Text (Loc ["STRING_VERSION_LOG"])
news_window:Icon ("Interface\\CHARACTERFRAME\\TempPortrait")
news_window:Show()
end
function _detalhes:CreateOrOpenNewsWindow()
local frame = _G.DetailsNewsWindow
if (not frame) then
--> construir a janela de news
frame = CreateFrame ("frame", "DetailsNewsWindow", UIParent)
frame:SetPoint ("center", UIParent, "center")
frame:SetFrameStrata ("HIGH")
frame:SetMovable (true)
frame:SetWidth (512)
frame:SetHeight (512)
tinsert (UISpecialFrames, "DetailsNewsWindow")
frame:SetScript ("OnMouseDown", function() frame:StartMoving() end)
frame:SetScript ("OnMouseUp", function() frame:StopMovingOrSizing() end)
--> fundo
local fundo = frame:CreateTexture (nil, "border")
fundo:SetTexture ("Interface\\Addons\\Details\\images\\whatsnew")
fundo:SetAllPoints (frame)
--> fechar
local close = CreateFrame ("Button", "DetailsNewsWindowClose", frame, "UIPanelCloseButton")
close:SetWidth (32)
close:SetHeight (32)
close:SetPoint ("bottomright", frame, "topright", 3, -40)
close:SetScript ("OnClick", function() frame:Hide() end)
--> avatar
local avatar = frame:CreateTexture (nil, "background")
avatar:SetPoint ("topleft", frame, "topleft", 5, -5)
--> titulo
local titulo = _detalhes.gump:NewLabel (frame, nil, "$parentTitle", nil, "", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
titulo:SetPoint ("center", frame, "center")
titulo:SetPoint ("top", frame, "top", 0, -18)
--> text box
local texto = frame:CreateFontString ("DetailsNewsWindowText", "overlay", "GameFontNormal")
texto:SetPoint ("topleft", frame, "topleft", 100, -100)
texto:SetJustifyH ("left")
texto:SetJustifyV ("top")
texto:SetTextColor (1, 1, 1)
texto:SetWidth (400)
texto:SetHeight (500)
function frame:Title (title)
titulo:SetText (title or "")
end
function frame:Text (text)
texto:SetText (text or "")
end
function frame:Icon (path)
avatar:SetTexture (path or nil)
end
frame:Hide()
end
return frame
end
+2 -2
View File
@@ -271,7 +271,7 @@ function _detalhes:OpenOptionsWindow (instance)
g:NewSwitch (window, _, "$parentCaptureHealSlider", "healCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["heal"])
window.healCaptureSlider:SetPoint ("left", window.healCaptureLabel, "right", 2)
window.healCaptureSlider.tooltip = "Pause or enable capture of:\n- healing done (not absorbs)\n- healing per second\n- overheal\n- healing taken"
window.healCaptureSlider.tooltip = "Pause or enable capture of:\n- healing done\n- absorbs\n- healing per second\n- overheal\n- healing taken\n- enemy healed"
window.healCaptureSlider.OnSwitch = function (self, _, value)
_detalhes:CaptureSet (value, "heal", true)
switch_icon_color (window.healCaptureImage, value)
@@ -298,7 +298,7 @@ function _detalhes:OpenOptionsWindow (instance)
g:NewSwitch (window, _, "$parentCaptureAuraSlider", "auraCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["aura"])
window.auraCaptureSlider:SetPoint ("left", window.auraCaptureLabel, "right", 2)
window.auraCaptureSlider.tooltip = "Pause or enable capture of:\n- buffs and debufs\n- absorbs (heal)"
window.auraCaptureSlider.tooltip = "Pause or enable capture of:\n- buffs and debufs\n- cooldowns"
window.auraCaptureSlider.OnSwitch = function (self, _, value)
_detalhes:CaptureSet (value, "aura", true)
switch_icon_color (window.auraCaptureImage, value)
+7 -9
View File
@@ -2728,7 +2728,7 @@ local build_segment_list = function (self, elapsed)
if (menuIndex) then
menuIndex = menuIndex + 1
if (instancia.segmento == i) then
CoolTip:SetLastSelected ("main", menuIndex); --print (2)
CoolTip:SetLastSelected ("main", menuIndex);
menuIndex = nil
end
end
@@ -2774,11 +2774,11 @@ local build_segment_list = function (self, elapsed)
--> fill é a quantidade de menu que esta sendo mostrada
if (instancia.segmento == 0) then
if (fill - 2 == menuIndex) then
CoolTip:SetLastSelected ("main", fill - 1)--; print (21)
CoolTip:SetLastSelected ("main", fill - 1)
elseif (fill - 1 == menuIndex) then
CoolTip:SetLastSelected ("main", fill)--; print (22)
CoolTip:SetLastSelected ("main", fill)
else
CoolTip:SetLastSelected ("main", fill + 1)--; print (23)
CoolTip:SetLastSelected ("main", fill + 1)
end
menuIndex = nil
@@ -2827,11 +2827,11 @@ local build_segment_list = function (self, elapsed)
--> fill é a quantidade de menu que esta sendo mostrada
if (instancia.segmento == -1) then
if (fill - 2 == menuIndex) then
CoolTip:SetLastSelected ("main", fill)--; print (31)
CoolTip:SetLastSelected ("main", fill)
elseif (fill - 1 == menuIndex) then
CoolTip:SetLastSelected ("main", fill+1)--; print (32)
CoolTip:SetLastSelected ("main", fill+1)
else
CoolTip:SetLastSelected ("main", fill + 2)--; print (33)
CoolTip:SetLastSelected ("main", fill + 2)
end
menuIndex = nil
end
@@ -2956,8 +2956,6 @@ function gump:CriaCabecalho (BaseFrame, instancia)
BGFrame_scripts (BaseFrame.UPFrame, BaseFrame, instancia)
--BaseFrame.UPFrame:SetScript ("OnMouseDown", function() print ("hello world")end)
-- botões
-------------------------------------------------------------------------------------------------------------------------------------------------
+2 -2
View File
@@ -294,7 +294,7 @@ function _detalhes:OpenWelcomeWindow ()
g:NewSwitch (window, _, "$parentCaptureHealSlider", "healCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["heal"])
window.healCaptureSlider:SetPoint ("left", window.healCaptureLabel, "right", 2)
window.healCaptureSlider.tooltip = "Pause or enable capture of:\n- healing done (not absorbs)\n- healing per second\n- overheal\n- healing taken\n- enemy healed"
window.healCaptureSlider.tooltip = "Pause or enable capture of:\n- healing done\n- absorbs\n- healing per second\n- overheal\n- healing taken\n- enemy healed"
window.healCaptureSlider.OnSwitch = function (self, _, value)
_detalhes:CaptureSet (value, "heal", true)
switch_icon_color (window.healCaptureImage, value)
@@ -321,7 +321,7 @@ function _detalhes:OpenWelcomeWindow ()
g:NewSwitch (window, _, "$parentCaptureAuraSlider", "auraCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["aura"])
window.auraCaptureSlider:SetPoint ("left", window.auraCaptureLabel, "right", 2)
window.auraCaptureSlider.tooltip = "Pause or enable capture of:\n- buffs and debufs\n- absorbs (heal)\n- cooldowns\n- damage prevented"
window.auraCaptureSlider.tooltip = "Pause or enable capture of:\n- buffs and debufs\n- cooldowns"
window.auraCaptureSlider.OnSwitch = function (self, _, value)
_detalhes:CaptureSet (value, "aura", true)
switch_icon_color (window.auraCaptureImage, value)
Binary file not shown.
Binary file not shown.
+18 -1
View File
@@ -3,6 +3,8 @@ if not Loc then return end
--------------------------------------------------------------------------------------------------------------------------------------------
Loc ["STRING_VERSION_LOG"] = "Details! v1.5.0:\n\n|cFFFFFF00-|r Buff Uptime was been implemented over Miscellaneous attribute.\n\n|cFFFFFF00-|r Death Logs now also display cooldowns and last cooldown used.\n\n|cFFFFFF00-|r Added this window showing the latest changes.\n\n|cFFFFFF00-|r Fixed the issue were sometimes the instance stops to update when clicking on the attribute name over sword menu.\n\n|cFFFFFF00-|r Disabling Healing now shutdown the absorbs too, disabling auras doesn't interrupt absorbs any more.\n\n|cFFFFFF00-|r Friendly Fire now only track players which is inside a group.\n\n|cFFFFFF00-|r Fixed a issue were pet damage on target isn't added to owner target.\n\n|cFFFFFF00-|r Fixed a bug were refreshing a cooldown isn't counting.\n\n|cFFFFFF00-|r Added absorbs for shammy and monk 2P tier 16.\n\n|cFFFFFF00-|r Added slash command 'worldboss' and 'updates'."
Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails:|r " --> color and details name
Loc ["STRING_YES"] = "Yes"
@@ -16,13 +18,18 @@ if not Loc then return end
Loc ["STRING_TOOOLD2"] = "your Details! version isn't the same."
Loc ["STRING_CHANGED_TO_CURRENT"] = "Segment changed to current"
Loc ["STRING_SEGMENT_TRASH"] = "Next Boss Cleanup"
Loc ["STRING_VERSION_UPDATE"] = "new version: what's changed? click here"
Loc ["STRING_NEWS_TITLE"] = "What's New In This Version"
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_LAST_COOLDOWN"] = "last cooldown used"
Loc ["STRING_NOLAST_COOLDOWN"] = "no cooldown used"
Loc ["STRING_INSTANCE_LIMIT"] = "max instance number has been reached, you can modify this limit on options panel."
Loc ["STRING_PLEASE_WAIT"] = "Please wait"
Loc ["STRING_UPTADING"] = "updating"
@@ -52,6 +59,14 @@ if not Loc then return end
Loc ["STRING_SLASH_NEW"] = "new"
Loc ["STRING_SLASH_NEW_DESC"] = "open or reopen a instance."
Loc ["STRING_SLASH_CHANGES"] = "updates"
Loc ["STRING_SLASH_CHANGES_DESC"] = "shows up the latest changes made on this version."
Loc ["STRING_SLASH_WORLDBOSS"] = "worldboss"
Loc ["STRING_SLASH_WORLDBOSS_DESC"] = "run a macro showing which boss you killed this week."
Loc ["STRING_KILLED"] = "Killed"
Loc ["STRING_ALIVE"] = "Alive"
--> StatusBar Plugins
Loc ["STRING_STATUSBAR_NOOPTIONS"] = "This widget doesn't have options."
@@ -157,6 +172,7 @@ if not Loc then return end
Loc ["STRING_ATTRIBUTE_MISC_DISPELL"] = "Dispells"
Loc ["STRING_ATTRIBUTE_MISC_DEAD"] = "Deaths"
Loc ["STRING_ATTRIBUTE_MISC_DEFENSIVE_COOLDOWNS"] = "Cooldowns"
Loc ["STRING_ATTRIBUTE_MISC_BUFF_UPTIME"] = "Buff Uptime"
Loc ["STRING_ATTRIBUTE_CUSTOM"] = "Custom"
@@ -259,6 +275,7 @@ if not Loc then return end
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_REPORT_SINGLE_BUFFUPTIME"] = "buff uptime for"
Loc ["STRING_NOCLOSED_INSTANCES"] = "There are no closed instances,\nclick to open a new one."
--> report frame
+17
View File
@@ -3,6 +3,8 @@ if not Loc then return end
--------------------------------------------------------------------------------------------------------------------------------------------
Loc ["STRING_VERSION_LOG"] = "Details! v1.5.0:\n\n|cFFFFFF00-|r Buff Uptime foi implementado no atributo miscelanea.\n\n|cFFFFFF00-|r Cooldowns usados agora aparecem nos registros da morte.\n\n|cFFFFFF00-|r Implementado esta janela mostrando as atualizacoes.\n\n|cFFFFFF00-|r Corrigido problema onde algumas vezes clicando no nome do atributo fazia a instancia parar de atualizar.\n\n|cFFFFFF00-|r Desativando a cura agora para as absorcoes tambem. Desligando as Auras nao interrompe as absorcoes. \n\n|cFFFFFF00-|r Fogo Amigo agora conta apenas jogadores dentro do grupo.\n\n|cFFFFFF00-|r Corrigido problema onde o dano feito por um ajudando nao estava contando no alvo do dono.\n\n|cFFFFFF00-|r Corrigido problema onde a atualizacao de um cooldown nao estava sendo contada.\n\n|cFFFFFF00-|r Adicionada as magias de absorcao para 2P tier 16.\n\n|cFFFFFF00-|r Adicionado os comandos de barra 'worldboss' e 'updates'."
Loc ["STRING_DETAILS1"] = "|cffffaeaeDetalhes:|r " --> color and details name
Loc ["STRING_YES"] = "Sim"
@@ -16,12 +18,17 @@ if not Loc then return end
Loc ["STRING_TOOOLD2"] = "a sua versao do Details! nao e a mesma."
Loc ["STRING_CHANGED_TO_CURRENT"] = "Segmento trocado para atual"
Loc ["STRING_SEGMENT_TRASH"] = "Caminho do Proximo Boss"
Loc ["STRING_VERSION_UPDATE"] = "nova versao: clique para ver o que mudou"
Loc ["STRING_NEWS_TITLE"] = "Quais As Novidades Desta Versao"
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_LAST_COOLDOWN"] = "ultimo cooldown usado"
Loc ["STRING_NOLAST_COOLDOWN"] = "nenhum cooldown usado"
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"
@@ -53,6 +60,14 @@ if not Loc then return end
Loc ["STRING_SLASH_NEW"] = "novo"
Loc ["STRING_SLASH_NEW_DESC"] = "abre ou reabre uma instancia."
Loc ["STRING_SLASH_CHANGES"] = "updates"
Loc ["STRING_SLASH_CHANGES_DESC"] = "mostra o que foi implementado e corrigido nesta versao do Details."
Loc ["STRING_SLASH_WORLDBOSS"] = "worldboss"
Loc ["STRING_SLASH_WORLDBOSS_DESC"] = "executa uma macro mostrando quais 'world boss' voce matou esta semana."
Loc ["STRING_KILLED"] = "Morto"
Loc ["STRING_ALIVE"] = "Vivo"
--> StatusBar Plugins
Loc ["STRING_STATUSBAR_NOOPTIONS"] = "Nao ha opcoes para esta ferramenta."
@@ -155,6 +170,7 @@ if not Loc then return end
Loc ["STRING_ATTRIBUTE_MISC_DISPELL"] = "Dissipados"
Loc ["STRING_ATTRIBUTE_MISC_DEAD"] = "Mortes"
Loc ["STRING_ATTRIBUTE_MISC_DEFENSIVE_COOLDOWNS"] = "Cooldowns"
Loc ["STRING_ATTRIBUTE_MISC_BUFF_UPTIME"] = "Buff Tempo Ativo"
Loc ["STRING_ATTRIBUTE_CUSTOM"] = "Customizados"
@@ -254,6 +270,7 @@ if not Loc then return end
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_REPORT_SINGLE_BUFFUPTIME"] = "duracao dos buffs de"
Loc ["STRING_NOCLOSED_INSTANCES"] = "Nao ha instancias fechadas,\nclique para abrir uma nova."
--Loc ["STRING_REPORT_FRAG"] =
@@ -239,12 +239,33 @@ end
end
_school = _detalhes:trim (_school)
local texto_esquerdo = "".._cstr ("%.1f", event[4] - timeOfDeath) .."s "..nome_magia.." (".. _school ..")"
texto_esquerdo = texto_esquerdo:gsub ("(%()%)", "")
local texto_esquerdo
if (nome_magia) then
texto_esquerdo = "".._cstr ("%.1f", event[4] - timeOfDeath) .."s "..nome_magia.." (".. _school ..")"
texto_esquerdo = texto_esquerdo:gsub ("(%()%)", "")
else
texto_esquerdo = ""
end
GameCooltip:AddLine (texto_esquerdo, "-".._detalhes:ToK (event[3]).." (".. hp .."%)", 1, "white", "white")
GameCooltip:AddIcon (icone_magia)
GameCooltip:AddStatusBar (hp, 1, "red", true)
if (type (event [1]) ~= "boolean" and event [1] == 2) then --> last cooldown
if (event[3] == 1) then
GameCooltip:AddLine ("".._cstr ("%.1f", event[4] - timeOfDeath) .. "s " .. nome_magia .. " (" .. Loc ["STRING_LAST_COOLDOWN"] .. ")")
GameCooltip:AddIcon (icone_magia)
GameCooltip:AddStatusBar (100, 1, "gray", true)
else
GameCooltip:AddLine (Loc ["STRING_NOLAST_COOLDOWN"])
GameCooltip:AddStatusBar (100, 1, "gray", true)
end
else
GameCooltip:AddLine (texto_esquerdo, "-".._detalhes:ToK (event[3]).." (".. hp .."%)", 1, "white", "white")
GameCooltip:AddIcon (icone_magia)
if (type (event [1]) ~= "boolean" and event [1] == 1) then --> cooldown
GameCooltip:AddStatusBar (100, 1, "yellow", true)
else
GameCooltip:AddStatusBar (hp, 1, "red", true)
end
end
end
else
@@ -33,6 +33,8 @@ Loc ["STRING_FIGHT_SUMMARY"] = "fight details"
Loc ["STRING_FIGHT_GRAPHIC"] = "performance charts"
Loc ["STRING_TOOLTIP"] = "Show Encounter Details Window"
Loc ["STRING_"] = ""
Loc ["STRING_LAST_COOLDOWN"] = "last cooldown used"
Loc ["STRING_NOLAST_COOLDOWN"] = "no cooldown used"
--> mechanic types
Loc ["STRING_HEAL"] = "heal"
+3 -2
View File
@@ -31,8 +31,9 @@ Loc ["STRING_DEATH_LOG"] = "Ultimos Segundos"
Loc ["STRING_FIGHT_SUMMARY"] = "detalhes da luta"
Loc ["STRING_FIGHT_GRAPHIC"] = "graficos da performance"
Loc ["STRING_TOOLTIP"] = "Mostrar os detalhes do combate"
Loc ["STRING_"] = ""
Loc ["STRING_LAST_COOLDOWN"] = "ultimo cooldown usado"
Loc ["STRING_NOLAST_COOLDOWN"] = "nenhum cooldown usado"
--> mechanic types
Loc ["STRING_HEAL"] = "cura"
Loc ["STRING_LOWDPS"] = "dpsbaixo"
+10 -2
View File
@@ -140,7 +140,7 @@ function _G._detalhes:Start()
--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, self.atributo_misc.ReportSingleCooldownLine}
self.row_singleclick_overwrite [4] = {true, true, true, true, self.atributo_misc.ReportSingleDeadLine, self.atributo_misc.ReportSingleCooldownLine, self.atributo_misc.ReportSingleBuffUptimeLine}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> initialize
@@ -317,6 +317,14 @@ function _G._detalhes:Start()
_detalhes:OpenWelcomeWindow()
end
if (self.is_version_first_run) 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_VERSION_UPDATE"], {[[Interface\GossipFrame\AvailableQuestIcon]], 16, 16, false}, 20, {_detalhes.OpenNewsWindow})
end
end
end
end