Setting Details.playername cache as "player-realm" for 10.2

This commit is contained in:
Tercio Jose
2023-10-28 14:58:02 -03:00
parent 9c4f249c8d
commit b304b3bbe4
2 changed files with 13 additions and 4 deletions
+4 -2
View File
@@ -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
@@ -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
+9 -2
View File
@@ -2196,6 +2196,8 @@
--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 |
-----------------------------------------------------------------------------------------------------------------------------------------
@@ -2203,7 +2205,6 @@
if (not sourceName) then
sourceName = "[*] " .. spellName
end
local npcId = tonumber(select(6, strsplit("-", petSerial)) or 0)
--differenciate army and apoc pets for DK
@@ -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")