In that case, if there's two players with the same name from different realms, it will assign the item to the first player.
Replace the function AssignLoot (around line 150 in MasterLootManager.lua) with this:
Code:
local function AssignLoot(pItemLink, pPlayerName)
--First we need to find the item slot for the current open loot window
local itemSlot, itemLink
for itemIndex=1, GetNumLootItems() do
itemLink = GetLootSlotLink(itemIndex)
if itemLink == pItemLink then
itemSlot = itemIndex;
break
end
end
--Damnit...
if itemSlot == nil then
MasterLootManager:Print(string.format(MLM_Local["MasterLootManger: Cannot find item - "],pItemLink))
return false
end
--Now find the player, as of 5.0 master loot candidates must be checked with the loot slot
local filteredPlayerName, separatorIndex
for winningPlayerIndex = 1, 40 do
filteredPlayerName = GetMasterLootCandidate(itemSlot, winningPlayerIndex)
if (filteredPlayerName == nil) then
break
end
separatorIndex = filteredPlayerName:find("-");
if (separatorIndex ~= nil) then
--If the player is from a different realm
filteredPlayerName = filteredPlayerName:sub(0, separatorIndex - 1);
end
if (filteredPlayerName == pPlayerName) then
GiveMasterLoot(itemSlot, winningPlayerIndex)
return true
end
end
MasterLootManager:Print(string.format(MLM_Local["MasterLootManger: Cannot find player - "],pPlayerName))
end
I haven't tested it, so let me know if any Lua errors happen.