[Dev Rev II] Level Bug Fix
Posted: Fri Nov 12, 2010 4:42 pm
Good day. The level bug has been a huge nuisance for some time Though we have resolved the issue completely. Just to recap the level bug caused a player to do reduced skill damage when attacking a mob that was within a specific range above a player. But below is a simple fix . Just added in an extra check and attack formula adjustment
This code:
Should be replaced with this:
As you may notice we added
This is because in the original code if the level diff was less than 5 you would do a fraction of your damage. Eg if you have a level diff of 1 you would do 1/5 th your original damage
This code:
- if(Enemy->IsMonster() && skill->formula !=0)
- {
- if(level_diff >= 1)
- {
- skillpower += Stats->Attack_Power * (level_diff / 5) + (level_diff*2);
- }
- else
- {
- skillpower += Stats->Attack_Power - (level_diff / 2);
- }
- }
Should be replaced with this:
- if(Enemy->IsMonster() && skill->formula !=0)
- {
- if(level_diff >= 5)
- {
- skillpower += Stats->Attack_Power * (level_diff / 5) + (level_diff*2);
- }
- else if (level_diff < 5 && level_diff > 0)
- {
- skillpower += Stats->Attack_Power - Stats->Attack_Power*(level_diff / 5);
- }
- else if (level_diff <= 0)
- {
- skillpower += Stats->Attack_Power - (level_diff / 2);
- }
- }
As you may notice we added
- else if (level_diff < 5 && level_diff > 0)
- {
- skillpower += Stats->Attack_Power - Stats->Attack_Power*(level_diff / 5);
- }
This is because in the original code if the level diff was less than 5 you would do a fraction of your damage. Eg if you have a level diff of 1 you would do 1/5 th your original damage