C_BattleNet .GetFriendAccountInfo
Jump to navigation
Jump to search
C_BattleNet.GetFriendAccountInfo |
+ 8.2.5 / 3.4.0 / 1.14.4 | AllowedWhenUntainted
| ||
C_BattleNet.GetAccountInfoByID |
+ 8.2.5 / 3.4.0 / 1.14.4 | AllowedWhenUntainted
| ||
C_BattleNet.GetAccountInfoByGUID |
+ 8.2.5 / 3.4.0 / 1.14.4 | AllowedWhenUntainted
| ||
BNGetFriendInfo |
+ 3.3.5 / 1.13.2 | |||
BNGetFriendInfoByID |
+ 3.3.5 / 1.13.2 |
Returns information about a Battle.net friend account.
accountInfo = C_BattleNet.GetFriendAccountInfo(friendIndex [, wowAccountGUID])
= C_BattleNet.GetAccountInfoByID(id [, wowAccountGUID])
= C_BattleNet.GetAccountInfoByGUID(guid)
Arguments
GetFriendAccountInfo
- friendIndex
- number - Index ranging from 1 to BNGetNumFriends()
- wowAccountGUID
- string? : BNetAccountGUID
GetAccountInfoByID
- id
- number : bnetAccountID
- wowAccountGUID
- string? : BNetAccountGUID
GetAccountInfoByGUID
- guid
- string : UnitGUID
Returns
/spew output
- accountInfo
- BNetAccountInfo?
| Field | Type | Description |
|---|---|---|
| bnetAccountID | number | A temporary ID for the friend's battle.net account during this session |
| accountName | string | Kstring representing the friend's full name or BattleTag name. |
| battleTag | string | The friend's BattleTag (e.g., "Nickname#0001") |
| isFriend | boolean | |
| isBattleTagFriend | boolean | |
| lastOnlineTime | 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 Awayther or not the friend is flagged as Busy |
| isDND | boolean | Whether or not the friend is flagged as Busy |
| isFavorite | boolean | Whether or not the friend is marked as a favorite by you |
| appearOffline | boolean | |
| customMessage | string | The Battle.net broadcast message |
| customMessageTime | number | The number of seconds elapsed since the current broadcast message was sent |
| note | string | The contents of the player's note about this friend |
| rafLinkType | Enum.RafLinkType | |
| gameAccountInfo | BNetGameAccountInfo |
| Field | Type | Description |
|---|---|---|
| gameAccountID | number | A temporary ID for the friend's battle.net game account during this session |
| clientProgram | string | BNET_CLIENT |
| isOnline | boolean | |
| isGameBusy | boolean | |
| isGameAFK | boolean | |
| wowProjectID | number? | |
| characterName | string? | The name of the logged in toon/character |
| realmName | string? | The name of the logged in realm |
| realmDisplayName | string? | |
| realmID | number? | The ID for the logged in realm |
| factionName | string? | The englishFaction name (i.e., "Alliance" or "Horde") |
| raceName | string? | The localized race name (e.g., "Blood Elf") |
| className | string? | The localized class name (e.g., "Death Knight") |
| areaName | string? | The localized zone name (e.g., "The Undercity") |
| characterLevel | number? | The current level (e.g., "90") |
| richPresence | string? | For WoW, returns "zoneName - realmName". For StarCraft 2 and Diablo 3, returns the location or activity the player is currently engaged in. |
| playerGuid | WOWGUID? : string | A unique numeric identifier for the friend's character during this session. |
| canSummon | boolean | |
| hasFocus | boolean | Whether or not this toon is the one currently being displayed in Blizzard's FriendFrame |
| regionID | number | 9.1.0 |
| isInCurrentRegion | boolean | 9.1.0 |
| timerunningSeasonID | number? | 10.2.7 |
| Global | Value | Description |
|---|---|---|
| BNET_CLIENT_WOW | WoW | World of Warcraft |
| BNET_CLIENT_APP | App | Battle.net desktop app |
| BNET_CLIENT_HEROES | Hero | Heroes of the Storm |
| BNET_CLIENT_CLNT | CLNT |
Details
| Related API | C_BattleNet.GetFriendGameAccountInfo |
Example
Shows your own account info.
/dump C_BattleNet.GetAccountInfoByID(select(3, BNGetInfo()))
Shows your Battle.net friends' account information.
for i = 1, BNGetNumFriends() do
local acc = C_BattleNet.GetFriendAccountInfo(i)
local game = acc.gameAccountInfo
print(acc.bnetAccountID, acc.accountName, game.gameAccountID, game.isOnline, game.clientProgram)
end
-- 1, "|Kq2|k", 5, true, "BSAp"
-- 2, "|Kq1|k", nil, false, ""
Patch changes
Patch 11.0.5 (2024-10-22): Removed isWowMobilefield.
Patch 8.2.5 (2019-09-24): Changed to C_BattleNet.GetFriendAccountInfo()andC_BattleNet.GetAccountInfoByID().[1]
Patch 6.2.4 (2016-03-22): Replaced presenceIDandpresenceNamewithbnetIDAccountandaccountName.
Patch 5.0.4 (2012-08-28): Replaced givenNameandsurnamewithpresenceName,battleTag, andisBattleTagPresence.
Patch 3.3.5 (2010-06-22): Added as BNGetFriendInfo() and BNGetFriendInfoByID().