Testing death recaps and put back fixes for grouping
This commit is contained in:
+21
-16
@@ -360,20 +360,20 @@ end
|
||||
function _detalhes:ShutDownAllInstances()
|
||||
for index, instance in _ipairs (_detalhes.tabela_instancias) do
|
||||
if (instance:IsEnabled() and instance.baseframe and not instance.ignore_mass_showhide) then
|
||||
instance:ShutDown()
|
||||
instance:ShutDown(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> alias
|
||||
function _detalhes:HideWindow()
|
||||
return self:DesativarInstancia()
|
||||
function _detalhes:HideWindow(all)
|
||||
return self:DesativarInstancia(all)
|
||||
end
|
||||
function _detalhes:ShutDown()
|
||||
return self:DesativarInstancia()
|
||||
function _detalhes:ShutDown(all)
|
||||
return self:DesativarInstancia(all)
|
||||
end
|
||||
function _detalhes:Shutdown()
|
||||
return self:DesativarInstancia()
|
||||
function _detalhes:Shutdown(all)
|
||||
return self:DesativarInstancia(all)
|
||||
end
|
||||
|
||||
function _detalhes:GetNumWindows()
|
||||
@@ -381,7 +381,7 @@ end
|
||||
end
|
||||
|
||||
--> desativando a inst�ncia ela fica em stand by e apenas hida a janela ~shutdown ~close ~fechar
|
||||
function _detalhes:DesativarInstancia()
|
||||
function _detalhes:DesativarInstancia(all)
|
||||
|
||||
self.ativa = false
|
||||
_detalhes.opened_windows = _detalhes.opened_windows-1
|
||||
@@ -413,7 +413,9 @@ end
|
||||
Details.FadeHandler.Fader (self.rowframe, 1)
|
||||
Details.FadeHandler.Fader (self.windowSwitchButton, 1)
|
||||
|
||||
self:Desagrupar (-1)
|
||||
if (not all) then
|
||||
self:Desagrupar (-1)
|
||||
end
|
||||
|
||||
if (self.modo == modo_raid) then
|
||||
_detalhes.RaidTables:DisableRaidMode (self)
|
||||
@@ -534,7 +536,7 @@ end
|
||||
for index = math.min (#_detalhes.tabela_instancias, _detalhes.instances_amount), 1, -1 do
|
||||
local instancia = _detalhes:GetInstance (index)
|
||||
if (instancia and not instancia.ignore_mass_showhide) then
|
||||
instancia:AtivarInstancia (temp)
|
||||
instancia:AtivarInstancia (temp, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -583,14 +585,14 @@ end
|
||||
end
|
||||
|
||||
--> alias
|
||||
function _detalhes:ShowWindow (temp)
|
||||
return self:AtivarInstancia (temp)
|
||||
function _detalhes:ShowWindow (temp, all)
|
||||
return self:AtivarInstancia (temp, all)
|
||||
end
|
||||
function _detalhes:EnableInstance (temp)
|
||||
return self:AtivarInstancia (temp)
|
||||
function _detalhes:EnableInstance (temp, all)
|
||||
return self:AtivarInstancia (temp, all)
|
||||
end
|
||||
|
||||
function _detalhes:AtivarInstancia (temp)
|
||||
function _detalhes:AtivarInstancia (temp, all)
|
||||
self.ativa = true
|
||||
self.cached_bar_width = self.cached_bar_width or 0
|
||||
|
||||
@@ -647,7 +649,10 @@ end
|
||||
end
|
||||
|
||||
self:DesaturateMenu()
|
||||
self:Desagrupar (-1)
|
||||
|
||||
if (not all) then
|
||||
self:Desagrupar (-1)
|
||||
end
|
||||
|
||||
self:CheckFor_EnabledTrashSuppression()
|
||||
|
||||
|
||||
+6
-4
@@ -2423,9 +2423,11 @@
|
||||
end
|
||||
end
|
||||
|
||||
if (spellid == 27827) then --> spirit of redemption (holy priest)
|
||||
parser:dead ("UNIT_DIED", time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags)
|
||||
ignore_death [who_name] = true
|
||||
if (spellid == 27827) then --> spirit of redemption (holy ~priest) ~spirit
|
||||
--C_Timer.After(0.1, function()
|
||||
parser:dead ("UNIT_DIED", time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags)
|
||||
ignore_death [who_name] = true
|
||||
--end)
|
||||
return
|
||||
|
||||
elseif (spellid == SPELLID_MONK_GUARD) then
|
||||
@@ -4264,7 +4266,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
misc_cache [alvo_name] = este_jogador
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--> objeto da morte
|
||||
local esta_morte = {}
|
||||
|
||||
|
||||
@@ -246,12 +246,14 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
return
|
||||
end
|
||||
|
||||
--hide blizzard death recap
|
||||
DeathRecapFrame.Recap1:Hide()
|
||||
DeathRecapFrame.Recap2:Hide()
|
||||
DeathRecapFrame.Recap3:Hide()
|
||||
DeathRecapFrame.Recap4:Hide()
|
||||
DeathRecapFrame.Recap5:Hide()
|
||||
|
||||
|
||||
--create details death recap if not existant
|
||||
if (not Details.DeathRecap) then
|
||||
Details.DeathRecap = CreateFrame ("frame", "DetailsDeathRecap", DeathRecapFrame, "BackdropTemplate")
|
||||
Details.DeathRecap:SetAllPoints()
|
||||
@@ -284,14 +286,14 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
tinsert (Details.DeathRecap.Segments, i, segmentButton)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
for i = 1, 10 do
|
||||
Details.DeathRecap.Lines [i]:Hide()
|
||||
Details.DeathRecap.Lines[i]:Hide()
|
||||
end
|
||||
|
||||
--segment to use
|
||||
local death = Details.tabela_vigente.last_events_tables
|
||||
|
||||
|
||||
--see if this segment has a death for the player
|
||||
local foundPlayer = false
|
||||
for index = #death, 1, -1 do
|
||||
@@ -313,7 +315,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--segments
|
||||
if (Details.death_recap.show_segments) then
|
||||
local last_index = 0
|
||||
@@ -593,7 +595,74 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
end
|
||||
|
||||
hooksecurefunc (_G, "DeathRecap_LoadUI", function()
|
||||
hooksecurefunc (_G, "DeathRecapFrame_OpenRecap", function (RecapID)
|
||||
Details.OpenDetailsDeathRecap (nil, RecapID)
|
||||
hooksecurefunc (_G, "DeathRecapFrame_OpenRecap", function(RecapID)
|
||||
local currentCombat = Details:GetCurrentCombat()
|
||||
--get the player current death and link the death table with the death recapID
|
||||
local playerDeaths = currentCombat:GetPlayerDeaths(UnitName("player"))
|
||||
if (playerDeaths) then
|
||||
local latestDeath = playerDeaths[#playerDeaths]
|
||||
if (latestDeath) then
|
||||
latestDeath.RecapID = RecapID
|
||||
|
||||
--synchronize last events from Details! and Blizzard recap
|
||||
local events = DeathRecap_GetEvents(recapID)
|
||||
--death is event index 1 (the event that killed the player)
|
||||
local evtData = events[1]
|
||||
|
||||
if (evtData) then
|
||||
--recap by blizzard
|
||||
local spellName = evtData.spellName
|
||||
local spellId = evtData.spellId
|
||||
local event = evtData.event
|
||||
local environmentalType = evtData.environmentalType
|
||||
local timeStamp = evtData.timestamp
|
||||
local amountDamage = evtData.amount
|
||||
local overkill = evtData.overkill
|
||||
local absorbed = evtData.absorbed
|
||||
local resisted = evtData.resisted
|
||||
local blocked = evtData.blocked
|
||||
local currentHp = evtData.currentHP
|
||||
local hideCaster = evtData.hideCaster
|
||||
local sourceName = evtData.sourceName
|
||||
local casterPrestige = evtData.casterPrestige
|
||||
local spellSchool = evtData.school
|
||||
|
||||
print("Killed by (Blizzard-Debug): ", spellName, "amount:", amountDamage)
|
||||
|
||||
--recap by Details!
|
||||
local deathEventsDetails = latestDeath[1]
|
||||
for evIndex = #deathEventsDetails, 1, -1 do
|
||||
local ev = deathEventsDetails[evIndex]
|
||||
local evType = ev[1]
|
||||
local spellId = ev[2]
|
||||
local amount = ev[3]
|
||||
--is a damage? true boolean
|
||||
if (type(evType) == "boolean" and evType) then
|
||||
local spellName, _, spellIcon = Details.GetSpellInfo(spellId)
|
||||
if (spellName) then
|
||||
print("Killed by (Details!-Debug): ", spellName, "amount:", amount)
|
||||
else
|
||||
print("Killed by (Details!-Debug): spell not found")
|
||||
end
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
Details:Msg("the message above are debugs of an Alpha version of Details!")
|
||||
|
||||
local whatKilledThePlayer = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Details.OpenDetailsDeathRecap(nil, RecapID)
|
||||
end)
|
||||
end)
|
||||
|
||||
--[=[ hooks not loaded at this point
|
||||
Details:InstallHook(DETAILS_HOOK_DEATH, function(_, _, _, _, _, _, _, targetName)
|
||||
if (targetName == UnitName("player")) then
|
||||
|
||||
end
|
||||
end)
|
||||
--]=]
|
||||
|
||||
Reference in New Issue
Block a user