Jump to content
/dev/not/null

Need help with player login

Recommended Posts

Posted (edited)

It seems last step remaining before I can show the World for player. On receiving CMSG_PLAYER_LOGIN my server returns SMSG_LOGIN_VERIFY_WORLD, then SMSG_ACCOUNT_DATA_TIMES, then SMSG_TUTORIAL_FLAGS, then SMSG_UPDATE_OBJECT for player. 

But after doing this client request something with CMSG_UPDATE_ACCOUNT_DATA and when I trying to send something I receiving infinity loop of CMSG_REQUEST_ACCOUNT_DATA and CMSG_UPDATE_ACCOUNT_DATA. What should I send to enter the World ?

ADDITIONAL INFO: I'm using 2.4.3

Edited by /dev/not/null

Share this post


Link to post
Share on other sites

You need rather to send the confirmation that the server have handled the update successfully. This is a short responce packet. For 1.12 client, it would be probably the opcode

SMSG_UPDATE_ACCOUNT_DATA = 0x20C,

while for 2.4.3 it is

SMSG_UPDATE_ACCOUNT_DATA_COMPLETE = 0x0463,

Just remember this is a dialog, a query - a responce. On the TBC (2.4.3) client, the next packets represent another dialog phrase:

CMSG_READY_FOR_ACCOUNT_DATA_TIMES
SMSG_ACCOUNT_DATA_TIMES

with the only difference that here CMSG is a short query and SMSG is a longer responce.

  • Like 1

Share this post


Link to post
Share on other sites
9 hours ago, Olion said:

You need rather to send the confirmation that the server have handled the update successfully. This is a short responce packet. For 1.12 client, it would be probably the opcode

SMSG_UPDATE_ACCOUNT_DATA = 0x20C,

while for 2.4.3 it is

SMSG_UPDATE_ACCOUNT_DATA_COMPLETE = 0x0463,

Just remember this is a dialog, a query - a responce. On the TBC (2.4.3) client, the next packets represent another dialog phrase:

CMSG_READY_FOR_ACCOUNT_DATA_TIMES
SMSG_ACCOUNT_DATA_TIMES

with the only difference that here CMSG is a short query and SMSG is a longer responce.

Well, client sends CMSG_PLAYER_LOGIN and I need to send multiple packets to show the world for player (SMSG_LOGIN_VERIFY_WORLD, SMSG_ACCOUNT_DATA_TIMES and SMSG_UPDATE_OBJECT for player object), am I right ?

If I do not send SMSG_ACCOUNT_DATA_TIMES client hangs on loading screen, when I send it client just requests CMSG_UPDATE_ACCOUNT_DATA.

What I missed for successful world entering ?

Share this post


Link to post
Share on other sites

I apologize for the wrong opcode referencing. The following is correct for 3.3.5a (12340 build) client:

SMSG_UPDATE_ACCOUNT_DATA_COMPLETE = 0x0463,

while for older ones, perhaps including 8606 build, the older SMSG_UPDATE_ACCOUNT_DATA = 0x20C must be valid. To avoid such confusions, you better create the needed dumps for the proper version yourselves.

Run a Mangos server wih set up WorldLogFile parameter in the mangosd.conf. The log file will contain the communication sequence with symbolic opcodes and unparsed other packet data. If you use the TC for that, you set up PacketLogFile in its worldserver.conf and get a binary file. You could parse it into a nice text form with the WowPacketParser utility. The utlity is capable to parse older data as well, for 2.4.3, in case you manage to get the binary packet log.

An example sequence of actions at CMSG_PLAYER_LOGIN (i.e. at login by the chosen character) was presented here, once again for 12340 client.

I could have misinformed you on the packet sequence as well, since had been referencing WotLK 12340 client. It looks like the login protocol was changed between 8606 and 12340 builds. Taking a 8606 packet log, I see SMSG_ACCOUNT_DATA_TIMES within the large responce sequence on CMSG_PLAYER_LOGIN. Also I see two CMSG_UPDATE_ACCOUNT_DATA without any server responce. So, analyse your own logs please. Good luck!

Share this post


Link to post
Share on other sites
Posted (edited)
7 hours ago, Olion said:

I apologize for the wrong opcode referencing. The following is correct for 3.3.5a (12340 build) client:

SMSG_UPDATE_ACCOUNT_DATA_COMPLETE = 0x0463,

while for older ones, perhaps including 8606 build, the older SMSG_UPDATE_ACCOUNT_DATA = 0x20C must be valid. To avoid such confusions, you better create the needed dumps for the proper version yourselves.

Run a Mangos server wih set up WorldLogFile parameter in the mangosd.conf. The log file will contain the communication sequence with symbolic opcodes and unparsed other packet data. If you use the TC for that, you set up PacketLogFile in its worldserver.conf and get a binary file. You could parse it into a nice text form with the WowPacketParser utility. The utlity is capable to parse older data as well, for 2.4.3, in case you manage to get the binary packet log.

An example sequence of actions at CMSG_PLAYER_LOGIN (i.e. at login by the chosen character) was presented here, once again for 12340 client.

I could have misinformed you on the packet sequence as well, since had been referencing WotLK 12340 client. It looks like the login protocol was changed between 8606 and 12340 builds. Taking a 8606 packet log, I see SMSG_ACCOUNT_DATA_TIMES within the large responce sequence on CMSG_PLAYER_LOGIN. Also I see two CMSG_UPDATE_ACCOUNT_DATA without any server responce. So, analyse your own logs please. Good luck!

I have set WorldLogFile parameter, file was created but nothing write to it. File always empty. Maybe I missed something ?

Can you please add part of your 8606 build log just as example ? (I mean that part where CMSG_PLAYER_LOGIN processes)

 

WELL, I do not need this already, found the solution - I also should edit LogMask (set it to 65651 for including NETWORK information)

Edited by /dev/not/null
  • Like 1

Share this post


Link to post
Share on other sites

I have found the minimal required packets for world entering: SMSG_LOGIN_VERIFY_WORLD, SMSG_ACCOUNT_DATA_TIMES, SMSG_FEATURE_SYSTEM_STATUS, SMSG_TUTORIAL_FLAGS, SMSG_COMPRESSED_UPDATE_OBJECT and SMSG_TIME_SYNC_REQ (without this packet player can't move).

Currently I need help with SMSG_COMPRESSED_UPDATE_OBJECT. If I understand it correctly, UpdateData class uses for update object position (absolute and relative) + updating object fields. Can I use SMSG_UPDATE_OBJECT instead ? which fields are necessary?

Share this post


Link to post
Share on other sites

AFAIK the only difference between these two is the size. The compressed update may contain (and does, actually) updates for several objects at once. IIRC the compression is made simply by gzipping the packet data. Unsure if usual update SMSG_UPDATE_OBJECT may contain several updates at once, but perhaps it may as well. However I'm certain that these packets are fully interchangeable, i.e. equivalent.

A compressed update becomes critical when you get an event-reach world around your character. It may be raiding a boss, a BG, just a capital with 200+ players so on. The updates are "broadcasted", i.e. sent to every player participant, and network bandwidth fades quickly.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Contact Us

To contact us click here
You can also email us at admi[email protected]

Privacy Policy | Terms & Conditions

Repositories

The Link to the master list
of MaNGOS repositories:
Copyright © getMaNGOS. All rights Reserved.

This website is in no way associated with or endorsed by Blizzard Entertainment®
×