API BNGetFriendInfo

From Wowpedia
Jump to: navigation, search

Returns information about the specified RealID friend.

bnetIDAccount, accountName, battleTag, isBattleTagPresence, characterName, bnetIDGameAccount, client, isOnline, lastOnline, isAFK, isDND, messageText, noteText, isRIDFriend, messageTime, canSoR, isReferAFriend, canSummonFriend = BNGetFriendInfo(friendIndex)

Arguments

friendIndex 
Number - The index on the friends list for this RealID friend.

Returns

bnetIDAccount 
Number - A unique numeric identifier for the friend's battle.net account during this session.
accountName 
String - An escape sequence (starting with |K) representing the friend's full name or BattleTag name.
battleTag 
String - A nickname and number that when combined, form a unique string that identifies the friend (e.g., "Nickname#0001").
isBattleTagPresence 
Boolean - Whether or not the friend is known by their BattleTag.
characterName 
String - The name of the logged in character.
bnetIDGameAccount 
Number - A unique numeric identifier for the friend's game account during this session.
client 
String - See below "Client list"
isOnline 
Boolean - Whether or not the friend is online.
lastOnline 
Number - The number of seconds elapsed since this friend was last online (from the epoch date of January 1, 1970). Returns nil if currently online.
isAFK 
Boolean - Whether or not the friend is flagged as Away.
isDND 
Boolean - Whether or not the friend is flagged as Busy.
messageText 
String - The friend's Battle.Net broadcast message.
noteText 
String - The contents of the player's note about this friend.
isRIDFriend 
Boolean - Returns true for RealID friends and false for BattleTag friends.
messageTime 
Number - The number of seconds elapsed since the current broadcast message was sent.
canSoR 
Boolean - Whether or not this friend can receive a Scroll of Resurrection.
isReferAFriend 
Boolean
canSummonFriend 
Boolean

Client list

returned value corresponding global variable game name
App BNET_CLIENT_APP Battle.Net-Client
CLNT BNET_CLIENT_CLNT (unknown)
D3 BNET_CLIENT_D3 Diablo 3
Hero BNET_CLIENT_HEROES Heroes of the Storm
S2 BNET_CLIENT_SC2 Starcarft 2
WoW BNET_CLIENT_WOW World of Warcraft
WTCG BNET_CLIENT_WTCG Hearthstone
Pro BNET_CLIENT_OVERWATCH Overwatch

A short macro to get current list in WoW

/run for i,v in pairs(_G) do if type(i)=="string" and i:match("BNET_CLIENT_") then print(i,"=",v) end end

See also

Patch changes

  • WoD Patch 6.2.4 (2016-03-22): Replaced presenceID and presenceName with bnetIDAccount and accountName.
  • MoP Patch 5.0.4 (2012-08-28): Replaced givenName and surname with presenceName, battleTag, and isBattleTagPresence.