-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update session id logic #150
Update session id logic #150
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the results of testing these changes against etheos/eoserv/GameServer? Normally I'd assume it works but I'd like you to confirm because of the changes to the InitReply enum and reading data around it.
You can use test.etheos.moffat.io:8078
for etheos, and moffat.io:8079
for gameserver
I’ll try it out with both :) |
Tested with eoserv and everything worked fine |
Try |
@@ -127,47 +129,47 @@ public async Task LoginToCharacter(ICharacter character) | |||
if (unableToLoadMap || _fileRequestActions.NeedsFileForLogin(InitFileType.Map, _currentMapStateProvider.CurrentMapID)) | |||
{ | |||
gameLoadingDialog.SetState(GameLoadingDialogState.Map); | |||
if (!await SafeGetFile(async () => await _fileRequestActions.GetMapFromServer(_currentMapStateProvider.CurrentMapID))) | |||
if (!await SafeGetFile(async () => await _fileRequestActions.GetMapFromServer(_currentMapStateProvider.CurrentMapID, sessionID))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For these lines, do this instead of creating an async lambda:
if (!await SafeGetFile(() => _fileRequestActions.GetMapFromServer(_currentMapStateProvider.CurrentMapID, sessionID)))
return;
It reduces the overhead in the async state machine when you return the task directly, since it is eventually await anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
Re-tested with GameServer and etheos. Both work as intended :) |
14a1aff
to
0973919
Compare
Renamed AccountCreateID to SessionID Use SessionID for Account, Character, and Welcome packets instead of PlayerID
Use sessionID locally in Account controller and Login controller Replace GetMapForWarp with just a single GetMapFromServer function
cast s to ushort before encoding number
0973919
to
08a9b2b
Compare
This branch updates the Session ID logic around Account, Character, Welcome, and Warp packets to closer match the original GameServer and reoserv.
There's a big issue around PacketBuilder.AddShort not letting you add a ushort though!