-
Notifications
You must be signed in to change notification settings - Fork 53
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
Feat: Handler Cleanup and Loading Screens #674
Feat: Handler Cleanup and Loading Screens #674
Conversation
Arrowgene.Ddon.GameServer/Handler/LoadingInfoLoadingGetInfoHandler.cs
Outdated
Show resolved
Hide resolved
if (obj.PasswordEnc.Length < 62) | ||
{ | ||
WriteByteArray(buffer, new byte[62 - obj.PasswordEnc.Length]); | ||
} |
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.
Im worried about this kind of logic in the serializer, maybe this should be done by the handler
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.
I feel like the point of the deserialized object vs. the raw buffer is that the handler shouldn't have to think about the sizes of the byte array. I haven't tested whether or not the client will crash from a buffer overrun if this isn't properly sized (the packet does have the size of the used portion in it), but if it will, then forcing the handler to do that check feels inappropriate.
Also making the handler do this requires exposing a obj.Padding
field which also feels wrong.
if (obj.PasswordEnc.Length < 62) | ||
{ | ||
WriteByteArray(buffer, new byte[62 - obj.PasswordEnc.Length]); | ||
} |
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.
ditto
…ndDistributionQuestCancel, QuestGetAreaBonusList, QuestGetQuestPartyBonusList.
…aBonusList, QuestGetLevelBonusList, QuestGetPackageQuestList, QuestGetQuestPartyBonusList.
4a8fa7f
to
b3a1b3b
Compare
Cleans up a bunch of handlers so that we're no longer manipulating buffers in the middle of them like savages.
Boring Stuff
PacketHandler
s have been upgraded toRequestPacketHandler
s.IBuffer.WriteFoo
has been banished from the handlers.QuestGetPackageQuestListHandler
, but this may be useful in reading pcaps.CONNECTION
group notices.LoginRequestPacketHandler
s, they can now be straightforwardthrow ResponseErrorException
s. Some new error codes have been invented. What may have been A-1ERROR_CODE_FAIL
may now be an S-6011ERROR_CODE_AUTH_LOGIN_FAILED
or similar, so we can diagnose these more clearly.GetErrorMessageListHandler
has been adjusted. This is pending a rework of the error code asset per More verbose error messages #610 . Turns out you can break up the error list notice into smaller chunks, so we can make the error messages as big as we want without bumping up into packet size limits (ushort.MaxValue
bytes)Fun New Stuff
LoadingInfoLoadingGetInfoHandler
now uses a newLoadingInfoAsset
, pulled fromLoadingInfo.json
. This lets you put whatever obnoxious pat-on-the-back text in loading screens, with some levers to control scheduling and priority.Checklist:
develop
branch