Added API: SegmentInfo(), SegmentTotalDamage(), SegmentTotalHealing(), see '/details api' for more information
This commit is contained in:
@@ -757,6 +757,47 @@
|
||||
--8.0.1 miss data isn't required at the moment, spells like akari's soul has been removed from the game
|
||||
--_detalhes:CanSendMissData()
|
||||
|
||||
if (_detalhes.tabela_vigente.is_boss) then
|
||||
if (IsInRaid()) then
|
||||
local cleuID = _detalhes.tabela_vigente.is_boss.id
|
||||
local diff = _detalhes.tabela_vigente.is_boss.diff
|
||||
if (cleuID and diff == 16) then -- 16 mythic
|
||||
local raidData = _detalhes.raid_data
|
||||
|
||||
--get or build mythic raid data table
|
||||
local mythicRaidData = raidData.mythic_raid_data
|
||||
if (not mythicRaidData) then
|
||||
mythicRaidData = {}
|
||||
raidData.mythic_raid_data = mythicRaidData
|
||||
end
|
||||
|
||||
--get or build a table for this cleuID
|
||||
mythicRaidData [cleuID] = mythicRaidData [cleuID] or {wipes = 0, kills = 0, best_try = 1, longest = 0, try_history = {}}
|
||||
local cleuIDData = mythicRaidData [cleuID]
|
||||
|
||||
--store encounter data for plugins and weakauras
|
||||
if (_detalhes.tabela_vigente:GetCombatTime() > cleuIDData.longest) then
|
||||
cleuIDData.longest = _detalhes.tabela_vigente:GetCombatTime()
|
||||
end
|
||||
|
||||
if (_detalhes.tabela_vigente.is_boss.killed) then
|
||||
cleuIDData.kills = cleuIDData.kills + 1
|
||||
cleuIDData.best_try = 0
|
||||
tinsert (cleuIDData.try_history, {0, _detalhes.tabela_vigente:GetCombatTime()})
|
||||
--print ("KILL", "best try", cleuIDData.best_try, "amt kills", cleuIDData.kills, "wipes", cleuIDData.wipes, "longest", cleuIDData.longest)
|
||||
else
|
||||
cleuIDData.wipes = cleuIDData.wipes + 1
|
||||
if (_detalhes.boss1_health_percent and _detalhes.boss1_health_percent < cleuIDData.best_try) then
|
||||
cleuIDData.best_try = _detalhes.boss1_health_percent
|
||||
tinsert (cleuIDData.try_history, {_detalhes.boss1_health_percent, _detalhes.tabela_vigente:GetCombatTime()})
|
||||
end
|
||||
--print ("WIPE", "best try", cleuIDData.best_try, "amt kills", cleuIDData.kills, "wipes", cleuIDData.wipes, "longest", cleuIDData.longest)
|
||||
end
|
||||
end
|
||||
end
|
||||
--
|
||||
end
|
||||
|
||||
--the combat is valid, see if the user is sharing data with somebody
|
||||
if (_detalhes.shareData) then
|
||||
local zipData = Details:CompressData (_detalhes.tabela_vigente, "comm")
|
||||
|
||||
+4
-2
@@ -2750,6 +2750,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
end
|
||||
end)
|
||||
|
||||
-- ~energy ~resource
|
||||
function parser:energize (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, amount, powertype, p6, p7)
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
@@ -2874,7 +2875,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> MISC search key: ~cooldown |
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
function parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname)
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
@@ -2977,7 +2978,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
end
|
||||
|
||||
|
||||
--serach key: ~interrupt
|
||||
--serach key: ~interrupts
|
||||
function parser:interrupt (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
@@ -4193,6 +4194,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
end
|
||||
|
||||
_current_encounter_id = encounterID
|
||||
_detalhes.boss1_health_percent = 1
|
||||
|
||||
if (_current_encounter_id == 2122) then --g'huun --REMOVE ON 9,0 PATCH
|
||||
C_Timer.After (1, function()
|
||||
|
||||
@@ -871,11 +871,24 @@ end
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internal functions
|
||||
|
||||
function _detalhes:HealthTick()
|
||||
if (UnitExists ("boss1") and IsInRaid() and IsInInstance()) then
|
||||
local health = (UnitHealth ("boss1") or 0) / (UnitHealthMax ("boss1") or 0)
|
||||
if (_detalhes.boss1_health_percent) then
|
||||
if (_detalhes.boss1_health_percent < health) then
|
||||
return
|
||||
end
|
||||
end
|
||||
_detalhes.boss1_health_percent = health
|
||||
end
|
||||
end
|
||||
|
||||
--> is in combat yet?
|
||||
function _detalhes:EstaEmCombate()
|
||||
|
||||
_detalhes:TimeDataTick()
|
||||
_detalhes:BrokerTick()
|
||||
_detalhes:HealthTick()
|
||||
|
||||
if ((_detalhes.zone_type == "pvp" and _detalhes.use_battleground_server_parser) or _detalhes.zone_type == "arena" or _InCombatLockdown()) then
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user