Added .unixtime into is_boss to know when the boss was killed

This commit is contained in:
Tercio Jose
2023-07-02 13:34:04 -03:00
parent 318555ae51
commit dc98287142
2 changed files with 43 additions and 2 deletions
+22
View File
@@ -106,6 +106,7 @@
ej_instance_id = t[5],
id = t[2],
bossimage = t[4],
unixtime = time(),
}
Details.tabela_vigente.is_boss = boss_table
@@ -137,6 +138,7 @@
diff_string = select(4, GetInstanceInfo()),
ej_instance_id = ejid,
id = encounterid,
unixtime = time(),
}
if (not Details:IsRaidRegistered(mapid) and Details.zone_type == "raid") then
@@ -319,6 +321,25 @@
end
end
---return an array of encounter Ids in order of the most recent to the oldest
function Details:GetEncounterIDInOrder()
--get the segments table
local segmentsTable = Details:GetCombatSegments()
--table which contains the encounter Ids in order of the most recent to the oldest
local resultTable = {}
--iterate over the segments table from the most recent to the oldest, check if the combatObject of the segment has is_boss and get the encounter Id from the member is_boss.id
for i = 1, #segmentsTable do
local combatObject = segmentsTable[i]
if (combatObject.is_boss) then
table.insert(resultTable, 1, combatObject.is_boss.id)
end
end
return resultTable
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--internal functions
-- Details.statistics = {container_calls = 0, container_pet_calls = 0, container_unknow_pet = 0, damage_calls = 0, heal_calls = 0, absorbs_calls = 0, energy_calls = 0, pets_summons = 0}
@@ -589,6 +610,7 @@
diff_string = DifficultyName,
ej_instance_id = ejid or 0,
id = encounterID,
unixtime = time()
}
end
end