opentibia / server

An open source server for the MMORPG Tibia.
GNU General Public License v2.0
414 stars 149 forks source link

Problem with summons exp stages #47

Closed Pietia10 closed 9 years ago

Pietia10 commented 9 years ago

When you kill a monster with summon for example lets say rat which has 5x experience. You set in exp_stages exp x100 so it means that for rat you should get 500exp that's correct without a summon. But when you summon a monster and then kill rat you only get 400exp (200 summon 200 player). When you for example kill cave rat which should give you 1000exp but when summon helps you you get for example 800+ 100 summon. When summon helps you kill rat for example you get 100 exp and summon gets 100 exp simply varies (instead of total 500) or when you kill cave rat with summon which should give you 1000 exp you get: 300 + 300 for summon . So it's completly broken right now. Keep in mind that I didn't used happy hours in this calculation.

Wiki: Experience Gain When killing a creature with a summon, you will only receive partial experience for the kill (minimum of 50%). For example, if your summon causes all of the damage to kill a Rotworm, you will only receive 20 experience (half). If you personally deal some of the damage, you will receive more exp. The formula for experience gain is: player's exp gain + (summon's exp gain /2) The player's experience gain is based on the player's damage.

assassina commented 9 years ago

I've noticed an issue happening when the monster gives an experience number points who happens to be odd, due to rounding down. For example, a rat gives 5 xp. If it is killed by a summon, then the summon counts as a half rat, which should be 2.5 xp, but is rounded as 2 xp. If the exp rate is x 100, the player (and the summon) gets 200 xp. That can be easily patched. But your issue with the cave rat (which gives an even number of xp points), I wasn't able to reproduce it. I am always getting 750 + 750 (which is ok, due to the premmy bonus). Are you sure that you haven't edited it to give you 7 xp points (instead of the usual 10)?

Pietia10 commented 9 years ago

Nah not really Have you tried to actually let your summoned monster hit cave rat(and you hit as well) a bit and then count total experience?

assassina commented 9 years ago

Ok, it is happening here as well. And it is still the same issue of rounding things down. It is an easy patch. I will try to commit the patch at the next days, but I won't promise anything, I might be kind of busy with work at the next weeks, so I might take some time to do it.

assassina commented 9 years ago

It should be fixed by now. Please test it and let me know if I broke something or if there is something yet not fixed.

Pietia10 commented 9 years ago

Write on skype to me ;p

assassina commented 9 years ago

I already commited the fix, haven't you noticed it?

Pietia10 commented 9 years ago

Oh ok.The xp is fine but I'm experiencing a weird issue with showing of how much exp you gained basically when summon helps you out it's like you receive 2 diffrent kind of exp so it's hard for players to see how much exp you gained but the sum of experience match . Is it just me?;s

assassina commented 9 years ago

Is it hard for players to see how much exp they have gained? But the number of gained experience points pulls out of the head of the char! What do you mean?

Pietia10 commented 9 years ago

I just checked on clean trunk seems like it works fine there so just close it , It's just my server again and I'm pretty sure I did made all changes .

assassina commented 9 years ago

It has being fixed, so I am closing it now.