Author | Message | Time |
---|---|---|
LockesRabb | [quote]SEND -> GAME_CLIENT (0X00) SEND -> SID_AUTH_INFO (0x50) RECV <- SID_PING (0x25) RECV <- SID_AUTH_INFO (0x50) SEND -> SID_PING (0x25) [Optional] SEND -> SID_AUTH_CHECK (0x51) RECV <- SID_AUTH_CHECK (0x51) SEND -> SID_LOGONRESPONSE (0x29) RECV <- SID_LOGONRESPONSE (0x29) SEND -> SID_UDPPINGRESPONSE (0x14) SEND -> SID_JOINCHANNEL (0x0C)[/quote] What would happen if I followed that procedure to just go directly to default channel (op Kyro[DM]), while skipping sending 0x0A and 0x0B packets? Thanks in advance for the info, and also thanks for taking the time to read this! :) [Edit: fixed typos and changed post subject] | September 12, 2005, 7:51 PM |
KkBlazekK | You would be logged in, but you would't have entered chat or the channel. | September 12, 2005, 7:52 PM |
LockesRabb | Even if i had sent SID_JOINCHANNEL (0x0C)? | September 12, 2005, 7:54 PM |
KkBlazekK | You wouldn't be able to join the channel if you weren't in chat. :P I'd assume you'd either get ipped, or the server would just ignore it. | September 12, 2005, 7:57 PM |
LockesRabb | Alright, so 0x0A is mandatory... When I use 0x0A, does it takes me to the default channel (in short, BroodWar USA-1) automatically? | September 12, 2005, 8:01 PM |
UserLoser. | [quote author=Kyro link=topic=12787.msg127877#msg127877 date=1126555272] Alright, so 0x0A is mandatory... When I use 0x0A, does it takes me to the default channel (in short, BroodWar USA-1) automatically? [/quote] No | September 12, 2005, 8:21 PM |
LockesRabb | Alright, so the process after logon would be: 0x0A 'Enter Chat (not in channel yet) 0x0C 'Join Channel Op Kyro[DM] 0x0B 'Obtain channel list That look about right? | September 12, 2005, 8:26 PM |
UserLoser. | [quote author=Kyro link=topic=12787.msg127881#msg127881 date=1126556769] Alright, so the process after logon would be: 0x0A 'Enter Chat (not in channel yet) 0x0C 'Join Channel Op Kyro[DM] 0x0B 'Obtain channel list That look about right? [/quote] Looks OK. The traditional method is in the following order: 0x0a, 0x0b, 0x0c | September 12, 2005, 8:31 PM |
LockesRabb | Hmm, I'm confused-- according to that order (abc), it enters chat, gets channel list, THEN joins channel. Shouldn't it be acb, this way it waits til it joins channel before obtaining THAT channel's channel list? [Edited to apologize for my own stupidity-- let that teach people everywhere- don't be like me and assume the functionality of a packet based on its name without examining the packet...] [quote]Message ID: 0x0B Message Name: SID_GETCHANNELLIST Direction: Client -> Server (Sent) Used By: All Products Format: (DWORD) Product ID Remarks: Requests a list of channels that the client is permitted to enter. In the past this packet returned a product list for the specified Product ID, however, the Product ID field is now ignored -- it need not be a valid Product ID, and can be set to zero. The list of channels returned will be for the client's product, as specified during the client's logon. [/quote] My apologies- it all makes sense- proper procedure would be ABC then. Thanks for pointing out my assumption, even if you didn't mean to. :) ;) | September 12, 2005, 8:38 PM |
Kp | It looks like you've solved your main question here, but a quick explanation for the order. SID_JOINCHANNEL has 3 subtypes. The middle subtype (1) is used at logon to dump you in your product+country specific channel. Codes 0 and 2 are used by the client in response to your actions (both actions via the Channel button and the act of quitting a game). Since subtype 1 always takes you to your product specific channel, the client can send it before it learns what channels are available to it. | September 13, 2005, 12:33 AM |
l2k-Shadow | Just so you know, sending 0x0B is NOT mandatory... however the real client sends 0x0A, 0x0B, 0x0C in that order. Just sending 0x0A and 0x0C, however, will work just as well. | September 13, 2005, 3:09 AM |
LockesRabb | Cool, I'll just skip that packet then. But just for future reference, is there a way to be able to parse the code? He said to treat it like a parse stream, so how exactly would I do that? I suggested doing it via Split with the &H0 as the delimiter, but he advised against it. So is there an example of how I would parse a stringlist? | September 13, 2005, 4:18 AM |
kamakazie | [quote author=Kyro link=topic=12787.msg127954#msg127954 date=1126585130] Cool, I'll just skip that packet then. But just for future reference, is there a way to be able to parse the code? He said to treat it like a parse stream, so how exactly would I do that? I suggested doing it via Split with the &H0 as the delimiter, but he advised against it. So is there an example of how I would parse a stringlist? [/quote] Typically, you should have some "buffer" that is capable of removing the data types Battle.net uses. So after you received a full packet, you just pop the raw contents into this buffer. Then you can read from the buffer via various methods (.ReadWORD, .ReadDWORD, .ReadString, etc.). I'm sure if you search the forum you'll find plent of examples to work from. In the past, I have handled "string lists" by repeatedly calling .ReadString until I get an empty string. | September 13, 2005, 4:22 AM |