- Full rework on how deaths are handled, now the last events before death should be more precise.
- Added damage taken from environment, like falling, lava, drowning, etc. - Added Fire and Brimstone spell customizations for warlocks. - Bookmark now are shared between all characters. - Fixed few inconsistencies with trash recognition. - Fixed Cloud Capture where sometimes it wasn't sharing. - Fixed report where it wasn't sharing for guild and raid when the player name box were empty. - Report box now also saves the position and last report channel. - You Are Not Prepared plugin now have tooltips for spells and auto open after a boss encounter. - Advanced Death Logs plugin got full rewrite (and still are in development). - New API: _detalhes:GetFramework() return the framework object. - New API: combat:GetDifficult() return the raid difficult on the combat object. - New API: combat:GetBossInfo() return the boss info object. - New API: combat:GetDeaths() return the table used to store deaths. - New API: _detalhes:CreatePluginOptionsFrame (name, title, template), create a preset frame for options. - New API Alias: framework:CreateLabel (parent, text, size, color, font, member, name)
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
-- combat class object
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
|
||||
|
||||
--[[global]] DETAILS_TOTALS_ONLYGROUP = true
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -14,6 +15,7 @@
|
||||
local _bit_band = bit.band -- lua local
|
||||
local _date = date -- lua local
|
||||
local _table_remove = table.remove -- lua local
|
||||
local _rawget = rawget
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
@@ -53,7 +55,19 @@
|
||||
end
|
||||
|
||||
function combate:IsTrash()
|
||||
return self.is_trash
|
||||
return _rawget (self, "is_trash")
|
||||
end
|
||||
|
||||
function combate:GetDifficult()
|
||||
return self.is_boss and self.is_boss.diff
|
||||
end
|
||||
|
||||
function combate:GetBossInfo()
|
||||
return self.is_boss
|
||||
end
|
||||
|
||||
function combate:GetDeaths()
|
||||
return self.last_events_tables
|
||||
end
|
||||
|
||||
--return the name of the encounter or enemy
|
||||
@@ -62,7 +76,7 @@
|
||||
return self.is_pvp.name
|
||||
elseif (self.is_boss) then
|
||||
return self.is_boss.encounter
|
||||
elseif (self.is_tras) then
|
||||
elseif (_rawget (self, "is_trash")) then
|
||||
return Loc ["STRING_SEGMENT_TRASH"]
|
||||
else
|
||||
if (self.enemy) then
|
||||
@@ -149,9 +163,12 @@
|
||||
esta_tabela.data_fim = 0
|
||||
esta_tabela.data_inicio = 0
|
||||
|
||||
--> record last event before dead
|
||||
--> record deaths
|
||||
esta_tabela.last_events_tables = {}
|
||||
|
||||
--> last events from players
|
||||
esta_tabela.player_last_events = {}
|
||||
|
||||
--> players in the raid
|
||||
esta_tabela.raid_roster = {}
|
||||
|
||||
@@ -236,6 +253,14 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> core
|
||||
|
||||
function combate:CreateLastEventsTable (player_name)
|
||||
--> sixteen indexes, thinking in 32 but it's just too much
|
||||
local t = { {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {} }
|
||||
t.n = 1
|
||||
self.player_last_events [player_name] = t
|
||||
return t
|
||||
end
|
||||
|
||||
--trava o tempo dos jogadores após o término do combate.
|
||||
function combate:TravarTempos()
|
||||
if (self [1]) then
|
||||
|
||||
@@ -201,6 +201,13 @@
|
||||
return table1 [4] > table2 [4]
|
||||
end
|
||||
|
||||
--[[exported]] function _detalhes.Sort4Reverse (table1, table2)
|
||||
if (not table2) then
|
||||
return true
|
||||
end
|
||||
return table1 [4] < table2 [4]
|
||||
end
|
||||
|
||||
--[[exported]] function _detalhes:GetBarColor (actor)
|
||||
actor = actor or self
|
||||
|
||||
@@ -266,8 +273,8 @@
|
||||
_setmetatable (_new_damageActor, atributo_damage)
|
||||
|
||||
if (link) then
|
||||
_new_damageActor.last_events_table = _detalhes:CreateActorLastEventTable()
|
||||
_new_damageActor.last_events_table.original = true
|
||||
--_new_damageActor.last_events_table = _detalhes:CreateActorLastEventTable()
|
||||
--_new_damageActor.last_events_table.original = true
|
||||
|
||||
_new_damageActor.targets.shadow = link.targets
|
||||
_new_damageActor.spell_tables.shadow = link.spell_tables
|
||||
@@ -3014,7 +3021,7 @@ end
|
||||
if (not actor) then
|
||||
actor = self
|
||||
end
|
||||
actor.last_events_table = _detalhes:CreateActorLastEventTable()
|
||||
--actor.last_events_table = _detalhes:CreateActorLastEventTable()
|
||||
end
|
||||
|
||||
--> restaura e liga o ator com a sua shadow durante a inicialização (startup function)
|
||||
|
||||
@@ -112,8 +112,8 @@ function atributo_heal:NovaTabela (serial, nome, link)
|
||||
_setmetatable (_new_healActor, atributo_heal)
|
||||
|
||||
if (link) then --> se não for a shadow
|
||||
_new_healActor.last_events_table = _detalhes:CreateActorLastEventTable()
|
||||
_new_healActor.last_events_table.original = true
|
||||
--_new_healActor.last_events_table = _detalhes:CreateActorLastEventTable()
|
||||
--_new_healActor.last_events_table.original = true
|
||||
|
||||
_new_healActor.targets.shadow = link.targets
|
||||
_new_healActor.spell_tables.shadow = link.spell_tables
|
||||
@@ -1981,7 +1981,7 @@ end
|
||||
if (not actor) then
|
||||
actor = self
|
||||
end
|
||||
actor.last_events_table = _detalhes:CreateActorLastEventTable()
|
||||
--actor.last_events_table = _detalhes:CreateActorLastEventTable()
|
||||
end
|
||||
|
||||
--> restaura e liga o ator com a sua shadow durante a inicialização
|
||||
|
||||
+45
-46
@@ -171,63 +171,65 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
|
||||
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, _unpack (self.click_to_report_color))
|
||||
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
|
||||
GameCooltip:AddStatusBar (0, 1, 1, 1, 1, 1, false, {value = 100, color = {.3, .3, .3, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
|
||||
for index, evento in _ipairs (eventos) do
|
||||
|
||||
local hp = _math_floor (evento[5]/hp_max*100)
|
||||
--death parser
|
||||
for index, event in _ipairs (eventos) do
|
||||
|
||||
local hp = _math_floor (event[5]/hp_max*100)
|
||||
if (hp > 100) then
|
||||
hp = 100
|
||||
end
|
||||
|
||||
if (evento [1]) then --> Dano
|
||||
--print ("DANO|"..evento [4]-hora_da_morte.."|"..evento [2].."|"..evento [3]) --> {true, spellid, amount, _tempo}
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (evento [2])
|
||||
|
||||
if (evento[3]) then
|
||||
local amt_golpes = evento[7]
|
||||
if (amt_golpes) then
|
||||
amt_golpes = "(x"..amt_golpes..") "
|
||||
else
|
||||
amt_golpes = ""
|
||||
end
|
||||
|
||||
if (type (evento [1]) ~= "boolean" and evento [1] == 2) then --> last cooldown
|
||||
lastcooldown = evento
|
||||
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, 1, nil, nil, 0.078125, 0.921875, 0.078125, 0.921875
|
||||
|
||||
--> [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
|
||||
local evtype = event [1]
|
||||
local spellname, _, spellicon = _GetSpellInfo (event [2])
|
||||
local amount = event [3]
|
||||
local time = event [4]
|
||||
local source = event [6]
|
||||
|
||||
elseif (not battleress) then --> battle ress
|
||||
battleress = evento
|
||||
if (type (evtype) == "boolean") then
|
||||
--> is damage or heal
|
||||
if (evtype) then
|
||||
--> damage
|
||||
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "-" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white")
|
||||
GameCooltip:AddIcon (spellicon)
|
||||
|
||||
if (event [9]) then
|
||||
--> friendly fire
|
||||
GameCooltip:AddStatusBar (hp, 1, "darkorange", true)
|
||||
else
|
||||
--> from a enemy
|
||||
GameCooltip:AddStatusBar (hp, 1, "red", true)
|
||||
end
|
||||
else
|
||||
--> heal
|
||||
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white")
|
||||
GameCooltip:AddIcon (spellicon)
|
||||
GameCooltip:AddStatusBar (hp, 1, "green", true)
|
||||
|
||||
end
|
||||
|
||||
else --> Cura
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (evento [2])
|
||||
GameCooltip:AddLine ("".._cstr ("%.1f", evento[4] - hora_da_morte) .."s "..nome_magia.." ("..evento[6]..")", "+".._detalhes:ToK (evento[3]).." (".. hp .."%)", 1, "white", "white")
|
||||
GameCooltip:AddIcon (icone_magia) --, 1, 1, nil, nil, 0.0625, 0.9375, 0.0625, 0.9375
|
||||
GameCooltip:AddStatusBar (hp, 1, "green", true)
|
||||
elseif (type (evtype) == "number") then
|
||||
if (evtype == 1) then
|
||||
--> cooldown
|
||||
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "cooldown (" .. hp .. "%)", 1, "white", "white")
|
||||
GameCooltip:AddIcon (spellicon)
|
||||
GameCooltip:AddStatusBar (100, 1, "yellow", true)
|
||||
|
||||
elseif (evtype == 2 and not battleress) then
|
||||
--> battle ress
|
||||
battleress = event
|
||||
|
||||
elseif (evtype == 3) then
|
||||
--> last cooldown used
|
||||
lastcooldown = event
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--_table_insert (linhas, 2, {{"Interface\\AddOns\\Details\\images\\small_icons", .75, 1, 0, 1}, morte [6] .. " Morreu", "-- -- -- ", 100, {75/255, 75/255, 75/255, 1}, {noglow = true}}) --> localize-me
|
||||
GameCooltip:AddLine (morte [6] .. " " .. Loc ["STRING_TIME_OF_DEATH"] , "-- -- -- ", 1, "white")
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\small_icons", 1, 1, nil, nil, .75, 1, 0, 1)
|
||||
GameCooltip:AddStatusBar (0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
|
||||
--GameCooltip:AddSpecial ("line", 2, nil, morte [6] .. " " .. Loc ["STRING_TIME_OF_DEATH"] , "-- -- -- ", 1, "white")
|
||||
--GameCooltip:AddSpecial ("icon", 2, nil, "Interface\\AddOns\\Details\\images\\small_icons", 1, 1, nil, nil, .75, 1, 0, 1)
|
||||
--GameCooltip:AddSpecial ("statusbar", 2, nil, 100, 1, "darkgray", false)
|
||||
|
||||
if (battleress) then
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (battleress [2])
|
||||
@@ -248,7 +250,6 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
|
||||
GameCooltip:AddStatusBar (0, 1, 1, 1, 1, 1, false, {value = 100, color = {.3, .3, .3, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
end
|
||||
|
||||
--GameCooltip:AddLine (" ", " ", 1, "white", "white")
|
||||
|
||||
GameCooltip:SetOption ("StatusBarHeightMod", -6)
|
||||
GameCooltip:SetOption ("FixedWidth", 300)
|
||||
@@ -260,8 +261,6 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
|
||||
|
||||
GameCooltip:ShowCooltip()
|
||||
|
||||
--_detalhes.popup:ShowMe (esta_barra, "tooltip_bars", linhas, 300, 16, 9) --> [1] ancora [2] tipo do painel [3] texto/linhas [4] largura [5] tamanho do icone e altura da barra [6] tamanho da fonte
|
||||
|
||||
end
|
||||
|
||||
local function RefreshBarraMorte (morte, barra, instancia)
|
||||
@@ -313,7 +312,7 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
|
||||
tinsert (report_array, {elapsed .. " ", spelllink, " (" .. source .. ")", "-" .. _detalhes:ToK (amount) .. " (" .. hp .. "%) "})
|
||||
end
|
||||
|
||||
elseif (not evento [1]) then --> heal
|
||||
elseif (not evento [1] and type (evento [1]) == "boolean") then --> heal
|
||||
local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s"
|
||||
local spelllink = GetSpellLink (evento [2])
|
||||
local source = _detalhes:GetOnlyName (evento [6])
|
||||
|
||||
Reference in New Issue
Block a user