From 628b14ec421068bac6164bd77809308cf0856610 Mon Sep 17 00:00:00 2001 From: Flamanis Date: Thu, 9 Nov 2023 13:46:49 -0600 Subject: [PATCH] Fix single segment BG and a couple missed unitnames --- classes/class_utility.lua | 4 ++-- core/parser.lua | 8 ++++++++ functions/pack.lua | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/classes/class_utility.lua b/classes/class_utility.lua index 323fb1036..472ee7d7f 100644 --- a/classes/class_utility.lua +++ b/classes/class_utility.lua @@ -1565,7 +1565,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out) for buffIndex = 1, 41 do local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL") if (name and unitCaster and UnitExists(unitCaster) and UnitIsUnit(unitCaster, "player")) then - local playerName = _UnitName ("player") + local playerName = Details.playername local playerGUID = UnitGUID("player") if (playerGUID) then if (in_or_out == "BUFF_UPTIME_IN") then @@ -1606,7 +1606,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out) for buffIndex = 1, 41 do local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL") if (name and unitCaster and UnitExists(unitCaster) and UnitIsUnit(unitCaster, "player")) then - local playerName = _UnitName ("player") + local playerName = Details.playername local playerGUID = UnitGUID("player") if (playerGUID) then diff --git a/core/parser.lua b/core/parser.lua index 8bc1fcf79..a94414f8c 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -7125,6 +7125,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 Details.pvp_parser_frame.ticker = nil end + local _player, realmName = UnitFullName('player') + function Details.pvp_parser_frame:ReadPvPData() local players = GetNumBattlefieldScores() @@ -7136,6 +7138,12 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 name, killingBlows, honorableKills, deaths, honorGained, faction, race, class, classToken, damageDone, healingDone, bgRating, ratingChange, preMatchMMR, mmrChange, talentSpec = GetBattlefieldScore(i) end + if (not isWOTLK and not isERA) then --Must be dragonflight + if (not name:match('%-')) then + name = name .. '-' .. realmName + end + end + --damage done local actor = Details.tabela_vigente(1, name) if (actor) then diff --git a/functions/pack.lua b/functions/pack.lua index 05dc921c2..e97e90dc3 100644 --- a/functions/pack.lua +++ b/functions/pack.lua @@ -931,7 +931,7 @@ function Details.packFunctions.PackUtility(combatObject) local actorsToPack = {} --get the player object from the combat > utility container - local playerName = UnitName("player") + local playerName = Details.playername local playerObject = combatObject:GetActor(DETAILS_ATTRIBUTE_MISC, playerName) if (not playerObject) then if (isDebugging) then