After working on getting 1096(DoV client) working for the emu I have realised that hunting down where a packet is constructed and sent can be a pain so what I am suggesting is a global packet class. Basically all this class will do is contain the code for building and sending the packets and hopefully organized by packet type (all item packets grouped together and quest packets grouped together, not scattered throughout). This way in the actual code when you want to send a packet all you would have to do is something like this
Code: Select all
packets.SendItemInfo(client, item);
In the above example packets would be the global class. This is basically just putting all the packet code in the same spot making it easier for us to find the packet we need to make changes to instead of trying to hunt it down in the many files and not being where we expect them to be (some quest packets are in client.cpp and not quest.cpp). This can also be done over time, only moving a few functions over at a time, it doesn't have to be an all at once change.
What do you guys think about this?