diff --git a/Modules/BlackBook.lua b/Modules/BlackBook.lua index 95f0652..686fd5d 100644 --- a/Modules/BlackBook.lua +++ b/Modules/BlackBook.lua @@ -297,7 +297,12 @@ function Postal_BlackBook:OnChar(editbox, ...) local numBNetTotal, numBNetOnline = BNGetNumFriends() for i = 1, numBNetOnline do local presenceID, presenceName, battleTag, isBattleTagPresence, toonName, toonID, client, isOnline, lastOnline, isAFK, isDND, messageText, noteText, isRIDFriend, messageTime, canSoR = BNGetFriendInfo(i) - if (toonName and client == BNET_CLIENT_WOW and CanCooperateWithGameAccount(toonID)) then + if (WOW_PROJECT_ID == WOW_PROJECT_CLASSIC) then + local accountID = toonID + else + local accountID = C_BattleNet.GetFriendAccountInfo(i) + end + if (toonName and client == BNET_CLIENT_WOW and CanCooperateWithGameAccount(accountID)) then if strfind(strupper(toonName), text, 1, 1) == 1 then newname = toonName break @@ -368,7 +373,12 @@ function Postal_BlackBook:SortAndCountNumFriends() local numBNetTotal, numBNetOnline = BNGetNumFriends() for i= 1, numBNetOnline do local presenceID, presenceName, battleTag, isBattleTagPresence, toonName, toonID, client, isOnline, lastOnline, isAFK, isDND, messageText, noteText, isRIDFriend, messageTime, canSoR = BNGetFriendInfo(i) - if (toonName and client == BNET_CLIENT_WOW and CanCooperateWithGameAccount(toonID)) then + if (WOW_PROJECT_ID == WOW_PROJECT_CLASSIC) then + local accountID = toonID + else + local accountID = C_BattleNet.GetFriendAccountInfo(i) + end + if (toonName and client == BNET_CLIENT_WOW and CanCooperateWithGameAccount(accountID)) then -- Check if already on friends list local alreadyOnList = false for j = 1, numFriends do