Convert the MS packet's contents to JSON#398
Convert the MS packet's contents to JSON#398Cerapter wants to merge 11 commits intoAttorneyOnline:masterfrom
Conversation
|
You have failed the clang vibe check. |
|
How do you want to handle the packet header? [{
"header": "foo",
"content": {}
},
{
"header": "foo",
"content": {}
}
]2 years ago to handle multiple packets coming in at once when changing areas for example. |
A header-data setup like that was the idea I entertained as well. This PR was actually born from an attempt locally where I was trying to do something like that, but then I realised it might make more sense to force some smaller JSON-ification through first. The way I can see MS (and possibly other packets) reworked is:
|
|
The PR is ready to review. I tested all I could, but it obviously needs a much more intensive testing. |
Salanto
left a comment
There was a problem hiding this comment.
This should be merged after the next check-in. It works, but needs extensive testing since we are breaking the chat protocol here. Great foundation.
I offhandedly mentioned in The
[DATA EXPUNGED]that if we wanna do something with theMSpacket, probably the best way to go about it is to make at least its cursed insides a JSON, and the best way to go about that is to create a MVP of sorts.So, here it is.
I specifically aimed this to be the minimalest of viable products -- there is no real extra fancy decision making about AO's
MSpacket, it's literally just the flattest possible representation of it, except in JSON.I'll write the client part of it later, but until then, I'll keep this a draft.
As to how to proceed from this point on, it'll largely depend on what we want. The Akashi part of the deal is going to be the easier pain to deal with. This MS data representation is preferably thrown out, however.
I could also imagine a separate library just for the MS packet (and perhaps other packets later) that both the client and Akashi pull in.