Skip to content

Commit

Permalink
Merge pull request #625 from Flamanis/FixSingleSegmentBG
Browse files Browse the repository at this point in the history
Fix single segment BG and a couple missed unitnames
  • Loading branch information
Tercioo authored Nov 9, 2023
2 parents 8b026db + 628b14e commit 61d9375
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions classes/class_utility.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions core/parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion functions/pack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 61d9375

Please sign in to comment.