Most visitors online was 8830 , on 6 Feb 2024
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!CalcDamage:Damage, CalcDamage::MDamage. Both client-end and server-end.
but idk how to look for them in the v83 idb, or at least i cant find them
I wouldn't suggest trying to base it off your v83 IDB because you probably wouldn't really understand it. For starters, you'd have to find and name all of CalcDamage:Damage yourself (which, isn't even the hard part). Then, you'll need to know everything the pseudocode is doing, but without any references to valid structures. An IDB contains no local type debug info and v95's PDB introduced Stat Rates not in v83, making the structs have two different offsets (not to mention different calculations for post-bb).
Instead, you should reference BMS as much as you can; v83's damage calculations will be nearly identical, except for a few things. The major difference will be more with CalcDamage::MDamage because Evan's are in the v83 client, and that means that Magic Attacks now include Critical Attack formulas. As for Critical Attack and RNG sync, they both use the old get_rand formula used in BMS (not the one introduced in v92+ clients).
If you're still interested in finding the two functions in IDA however, CalcDamage::MDamage (00791617) can be found by XREFing CUserLocal::TryDoingMagicAttack. As for CalcDamage:Damage (0078DF87), it can be found by XREFing CUserLocal::TryDoingMeleeAttack, CUserLocal::TryDoingShootAttack, CUserLocal::TryDoingBodyAttack, or CUserLocal:oActiveSkill_MesoExplosion. As for finding the CUserLocal::TryDoingXXXAttack functions, you can use an AoB to find them. The easiest AoB would be for the PUSH XXXX instruction, where XXXX is the StringPool ID of "The skill cannot be used with the equipped item." string that you'd see in-game. Nonetheless, I've included both the addresses for you if you're interested in looking into the client's CalcDamage functions. One other thing: in the beginning of both of the CalcDamage's, you'll see a do-while loop that repeats 7 times and calls a function, that is CRand32::Random. Feel free to name that as well if you don't have it named already.
One last thing: Good luck. These are very lengthy functions that have to be nothing short of 100% correct in all aspects. If a single byte or value is wrong somewhere, it makes the server-end damage mismatch the client-end.