miwarnec / uMMORPG

4 stars 0 forks source link

Skill experience points #35

Closed Ghetaldus closed 4 years ago

Ghetaldus commented 4 years ago

Versions (please complete the following information)

Describe the bug When level difference between you and your victim is larger then x levels you will be receiving negative skill experience points.

To Reproduce Steps to reproduce the behavior, please explain every single click that is needed:

  1. Open Unity Editor '...'
  2. Run Editor as "Server & Play"
  3. Create character and level him up to at least player level 14.
  4. Kill a skeleton that is level 1.
  5. Open Character Info and look at skill exp value. It is -1.

Expected behavior There should not be skill experience points lose for killing lower level monsters then yourself.

System (please complete the following information):

Additional context

Ghetaldus commented 4 years ago

Simply changing clamping of levelDiff to be between -10 and 10 instead of -20 and 20 will make sure that multiplier can never be negative.

image

miwarnec commented 4 years ago

thanks, will take a look

miwarnec commented 4 years ago

@Ghetaldus nice find, fix is in classic V1.188 and CE V2.8 together with a test to make sure it never happens again: image