- Changed the way mythic dungeons are handled internally.

- Added events: COMBAT_MYTHICDUNGEON_START, COMBAT_MYTHICDUNGEON_END, COMBAT_ENCOUNTER_END, COMBAT_ENCOUNTER_START.
- Added API: Details:GetCombatFromBreakdownWindow()
- Added wasted time in the segment tooltip for mythic dungeon overall and trash overall.
- Added Fel Eruption crowd control.
This commit is contained in:
Tercioo
2019-03-10 21:36:25 -03:00
parent 8f01d34392
commit 29f8cfbf75
12 changed files with 250 additions and 266 deletions
+16 -20
View File
@@ -417,7 +417,7 @@
--> combat creation is completed, remove the flag
_detalhes.tabela_vigente.IsBeingCreated = nil
_detalhes:SendEvent ("COMBAT_PLAYER_ENTER", nil, _detalhes.tabela_vigente, _detalhes.encounter_table and _detalhes.encounter_table.id)
if (_detalhes.tabela_vigente.is_boss) then
--> the encounter was found through encounter_start event
@@ -574,20 +574,16 @@
end
--> tag as a mythic dungeon segment, can be any type of segment, this tag also avoid the segment to be tagged as trash
if (_detalhes.MythicPlus.Started) then
local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo()
if (mythicLevel and mythicLevel >= 2) then
_detalhes.tabela_vigente.is_mythic_dungeon_segment = true
_detalhes.tabela_vigente.is_mythic_dungeon_run_id = _detalhes.mythic_dungeon_id
else
local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo()
if (mythicLevel and mythicLevel >= 2) then
_detalhes.tabela_vigente.is_mythic_dungeon_segment = true
_detalhes.tabela_vigente.is_mythic_dungeon_run_id = _detalhes.mythic_dungeon_id
end
end
--> send item level after a combat if is in raid or party group
C_Timer.After (1, _detalhes.ScheduleSyncPlayerActorData)
--if this segment isn't a boss fight
if (not _detalhes.tabela_vigente.is_boss) then
if (_detalhes.tabela_vigente.is_pvp or _detalhes.tabela_vigente.is_arena) then
@@ -601,10 +597,8 @@
local in_instance = IsInInstance() --> garrison returns party as instance type.
if ((InstanceType == "party" or InstanceType == "raid") and in_instance) then
if (InstanceType == "party") then
if (not _detalhes.tabela_vigente.is_mythic_dungeon_segment) then
--> tag the combat as trash clean up
_detalhes.tabela_vigente.is_trash = true
else
if (_detalhes.tabela_vigente.is_mythic_dungeon_segment) then --setted just above
--is inside a mythic+ dungeon and this is not a boss segment, so tag it as a dungeon mythic+ trash segment
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
_detalhes.tabela_vigente.is_mythic_dungeon_trash = {
ZoneName = zoneName,
@@ -612,6 +606,9 @@
Level = _detalhes.MythicPlus.Level,
EJID = _detalhes.MythicPlus.ejID,
}
else
--> tag the combat as trash clean up
_detalhes.tabela_vigente.is_trash = true
end
else
_detalhes.tabela_vigente.is_trash = true
@@ -643,13 +640,17 @@
_detalhes:FlagActorsOnCommonFight() --fight_component
--_detalhes:CheckMemoryAfterCombat() -- 7.2.5 is doing some weird errors even out of combat
else
--this segment is a boss fight
if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
_detalhes:FlagActorsOnBossFight()
else
_detalhes.schedule_flag_boss_components = true
--_detalhes.schedule_flag_boss_components = true
end
--calling here without checking for combat since the does not ran too long for scripts
_detalhes:FlagActorsOnBossFight()
local boss_id = _detalhes.encounter_table.id
if (bossKilled) then
@@ -657,9 +658,7 @@
--> add to storage
if (not InCombatLockdown() and not UnitAffectingCombat ("player") and not _detalhes.logoff_saving_data) then
--_detalhes.StoreEncounter()
local successful, errortext = pcall (_detalhes.StoreEncounter)
if (not successful) then
_detalhes:Msg ("error occurred on StoreEncounter():", errortext)
@@ -871,10 +870,7 @@
end
_detalhes:CheckForTextTimeCounter()
_detalhes.StoreSpells()
_detalhes:RunScheduledEventsAfterCombat()
end