cq_disdain - this is what you must very closesly rebuild. It is responsible for proper understanding how fights in PVM and PVP will look.
Dont ask for final solution as I bet no one will do this for you. Still in worst case you can try to use any of the released database to source this table from - but be aware that it can be made only till certain amount of stars there....
If you plan for example to allow on your server huge BPs (like on ours even 350k is possible in some ways :P) you must make very careful and very huge work on this
Good luck