Open lututui opened 7 years ago
the first step is move identical functions and packets from st0 and sakexe to receive.pm and send.pm
after this we can use st0 as base in sakexe_0
after this we need to clean every servertype file, i think we have to delete all this files and update tables with shuffle, recv, keys, and sync.
in my point of view shuffle, sync and recvpacket files should work better and more clean than create a send and receive file to every servertype
package Network::Receive::kRO::RagexeRE_0;
use strict; use base qw(Network::Receive::kRO::Sakexe_2009_04_08a);
My view is that need to be take attention about chain of responsability inside Network and take a read about https://github.com/OpenKore/openkore/issues/359
We can just do this clean after an analysis about coupling and cohesion of functions.
With this change all kore Source will change and will need of more classes and design patterns and GOF.
Or we use a language such as Java for to use Bot or according with @allanon Go
The issue:
TLDR: it's just a mess.
A better structure:
This would allow for a massive code cleanup (there are a lot of duped functions, i.e. sendStoragePassword, and things like '0871' => undef would become unnecessary) without breaking almost nothing, if anything at all.