Thread Tools Display Modes
07-28-12, 09:20 AM   #1
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Interesting BNet API Change on Build 15913

Just a change to the function BNGetFriendInfoByID(toastData)

Old:
Lua Code:
  1. elseif ( toastType == BN_TOAST_TYPE_BROADCAST ) then
  2.         local presenceID, givenName, surname, toonName, toonID, client, isOnline, lastOnline, isAFK, isDND, messageText = BNGetFriendInfoByID(toastData);

New:
Lua Code:
  1. elseif ( toastType == BN_TOAST_TYPE_BROADCAST ) then
  2.         local presenceID, presenceName, battleTag, isBattleTagPresence, toonName, toonID, client, isOnline, lastOnline, isAFK, isDND, messageText = BNGetFriendInfoByID(toastData);

This also was changed for any other BNGet functions to provide a 'presenceName' instead of 'givenName' and 'surname'. This is all to start using the new BattleTag id system.

Also some new BATTLENET_FONT_COLOR_CODE and BATTLENET_FONT_COLOR globals in the Contants.lua.

BATTLENET_FONT_COLOR_CODE = "|cff82c5ff";
BATTLENET_FONT_COLOR = {r=0.510, g=0.773, b=1.0};

Last edited by suicidalkatt : 07-28-12 at 09:38 AM.
 
07-28-12, 09:28 PM   #2
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
I noticed that too, maybe we can finally create that alt-tracker addon/unique colored names for realid friends? :P
 
07-29-12, 04:24 AM   #3
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
I would love that.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
07-29-12, 12:29 PM   #4
Sharparam
A Flamescale Wyrmkin
 
Sharparam's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2011
Posts: 102
I'm getting 16 return values from BNGetFriendInfo/BNGetFriendInfoByID:

Code:
 1: PresenceID
 2: PresenceName
 3: BattleTag
 4: IsBattleTagPresence
 5: ToonName
 6: ToonID
 7: Client
 8: IsOnline
 9: LastOnline
10: IsAFK
11: IsDND
12: BroadcastText
13: NoteText
14: IsFriend (Unknown purpose according to wowpedia/wowprogramming)
15: BroadcastTime
16: Unknown [boolean]
Some of the higher number return values (13+?) might not have appropriate names here, if they have also changed from live.
 
07-29-12, 12:37 PM   #5
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,877
IsFriend may mean that they are also listed on your friends list as a regular friend ( toon wise ).
__________________
 
07-29-12, 01:38 PM   #6
Sharparam
A Flamescale Wyrmkin
 
Sharparam's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2011
Posts: 102
Originally Posted by Xrystal View Post
IsFriend may mean that they are also listed on your friends list as a regular friend ( toon wise ).
That's what I think too. I'll test it ^^

EDIT: No, I just tested on a RealID friend that I do not have on normal friend list. IsFriend was true.

Could it be something related to if the toon is friendly to you? (Same faction/realm et.c)

EDIT2: This testing is on live.
EDIT3: Could it be that the labeling on wowpedia is incorrect? I'm not sure where they got the "isFriend" from.

Last edited by Sharparam : 07-29-12 at 01:44 PM.
 
07-29-12, 01:47 PM   #7
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
isFriend should be isRIDFriend. That might clear things up a little.

The last boolean is canSoR.

Code:
local presenceID, presenceName, battleTag, isBattleTagPresence, toonName, toonID, client, isOnline, lastOnline, isAFK, isDND, messageText, noteText, isRIDFriend, messageTime, canSoR = BNGetFriendInfo(id)
 
07-29-12, 02:14 PM   #8
Sharparam
A Flamescale Wyrmkin
 
Sharparam's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2011
Posts: 102
Originally Posted by Haleth View Post
isFriend should be isRIDFriend. That might clear things up a little.
Ah, but isn't it useless then? Or can you use BNGetFriendInfo on people that are not on your RealID friend list? Guess I'm missing something here :d

EDIT: Wrong API function >.<
 
07-29-12, 02:35 PM   #9
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Battletags uses this function aswell, that is probably why that return is in.
 
08-14-12, 12:19 PM   #10
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
BNGetFriendToonInfo() on beta:
Code:
1  hasFocus (boolean)
2  toonName (string)
3  client (string)
4  realmName (string)
5  realmID (number)
6  faction (string) -- this one is changed, used to be a number
7  race (string)
8  class (string) -- localized
9  guild (string) -- seems to return empty even if the player is in a guild
10 zoneName (string)
11 level (number)
12 gameText (string)
12 broadcastText (string)
13 unknown (string) -- this one is new
14 broadcastTime (number)
15 canSoR (boolean) -- this one is new
16 toonID (number) -- this one is new

Last edited by p3lim : 08-14-12 at 12:31 PM.
 
08-14-12, 06:34 PM   #11
MysticalOS
A Wyrmkin Dreamwalker
 
MysticalOS's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 54
presenceName is just the merging of name and surname together, so arg 3 can be a new arg, battletag. of course arg 4 also shoved a "isbattletag" arg in there as well. being point, they didn't actually get rid of name or surname. presenceName = name+surname

just thought i'd clarify this since i've done a lot of work with the api recently.
 
08-15-12, 03:43 AM   #12
shurshik
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 31
Was waiting that they add "server name" too. Without server I can`t find a way to invite bnet fiends from other realms to a party.
 
08-15-12, 04:10 AM   #13
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by shurshik View Post
Was waiting that they add "server name" too. Without server I can`t find a way to invite bnet fiends from other realms to a party.
4th return in BNGetFriendToonInfo()
 
08-30-12, 08:42 AM   #14
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
what is the difference between BNGetFriendToonInfo and BNGetFriendInfo? Im using BNGetFriendInfo with all the same returns... it would seem there is no difference? hmm and i saw a 3rd way up there? BNGetFriendInfoByID?
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]

Last edited by Grimsin : 08-30-12 at 09:40 AM.
 
08-30-12, 02:40 PM   #15
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Grimsin View Post
what is the difference between BNGetFriendToonInfo and BNGetFriendInfo?
BNGetFriendInfo returns information about your friend, the person, and one character they are currently logged into.

BNGetFriendToonInfo returns information about a character your friend is currently logged into. You can call it multiple times with different arguments to get information about all of the characters they are currently logged into.

If your friend is only logged into one character, then BNGetFriendToonInfo isn't terribly useful, but if they are logged into more than one character, it's the only way to get information about the additional characters.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
 
 

WoWInterface » Site Forums » Archived Beta Forums » MoP Beta archived threads » Interesting BNet API Change on Build 15912

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off