WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   MoP Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=162)
-   -   Interesting BNet API Change on Build 15912 (https://www.wowinterface.com/forums/showthread.php?t=43797)

suicidalkatt 07-28-12 09:20 AM

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};

Vlad 07-28-12 09:28 PM

I noticed that too, maybe we can finally create that alt-tracker addon/unique colored names for realid friends? :P

zork 07-29-12 04:24 AM

I would love that.

Sharparam 07-29-12 12:29 PM

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.

Xrystal 07-29-12 12:37 PM

IsFriend may mean that they are also listed on your friends list as a regular friend ( toon wise ).

Sharparam 07-29-12 01:38 PM

Quote:

Originally Posted by Xrystal (Post 258955)
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.

Haleth 07-29-12 01:47 PM

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)

Sharparam 07-29-12 02:14 PM

Quote:

Originally Posted by Haleth (Post 258962)
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 >.<

p3lim 07-29-12 02:35 PM

Battletags uses this function aswell, that is probably why that return is in.

p3lim 08-14-12 12:19 PM

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


MysticalOS 08-14-12 06:34 PM

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.

shurshik 08-15-12 03:43 AM

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.

p3lim 08-15-12 04:10 AM

Quote:

Originally Posted by shurshik (Post 259663)
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()

Grimsin 08-30-12 08:42 AM

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?

Phanx 08-30-12 02:40 PM

Quote:

Originally Posted by Grimsin (Post 261163)
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.


All times are GMT -6. The time now is 12:06 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI