ko4life-net / ko

Open source development of the game Knight Online. This is a reversed engineered old version of the game aiming to replicate the nostalgic experience we all once had <3
https://github.com/ko4life-net/ko
MIT License
55 stars 22 forks source link

Only kick it out if it has exceeded the maximum level. #202

Closed selcukcukur closed 1 year ago

selcukcukur commented 1 year ago

This pull request fixes the error that the connection with the server was lost when logging into the character in the character selection screen.

What you need to do for the problem to occur :

When you try to log in, you will be disconnected from the server.

stevewgr commented 1 year ago

Interesting fix! Thanks for this. I'll try to reproduce later before merging.

UTengine commented 1 year ago

This is bad practice imho. We should never kick someone higher than the defined max level. If the cap is 60 we should define lvl 61 and make it so that anyone who reaches lvl 60 and is 99% of the defined dbo.level table to stop earning EXP. There is not a single mob that gives a full 1% of exp at that level. So if he hits lvl 61 it's either a bug or hack, and gets kicked and would require investigation. Kicking someone over the defined level 60 in this case is asking for issues if you ask me. >= Is not a bad implementation and I'm sure they had their reasons to use it. A game that was made by 2002 with Korean DEV's in that time of business is no joke.