Hi there, I recently made a post asking for suggestion for good Loot Master Addon as a replacement for Mater Looter Manager Remix which was the greatest addon I have ever seen for that purpouse.
Thing is that nobody was able to suggest me one and I found only lame replacements.
So I decided to look into the code and debug a little the addon.
What I found out was that the addon is not able to award the loot to the players which are not from the same realm as Master Looter. I suppose there is a mistake in code (it was abadoned 2 years ago so yeah) that list names of players who /roll and then tries to award the item to the person with certain name from that list. But actually name is different since he is from different realm. So the item is not awarded in the end.
I went into the code and found two functions which might be responsible for that and with maybe some tweaking it might work again. Sadly Im no expert on LUA and have only very basic knowladge of C++ from highschool. So I hope someone kind enough look into it and check if it can be fixed.
local itemLink = MasterLootTable:GetItemLink(self.currentItemIndex)
if AssignLoot(itemLink, MasterLootRolls.winningPlayer) then
MasterLootLogger:ProcessItem(itemLink, MasterLootRolls.winningPlayer, self.lastRollType, MasterLootRolls:GetWinningValue());
self:Speak(string.format(MLM_Local["Congratutlations to on winning"], MasterLootRolls.winningPlayer, itemLink))
local buttonName = buttonFrame:GetName()
local playerNameLabel = getglobal(buttonName .. "_PlayerName")
MasterLootRolls.winningPlayer = playerNameLabel:GetText()
Man, that getglobal() is so old and rotten it smells worse than dead fish. I didn't even realize it was still in the API until seeing your post made me go look it up. (I woulda thought that deprecated stuff would get removed in 6.0.)
I haven't looked at the API descriptions for AssignLoot, but on teh assumption that it's correct, I would recommend looking at the code which creates those buttons. It looks like the only place where the original author is keeping track of player names is in the graphical labels on the buttons themselves. I bet if you find out how those labels are being built, that will answer your question.
Without having looked at the code myself, I'm betting that: (1) the button labels are built around the player name, not the full player+realm name, and that (2) in order to get the AssignLoot call to work, you'll have to make the button labels include the realm name.
The proper way to do this would be to keep the player's full toon+realm name in a hidden field, and the visible button label separate. Have the AssignLoot call always use the hidden full name, and that way you can choose what to display in the labels without borking up functionality. It also means less "ripple" effect when, say, Blizzard comes along and makes the name suddenly include more information. :-) However, making that change to old code would probably be more effort than simply adjusting an existing, maintained addon...
...or learning enough Lua to code it up yourself. Scratching an itch is how most of us got started!