Ok, this is what I did:
1. Edited the code of:
src tools map_extractor System.cpp
src tools vmap4_extractor vmapexport.cpp
src tools mesh_extractor MPQManager.cpp
System.cpp
vmapexport.cpp
MPQManager.cpp
2. Compile the tools
3. Run custom mapextractor.exe, then custom vmaps4.exe in WoW directory (you need custom Map.dbc and adt files in your patch)
(Check if detected the custom patch)
4. Move generated files to core folder and use mmaps_generator.exe (the only tool we didn't edit code because get information from the previously data extracted with custom mapextractor.exe, vmap4extractor.exe and vmap4assembler.exe)
Now npcs shouldn't fall through buildings and won't be able to cast through walls.
IMPORTANT NOTES:
-Make sure mmap.enablePathFinding is ON (file: 'worldserver.conf' at your Core folder)
-If in step 3 the tool can't detect your maps make sure everything is written correctly and that there is no other Map.dbc overwriting yours custom. I suggest to either edit the code to make only detect your custom patch or to create another Data folder with your custom patch and the minium MPQs required to make tools working.
Hope this helps you!