From 2f7c460f534ee2c705b4446d4efa2a27402f3dd1 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Sat, 14 Feb 2015 22:52:10 +0400 Subject: [PATCH] Cause fuck sending messages to HoTS --- ElvUI_SLE/modules/sledatatexts/friends.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ElvUI_SLE/modules/sledatatexts/friends.lua b/ElvUI_SLE/modules/sledatatexts/friends.lua index e0907f9..66e3261 100644 --- a/ElvUI_SLE/modules/sledatatexts/friends.lua +++ b/ElvUI_SLE/modules/sledatatexts/friends.lua @@ -18,6 +18,8 @@ local ONE_DAY = 24 * ONE_HOUR; local ONE_MONTH = 30 * ONE_DAY; local ONE_YEAR = 12 * ONE_MONTH; +local realid_table = {} + local function sletime_Conversion(timeDifference, isAbsolute) if ( not isAbsolute ) then timeDifference = time() - timeDifference; @@ -248,8 +250,15 @@ local function Entry_OnMouseUp(frame, info, button) end if i_type == "realid" then - local name = full_name..":"..presence_id - SetItemRef( "BNplayer:"..name, ("|HBNplayer:%1$s|h[%1$s]|h"):format(name), "LeftButton" ) + local name + for _, player in ipairs(realid_table) do + if player["GIVENNAME"] == presence_id and player["CLIENT"] == "Hero" then + name = presence_id..":"..player["PRESENCEID"] + break + end + end + if not name then name = full_name..":"..presence_id end + SetItemRef( "BNplayer:"..name, ("|HBNplayer:%1$s|h[%1$s]|h"):format(name), "LeftButton" ) else SetItemRef( "player:"..full_name, ("|Hplayer:%1$s|h[%1$s]|h"):format(full_name), "LeftButton" ) end @@ -349,7 +358,7 @@ function LDB.OnEnter(self) tooltip:AddSeparator() if numBNOnline > 0 then - local realid_table = {} + realid_table = {} for i = 1, numBNOnline do local presenceID, givenName, bTag, _, _, toonID, gameClient, isOnline, lastOnline, isAFK, isDND, broadcast, note, _, castTime = BNGetFriendInfo(i) local _, toonName, client, realmName, realmID, faction, race, class, guild, zoneName, level, gameText = BNGetToonInfo(toonID or 0) -- 1.7.9.5