Open stevewgr opened 2 years ago
As an addendum to this, I think they should be converted to relevant enums (e.g. login, game, AI, whatever), rather than macros or constants. Also, unless they were added at some point in this repo's history, there shouldn't be any packets using magic numbers for the opcodes. Not by mgame, at least.
EDIT: I didn't see you mention you see it was done in some places with specific checks. Can you give an example of this? You're not referring to the encryption checks are you?
Description
When searching for "packet" in this url: https://github.com/ko4life-net/ko/find/master
It shows a bunch of files that store the same packet opcodes that the server files, as well as the client communicating with each other.
This is difficult to maintain, as well as doesn't scale nicely. It also makes it difficult to find things in the codebase, such as references to a specific opcode.
Tasks
This task requires some patience and being pedantic. There are also some places when RECV or SEND check for opcodes that don't use proper defines, rather constant values. I would imagine to tackle it, the following tasks should follow:
N3PKT_*