opentibiabr / canary

Canary Server 13.x for OpenTibia community.
https://docs.opentibiabr.com/
GNU General Public License v2.0
384 stars 637 forks source link

lifeleechchange attribute items wrongly calculated #3154

Open saitamOsirb opened 10 hours ago

saitamOsirb commented 10 hours ago

Priority

High

Area

What happened?

            lifeleechchange attribute items wrongly calculated  in game show 1% when lifeleechchange value =  "100"

What OS are you seeing the problem on?

Windows

Code of Conduct

htc16 commented 1 hour ago

This pr https://github.com/opentibiabr/canary/pull/3091 if I'm not mistaken fixes this, can you test it?

dudantas commented 57 minutes ago

I think there may be a misunderstanding. The correct interpretation is that 100 represents 1% (1.00) as life leech, mana leech, and critical calculations are performed using floating-point numbers (since they can even be transmitted as doubles to the client). Based on this, there doesn't appear to be any error in the calculation or logic.