I think that we should move the identical functions of "Receive\ServerType0.pm" and "Receive\kRO\Sakexe_0.pm" files in "Receive.pm" file
example in this branch: move_functions_in_Receive.pm
Do you know why these functions were duplicated in the first place?
After looking at the blame for these two files:
https://github.com/OpenKore/openkore/blame/master/src/Network/Receive/ServerType0.pm
https://github.com/OpenKore/openkore/blame/master/src/Network/Receive/kRO/Sakexe_0.pm
It looks like these functions were originally duplicated by Technology in 2009, intentionally removing them from Recieve.pm.
https://github.com/OpenKore/openkore/commit/c4f4715e5b594244b03a7c8088c7cad0ed20bb96
https://github.com/OpenKore/openkore/commit/085eef4fde65a7593ff5afc2046451c0c6bd1b49
Not saying this issue is invalid, I just think we should understand why they were moved in the first place and how things might have changed between then and now.
What's the long-term benefit of doing this? Just applying the DRY principle, with the expectation that it will eventually reduce maintenance costs?
this was done to separate the official serverType from the pirates.
It was a temporary solution.
We must leave the package description ($self->{packet_list} = { ... etc.) in the files Network\Receive...
but all identical functions must be in one file Receive.pm
This will reduce the amount identical code
we do this?
Seems like a good idea to reduce the amount of code in the project. :+1:
I created a new branch: "move_functions_in_Receive.pm"