Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Nov 11, 2023
1 parent d95ff2b commit 7a5529d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
4 changes: 2 additions & 2 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
local addonName, Details222 = ...
local version, build, date, tocversion = GetBuildInfo()

Details.build_counter = 12030
Details.alpha_build_counter = 12030 --if this is higher than the regular counter, use it instead
Details.build_counter = 12031
Details.alpha_build_counter = 12031 --if this is higher than the regular counter, use it instead
Details.dont_open_news = true
Details.game_version = version
Details.userversion = version .. " " .. Details.build_counter
Expand Down
12 changes: 8 additions & 4 deletions core/parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7125,11 +7125,15 @@ 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()

local _player, realmName = UnitFullName("player")
if (not realmName) then
realmName = GetRealmName()
realmName = realmName:gsub("%s+", "")
end

for i = 1, players do
local name, killingBlows, honorableKills, deaths, honorGained, faction, race, rank, class, classToken, damageDone, healingDone, bgRating, ratingChange, preMatchMMR, mmrChange, talentSpec
if (isWOTLK) then
Expand All @@ -7139,8 +7143,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end

if (not isWOTLK and not isERA) then --Must be dragonflight
if (not name:match('%-')) then
name = name .. '-' .. realmName
if (not name:match("%-")) then
name = name .. "-" .. realmName
end
end

Expand Down
14 changes: 8 additions & 6 deletions functions/classes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,17 @@ do
function Details:GetFullName(unitId, ambiguateString)
--UnitFullName is guarantee to return the realm name of the unit queried
local playerName, realmName = UnitFullName(unitId)
realmName = realmName:gsub("%s", "")
if (playerName) then
realmName = realmName:gsub("%s", "")

playerName = playerName .. "-" .. realmName
playerName = playerName .. "-" .. realmName

if (ambiguateString) then
playerName = Ambiguate(playerName, ambiguateString)
end
if (ambiguateString) then
playerName = Ambiguate(playerName, ambiguateString)
end

return playerName
return playerName
end
end

if (toc < 100200) then
Expand Down

0 comments on commit 7a5529d

Please sign in to comment.