I'm glad you have your C source standard enough to compile on GCC and VC. That's usually half my battle. VS Solutions won't compile in GCC, and GCC make files are useless to VC. I managed to get my Socket handler to work by starting the project on VC6 (which can export a nmake file from the project) then adapting that to a regular make file... but I'm still in issues with differences between the GNU Win32 header files and the Microsoft ones. XD
Keep the addresses in a single header file as constants. (or enumerations) Refer to them everywhere else in the code by the Name, not the address. Then when you want to build it for a different Exe, you know what file to fix and only have to fix one line per address. You can also keep a catalogue of const lines separated by :-
Code:
#if_CLIENT == 1873{
const int* lpBlah = 0xB0B50B01;
const int* lpPoohBear = 0x9004BEA9;}
#elseif __CLIENT == 1987{
const int* lpBlah = 0xEGBDFEGB;
const int* lpPoohBear = 0x00000000;} // Fatal Exception !!! Oh noes!
#endif
So that you only need to pass a different option via the command line, make file or project management to switch the target client.
As to who knows how to solve this bug, it was probably solved when the first KPT server was released, and since no Guide or Tutorial on how to convert jPT to KPT was ever written, the only person who knows is the one who made that conversion back in 2005 / 2006. Most of whom are utterly disinterested in PT servers these days.
I recommend you find the earliest KPT server conversion you can, check that it doesn't have this "bug" (which is actually an incomparability) and compare the GFantasy patches in it to the original. I did this against the ET2 server, with regard to protocols / encryptions, but haven't looked at the other things. (Aging and mixtures, maps etc.)
If you find an old jPT client, it works flawlessly on jPT4096. If you connect old EPT clients, they kind of work after you just change the ports and stuff. If you try to connect a modern client, it just doesn't work
at all. You have to fix the protocols / encryptions, the item lists, the map lists and the ports.
Looking at the source we are building up, there could well be a change in the packet opcodes from the old server to modern clients. There should certainly be packets of larger sizes, because the packet sizes are fixed in all PT clients and servers, and the original sizes didn't support some of the massive levels of Experience and such like which current PT versions use. As we saw, the old preAOR EPT client only stored 32bit UINTs for the experience:level table... where our current clients and servers store a 64bit signed value.