Skip to content

Commit

Permalink
Setting Details.playername cache as "player-realm" for 10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Oct 28, 2023
1 parent 9c4f249 commit b304b3b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
6 changes: 4 additions & 2 deletions classes/container_pets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ local setmetatable = setmetatable
local bitBand = bit.band --lua local
local pairs = pairs

local unitIDRaidCache = Details222.UnitIdCache.Raid

--details locals
local bIsIgnored = Details.pets_ignored

Expand Down Expand Up @@ -61,10 +63,10 @@ function container_pets:PegaDono(petGUID, petName, petFlags)
if (IsInRaid()) then
for i = 1, GetNumGroupMembers() do
if (petGUID == UnitGUID("raidpet"..i)) then
dono_serial = UnitGUID("raid"..i)
dono_serial = UnitGUID(unitIDRaidCache[i])
dono_flags = 0x00000417 --emulate sourceflag flag

local nome, realm = UnitName("raid"..i)
local nome, realm = UnitName(unitIDRaidCache[i])
if (realm and realm ~= "") then
nome = nome.."-"..realm
end
Expand Down
11 changes: 9 additions & 2 deletions core/parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2196,14 +2196,15 @@
--10/30 15:34:47.249 SPELL_EMPOWER_START,Player-4184-0048EE5B,"Nezaland-Valdrakken",0x514,0x0,Player-4184-0048EE5B,"Nezaland-Valdrakken",0x514,0x0,382266,"Fire Breath",0x4
--357209 damage spell is different from the spell cast

local playerNameWithRealm = UnitName("player") .."-".. GetRealmName()

-----------------------------------------------------------------------------------------------------------------------------------------
--SUMMON serach key: ~summon |
-----------------------------------------------------------------------------------------------------------------------------------------
function parser:summon(token, time, sourceSerial, sourceName, sourceFlags, petSerial, petName, petFlags, petRaidFlags, spellId, spellName)
if (not sourceName) then
sourceName = "[*] " .. spellName
end

local npcId = tonumber(select(6, strsplit("-", petSerial)) or 0)

--differenciate army and apoc pets for DK
Expand Down Expand Up @@ -6104,7 +6105,13 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
Details.in_combat = false
Details.combat_id = 0
Details.opened_windows = 0
Details.playername = UnitName("player")

local _, _, _, toc = GetBuildInfo()
if (toc >= 100200) then
Details.playername = UnitName("player") .. "-" .. GetRealmName()
else
Details.playername = UnitName("player")
end

--player faction and enemy faction
Details.faction = UnitFactionGroup("player")
Expand Down

0 comments on commit b304b3b

Please sign in to comment.