Added arena enemy deaths

This commit is contained in:
Tercio Jose
2021-02-11 11:39:12 -03:00
parent ada1552c9c
commit 85038b0fec
5 changed files with 46 additions and 19 deletions
+2
View File
@@ -208,6 +208,8 @@ do
_detalhes.encounter_table = {}
_detalhes.encounter_counter = {}
_detalhes.encounter_dungeons = {}
--> unitId dos inimigos dentro de uma arena
_detalhes.arena_enemies = {}
--> reliable char data sources
--> actors that are using details! and sent character data, we don't need query inspect on these actors
_detalhes.trusted_characters = {}
+15 -3
View File
@@ -229,6 +229,8 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
local time = event [4]
local source = event [6]
local combatObject = instancia:GetShowingCombat()
if (time + 12 > hora_da_morte) then
if (type (evtype) == "boolean") then
--> is damage or heal
@@ -263,9 +265,17 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
else
--> heal
if (amount > _detalhes.deathlog_healingdone_min) then
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon (spellicon)
GameCooltip:AddStatusBar (hp, 1, "green", true) --, backgroud_bar_heal
if (combatObject.is_arena) then
if (amount > _detalhes.deathlog_healingdone_min_arena) then
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon (spellicon)
GameCooltip:AddStatusBar (hp, 1, "green", true)
end
else
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon (spellicon)
GameCooltip:AddStatusBar (hp, 1, "green", true)
end
end
end
@@ -574,6 +584,8 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
end
esta_barra.lineText1:SetText (colocacao .. ". " .. morte [3]:gsub (("%-.*"), ""))
esta_barra.lineText2:SetText("")
esta_barra.lineText3:SetText("")
esta_barra.lineText4:SetText (morte [6])
esta_barra:SetValue (100)
+8
View File
@@ -942,6 +942,14 @@
if (Details.debug) then
Details:Msg ("(debug) Found", oponentes, "enemies and", aliados, "allies")
end
--enemies
local enemiesAmount = GetNumArenaOpponentSpecs()
table.wipe(_detalhes.arena_enemies)
for i = 1, enemiesAmount do
_detalhes.arena_enemies[GetUnitName("arena" .. i, true)] = "arena" .. i
end
end
local string_arena_enemyteam_damage = [[
+14 -16
View File
@@ -45,6 +45,7 @@
local escudo = _detalhes.escudos --details local
local parser = _detalhes.parser --details local
local absorb_spell_list = _detalhes.AbsorbSpells --details local
local arena_enemies = _detalhes.arena_enemies --details local
local cc_spell_list = DetailsFramework.CrowdControlSpells
@@ -834,16 +835,19 @@
local i = t.n
local this_event = t [i]
if (not this_event) then
return print ("Parser Event Error -> Set to 16 DeathLogs and /reload", i, _death_event_amt)
end
this_event [1] = true --> true if this is a damage || false for healing
this_event [2] = spellid --> spellid || false if this is a battle ress line
this_event [3] = amount --> amount of damage or healing
this_event [4] = time --> parser time
this_event [5] = _UnitHealth (alvo_name) --> current unit heal
--> current unit heal
if (arena_enemies[alvo_name]) then
--this is an arena enemy, get the heal with the unit Id
this_event [5] = _UnitHealth(_detalhes.arena_enemies[alvo_name])
else
this_event [5] = _UnitHealth(alvo_name)
end
this_event [6] = who_name --> source name
this_event [7] = absorbed
this_event [8] = spelltype or school
@@ -3764,7 +3768,9 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
--> build dead
--print("dead", alvo_flags, _bit_band (alvo_flags, 0x00000008) ~= 0, _current_encounter_id)
if (_in_combat and alvo_flags and _bit_band (alvo_flags, 0x00000008) ~= 0) then -- and _in_combat --byte 1 = 8 (AFFILIATION_OUTSIDER)
local damageActor = _current_damage_container:GetActor(alvo_name)
--check for outsiders
if (_in_combat and alvo_flags and (not damageActor or (_bit_band (alvo_flags, 0x00000008) ~= 0 and not damageActor.grupo))) then
--> outsider death while in combat
--rules for specific encounters
@@ -3829,7 +3835,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
elseif (not _UnitIsFeignDeath (alvo_name)) then
if (
--> player in your group
_bit_band (alvo_flags, AFFILIATION_GROUP) ~= 0 and
(_bit_band (alvo_flags, AFFILIATION_GROUP) ~= 0 or (damageActor and damageActor.grupo)) and
--> must be a player
_bit_band (alvo_flags, OBJECT_TYPE_PLAYER) ~= 0 and
--> must be in combat
@@ -3841,14 +3847,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
return
end
if (alvo_name == _detalhes.playername) then
--print ("DEATH", GetTime())
if (_detalhes.LatestCombatDone and _detalhes.LatestCombatDone+0.2 > GetTime()) then
-- print ("Eh Maior que 0.2")
end
end
_current_misc_container.need_refresh = true
--> combat totals
+7
View File
@@ -1248,6 +1248,12 @@ local default_global_data = {
},
current_exp_raid_encounters = {},
--> profile by spec
profile_by_spec = {},
--> displays by spec
displays_by_spec = {},
--> death log
show_totalhitdamage_on_overkill = false,
@@ -1311,6 +1317,7 @@ local default_global_data = {
--> min health done on the death report
deathlog_healingdone_min = 1,
deathlog_healingdone_min_arena = 400,
--> mythic plus config
mythic_plus = {