Valhalla Legends Forums Archive | Battle.net Bot Development | [Self-Answered] Add/Remove/Promote/Demote Friends to Friends List

AuthorMessageTime
bethra
I was looking at the BnetDocs packet reference for the friends list, however I don't see any documentation on how to add, remove, and promote/demote a friend.

I only see two Friend's List packets that are Client -> Server (Both recieve a response from the server):
[C>0x65]    SID_FRIENDSLIST
[C>0x66]    SID_FRIENDSUPDATE

The other Friend's List packets are only Server -> Client:
[S>0x67]    SID_FRIENDSADD
[S>0x68]    SID_FRIENDSREMOVE
[S>0x69]    SID_FRIENDSPOSITION

I looked at the only two Friend's List Client -> Server packets documented and I don't see how either of them can be used to add, remove, or promote/demote a friend.  The latter of the two only is sent a BYTE by what the documentation says, so that can't possibly be it.  The former is sent nothing, as it says it is for requesting the friend's list.

Just by the names of the 3 Friend's List Server -> Client packets documented, it looks like they are the ones that I want... but they are labeled Server -> Client and their documentation says that the server sends them as well.

So, is there a packet for adding, removing, and promoting/demoting a friend?  Or are there no such packets, for it is simply done by using the [C>0x0E]    SID_CHATCOMMAND packet?

If that is so, then when using Warcraft III (the actual client), you can add a friend by right clicking on the user's name in the channel list on the right.  That means [C>0x0E]    SID_CHATCOMMAND is used as well in this case too?
December 13, 2005, 2:50 PM
bethra
I just packet logged it.  I guess there isn't a specific packet for adding, removing, and promoting/demoting a friend.  It just sends packet 0x0E with the command /f a <username>.
December 13, 2005, 4:26 PM
Arta
Might be worth having a poke around in the official client to see if there's any indication that C->S versions of 0x67-0x69 exist :)
December 13, 2005, 5:15 PM
bethra
Other than packetlogging the official client, I don't know of any other way.

I packetlogged the official client using Warcraft III and tested the right-click on user in channel list's name >> Add Friend, it it seems to use 0x0E to do it.  I also packetlogged sending a 0x0E packet sending the "/f a <username>".
December 13, 2005, 10:22 PM

Search