Backend improvements and bug fixes

- Fixed an error when hovering over some spells in the Auras panel on the Player Breakdown window.
- Fixed the character item level, which was not showing for players that left the party group on the Player Breakdown window.
- Fixed boss images not showing at the segments selection menu.
- Other updates related to encounter journal and mythic+, both under development.
This commit is contained in:
Tercio Jose
2023-12-26 11:38:00 -03:00
parent 7a3c32f6f8
commit d102fe7a07
12 changed files with 844 additions and 560 deletions
+70 -69
View File
@@ -5334,17 +5334,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
Details:Msg("(debug) |cFFFFFF00ENCOUNTER_START|r event triggered.")
end
if (not isWOTLK) then
C_Timer.After(1, function()
if (Details.show_warning_id1) then
if (Details.show_warning_id1_amount < 2) then
Details.show_warning_id1_amount = Details.show_warning_id1_amount + 1
--Details:Msg("|cFFFFFF00you might find differences on damage done, this is due to a bug in the game client, nothing related to Details! itself (" .. Details.show_warning_id1_amount .. " / 10).")
end
end
end)
end
Details222.Perf.WindowUpdate = 0
Details222.Perf.WindowUpdateC = true
@@ -5370,7 +5359,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
for i = 1, 5 do
local boss = UnitExists("boss" .. i)
if (boss) then
local targetName = UnitName ("boss" .. i .. "target")
local targetName = UnitName("boss" .. i .. "target")
if (targetName and type(targetName) == "string") then
Details.bossTargetAtPull = targetName
break
@@ -5388,15 +5377,14 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
_current_encounter_id = encounterID
Details.boss1_health_percent = 1
local dbm_mod, dbm_time = Details.encounter_table.DBM_Mod, Details.encounter_table.DBM_ModTime
local DBM_MOD, DBM_TIME = Details.encounter_table.DBM_Mod, Details.encounter_table.DBM_ModTime
Details:Destroy(Details.encounter_table)
Details.encounter_table.phase = 1
--store the encounter time inside the encounter table for the encounter plugin
Details.encounter_table.start = GetTime()
Details.encounter_table ["end"] = nil
-- local encounterID = Details.encounter_table.id
Details.encounter_table["end"] = nil
Details.encounter_table.id = encounterID
Details.encounter_table.name = encounterName
Details.encounter_table.diff = difficultyID
@@ -5404,39 +5392,18 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
Details.encounter_table.zone = zoneName
Details.encounter_table.mapid = zoneMapID
if (dbm_mod and dbm_time == time()) then --pode ser time() usado no start pra saber se foi no mesmo segundo.
Details.encounter_table.DBM_Mod = dbm_mod
if (DBM_MOD and DBM_TIME == time()) then
Details.encounter_table.DBM_Mod = DBM_MOD
end
local encounter_start_table = Details:GetEncounterStartInfo (zoneMapID, encounterID)
if (encounter_start_table) then
if (encounter_start_table.delay) then
if (type(encounter_start_table.delay) == "function") then
local delay = encounter_start_table.delay()
if (delay) then
--_detalhes.encounter_table ["start"] = time() + delay
Details.encounter_table ["start"] = GetTime() + delay
end
else
--_detalhes.encounter_table ["start"] = time() + encounter_start_table.delay
Details.encounter_table ["start"] = GetTime() + encounter_start_table.delay
end
end
if (encounter_start_table.func) then
encounter_start_table:func()
end
end
local encounter_table, boss_index = Details:GetBossEncounterDetailsFromEncounterId (zoneMapID, encounterID)
if (encounter_table) then
Details.encounter_table.index = boss_index
local encounterTable, bossIndex = Details:GetBossEncounterDetailsFromEncounterId(zoneMapID, encounterID)
if (encounterTable) then
Details.encounter_table.index = bossIndex
end
Details:SendEvent("COMBAT_ENCOUNTER_START", nil, ...)
end
--ENCOUNRTER_END
function Details.parser_functions:ENCOUNTER_END(...)
if (Details.debug) then
@@ -5445,26 +5412,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
Details222.Perf.WindowUpdateC = false
if (not isWOTLK) then
C_Timer.After(1, function()
if (Details.show_warning_id1) then
if (Details.show_warning_id1_amount < 2) then
Details.show_warning_id1_amount = Details.show_warning_id1_amount + 1
--Details:Msg("|cFFFFFF00you may find differences on damage done, this is due to a bug in the game client, nothing related to Details! itself (" .. Details.show_warning_id1_amount .. " / 10).")
end
end
end)
end
_current_encounter_id = nil
local _, instanceType = GetInstanceInfo() --let's make sure it isn't a dungeon
if (Details.zone_type == "party" or instanceType == "party") then
if (Details.debug) then
Details:Msg("(debug) the zone type is 'party', ignoring ENCOUNTER_END.")
end
end
local encounterID, encounterName, difficultyID, raidSize, endStatus = select(1, ...)
if (not Details.encounter_table.start) then
@@ -5480,25 +5429,25 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
Details.latest_ENCOUNTER_END = GetTime()
Details.encounter_table ["end"] = GetTime() -- 0.351
local _, _, _, _, _, _, _, zoneMapID = GetInstanceInfo()
Details.encounter_table["end"] = GetTime()
local bossIcon = Details:GetBossEncounterTexture(encounterName)
_current_combat.bossIcon = bossIcon
_current_combat.EncounterName = encounterName
if (_in_combat) then
if (endStatus == 1) then
Details.encounter_table.kill = true
Details:SairDoCombate (true, {encounterID, encounterName, difficultyID, raidSize, endStatus}) --killed
Details:SairDoCombate(true, {encounterID, encounterName, difficultyID, raidSize, endStatus}) --killed
else
Details.encounter_table.kill = false
Details:SairDoCombate (false, {encounterID, encounterName, difficultyID, raidSize, endStatus}) --wipe
Details:SairDoCombate(false, {encounterID, encounterName, difficultyID, raidSize, endStatus}) --wipe
end
else
if ((Details.tabela_vigente:GetEndTime() or 0) + 2 >= Details.encounter_table ["end"]) then
Details.tabela_vigente:SetStartTime (Details.encounter_table ["start"])
Details.tabela_vigente:SetEndTime (Details.encounter_table ["end"])
Details.tabela_vigente:SetStartTime(Details.encounter_table ["start"])
Details.tabela_vigente:SetEndTime(Details.encounter_table ["end"])
Details:RefreshMainWindow(-1, true)
end
end
@@ -5813,16 +5762,68 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
function Details.parser_functions:CHALLENGE_MODE_COMPLETED(...)
Details222.MythicPlus.WorldStateTimerEndAt = time()
local mapChallengeModeID, level, time, onTime, keystoneUpgradeLevels, practiceRun, oldOverallDungeonScore, newOverallDungeonScore, IsMapRecord, IsAffixRecord, PrimaryAffix, isEligibleForScore, members = C_ChallengeMode.GetCompletionInfo()
---@type number mapID
---@type number level
---@type number time
---@type boolean onTime
---@type number keystoneUpgradeLevels
---@type boolean practiceRun
---@type number oldDungeonScore
---@type number newDungeonScore
---@type boolean isMapRecord
---@type boolean isAffixRecord
---@type number primaryAffix
---@type boolean isEligibleForScore
---@type table upgradeMembers
local mapID, level, time, onTime, keystoneUpgradeLevels, practiceRun, oldDungeonScore, newDungeonScore, isAffixRecord, isMapRecord, primaryAffix, isEligibleForScore, upgradeMembers = C_ChallengeMode.GetCompletionInfo()
Details222.MythicPlus.bOnTime = onTime
if (time) then
Details222.MythicPlus.MapID = mapID
Details222.MythicPlus.Level = level --level of the key just finished
Details222.MythicPlus.OnTime = onTime
Details222.MythicPlus.KeystoneUpgradeLevels = keystoneUpgradeLevels
Details222.MythicPlus.PracticeRun = practiceRun
Details222.MythicPlus.OldDungeonScore = oldDungeonScore
Details222.MythicPlus.NewDungeonScore = newDungeonScore
Details222.MythicPlus.IsAffixRecord = isAffixRecord
Details222.MythicPlus.IsMapRecord = isMapRecord
Details222.MythicPlus.PrimaryAffix = primaryAffix
Details222.MythicPlus.IsEligibleForScore = isEligibleForScore
Details222.MythicPlus.UpgradeMembers = upgradeMembers
local dungeonName, id, timeLimit, texture, backgroundTexture = C_ChallengeMode.GetMapUIInfo(mapID)
Details222.MythicPlus.DungeonName = dungeonName
Details222.MythicPlus.DungeonID = id
Details222.MythicPlus.TimeLimit = timeLimit
Details222.MythicPlus.Texture = texture
Details222.MythicPlus.BackgroundTexture = backgroundTexture
if (time) then
Details222.MythicPlus.time = math.floor(time / 1000)
Details:Msg("run elapsed time:", DetailsFramework:IntegerToTimer(time / 1000))
else
Details222.MythicPlus.time = 0.1
end
if (level >= 28 or UnitGUID("player") == "Player-3209-0B98EC46") then --debug
C_Timer.After(0, function()
if (ChallengeModeCompleteBanner) then
ChallengeModeCompleteBanner.timeToHold = 0.1
--print("ChallengeModeCompleteBanner.timeToHold Existed!")
else
--print("ChallengeModeCompleteBanner.timeToHold DID NOT Existed!")
end
end)
end
--wait until the keystone is updated and send it to the party
C_Timer.After(0.1, function()
local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0", true)
if (openRaidLib) then
openRaidLib.KeystoneInfoManager.SendPlayerKeystoneInfoToParty()
end
end)
--send mythic dungeon end event
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
if (difficultyID == 8) then