Skip to content

Commit 2a33d81

Browse files
committed
Fix PvP Cross-realm targeting
1 parent 8e7a5a2 commit 2a33d81

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ShardSource.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ f:SetScript("OnEvent", function(self, event, ...)
6464
ShowBagColors()
6565
elseif event == "COMBAT_LOG_EVENT_UNFILTERED" then
6666
local timestamp, subevent, _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags = CombatLogGetCurrentEventInfo()
67-
if subevent == "UNIT_DIED" and destName == UnitName("target") and targetCanGiveXP then
67+
local fname = strsplit("-", destName)
68+
if subevent == "UNIT_DIED" and fname == UnitName("target") and targetCanGiveXP then
6869
ctype = strsplit("-", destGUID)
69-
lastShardKill = destName.."_"..ctype.."_"..levelDelta.."_"..targtype.."_"..targlvl
70+
lastShardKill = fname.."_"..ctype.."_"..levelDelta.."_"..targtype.."_"..targlvl
7071
DebugLog("Target died while targeted: " .. lastShardKill)
7172
UpdateShardList()
7273
elseif subevent == "SPELL_CAST_SUCCESS" and sourceName == UnitName("player") then
@@ -345,6 +346,9 @@ function ShardProcess()
345346
elseif hadShardAt ~= "" then
346347
DebugLog("Shard Moved from " .. hadShardAt .. " to " .. newShardLoc)
347348
Shards[newShardLoc] = Shards[hadShardAt]
349+
--else
350+
-- DebugLog("Unidentified Shard - Randomizing")
351+
-- Shards[newShardLoc] = "Unknown_000_0_normal_-1"
348352
end
349353
end
350354

0 commit comments

Comments
 (0)