fixed accountInfo bug in retail

fixed "attempt to index local 'accountInfo' (a number value)"
Cette révision appartient à :
Albirew 2019-09-27 15:37:54 +02:00
Parent 70622b9f88
révision 7ad34c7558

Voir le fichier

@ -297,7 +297,12 @@ function Postal_BlackBook:OnChar(editbox, ...)
local numBNetTotal, numBNetOnline = BNGetNumFriends() local numBNetTotal, numBNetOnline = BNGetNumFriends()
for i = 1, numBNetOnline do for i = 1, numBNetOnline do
local presenceID, presenceName, battleTag, isBattleTagPresence, toonName, toonID, client, isOnline, lastOnline, isAFK, isDND, messageText, noteText, isRIDFriend, messageTime, canSoR = BNGetFriendInfo(i) 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 if strfind(strupper(toonName), text, 1, 1) == 1 then
newname = toonName newname = toonName
break break
@ -368,7 +373,12 @@ function Postal_BlackBook:SortAndCountNumFriends()
local numBNetTotal, numBNetOnline = BNGetNumFriends() local numBNetTotal, numBNetOnline = BNGetNumFriends()
for i= 1, numBNetOnline do for i= 1, numBNetOnline do
local presenceID, presenceName, battleTag, isBattleTagPresence, toonName, toonID, client, isOnline, lastOnline, isAFK, isDND, messageText, noteText, isRIDFriend, messageTime, canSoR = BNGetFriendInfo(i) 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 -- Check if already on friends list
local alreadyOnList = false local alreadyOnList = false
for j = 1, numFriends do for j = 1, numFriends do