Valhalla Legends Forums Archive | Battle.net Bot Development | Am I seeing double?

AuthorMessageTime
Eternal
I have a slightly puzzling problem that I'm too close to and now just can't see a way through - if anyone has any pointers or advice to help trouble-shoot, I'd be grateful.

Problem: My roomlist is displaying WAR3 user names twice. Through general testing, I've found that it only happens when the user logs on for the first time (ie, normal channel joins are fine) and it doesn't affect other clients. The wierdest part is that it isn't 100% consistent. 90% of the time, two users will appear. The other 10%, one will appear <scratches head>.

This is a log of my project taken while another WAR3 client has logged on and joined the channel:

[code]1    Recv 
0000  FF 0F 2D 00 02 00 00 00 00 00 00 00 5D 00 00 00    ..-.........]...
0010  00 00 00 00 0D F0 AD BA 0D F0 AD BA 42 44 5F 47    ............BD_G
0020  75 61 72 64 69 61 6E 00 33 52 41 57 00            uardian.3RAW.

2  Recv 
0000  FF 0F 37 00 01 00 00 00 00 00 00 00 5D 00 00 00    ..7.........]...
0010  00 00 00 00 0D F0 AD BA 0D F0 AD BA 42 44 5F 47    ............BD_G
0020  75 61 72 64 69 61 6E 00 33 52 41 57 20 31 52 33    uardian.3RAW 1R3
0030  57 20 30 20 44 62 00                              W 0 Db.
[/code]

And now a log of the same client which is already logged on and joins the channel  (which works fine):
[code]1 Recv 
0000  FF 0F 37 00 02 00 00 00 00 00 00 00 5D 00 00 00    ..7.........]...
0010  00 00 00 00 0D F0 AD BA 0D F0 AD BA 42 44 5F 47    ............BD_G
0020  75 61 72 64 69 61 6E 00 33 52 41 57 20 31 52 33    uardian.3RAW 1R3
0030  57 20 30 20 44 62 00                              W 0 Db.[/code]

If you would find elements of the code helpful, I'm happy to post them (I just wasn't sure what would be the most relevant to show).

Thanks in advance.
April 13, 2005, 6:40 AM
LoRd
When you receive an EID_SHOWUSER for a user that you've already been notified of, then it's a stat update for the user.  You should check to determine if the user's already present in the channel when receiving this event, and if they are, just modify them accordingly.
April 13, 2005, 8:00 AM
iago
[quote author=LoRd[nK] link=topic=11256.msg108431#msg108431 date=1113379229]
When you receive an EID_SHOWUSER for a user that you've already been notified of, then it's a stat update for the user.  You should check to determine if the user's already present in the channel when receiving this event, and if they are, just modify them accordingly.
[/quote]

That's correct.  I used to have a problem with my old bot showing some War3 people twice, and it turned out to be because you sometimes receive a second SHOWUSER.
April 13, 2005, 8:25 AM
Zakath
This is a well known feature of Battle.net. Diablo II has done this since it was first introduced (quite some time ago now).

If you analyzed it, you would notice that the first EID_SHOWUSER notification would have no extended information in the statstring - just the user's product. The second one, meanwhile, would contain either character information (for Diablo II - these sort of updates are only sent to other Diablo II clients) or win/icon information (for Warcraft III). It becomes fairly obvious that what it's doing is updating you on that person's actual status.
April 13, 2005, 7:23 PM
Eternal
Thanks guys. I'll review the code with these thoughts in mind.
I'll let you know how I go.

[EDIT: Problem solved - as suggested. Thanks]
April 13, 2005, 8:10 PM

Search