Damage beyond 2.1B not showed up
rAthena Hash
5e6d6bf9b728738467d041ba46e99f89303bd61e
Client Date
2024-10-30
Server Mode
Renewal
Result
If the damage dealt higher than 2.1b (assuming the cap for 32 bit), the damage number doesnt show up
Relevant Log Output
Expected Result
It should be shown even got capped numbers.
How to Reproduce
Deals any damage beyond the capped number.
Official Information
It should be shown as capped number (2.147m)
Modifications that may affect results
No response
This issue occurs since commit ea359b4 made by @Atemo and @Lemongrass3110
On my server I used a temporary solution because when I found the problem I was told to open a PR, but honestly, I don't identify much with GitHub, so I didn't.
The problem occurs exactly at int32 clif_skill_damage in: auto damage = std::min( static_cast<decltype(packet.damage)>( sdamage ), std::numeric_limits<decltype(packet.damage)>::max() );
I hope I'm not mistaken (because one of those commits also broke the pet windows), but what I did to fix this problem was the following:
First, I commented out:
//auto damage = std::min(static_cast<decltype(packet.damage)>(sdamage), std::numeric_limits<decltype(packet.damage)>::max()); proposed in the commit I mentioned above.
Second, I wrote it like this:
auto max_damage = std::numeric_limits<decltype(packet.damage)>::max();
auto damage = (sdamage > max_damage) ? max_damage : static_cast<decltype(packet.damage)>(sdamage);
This was my solution, as I mentioned above the ideal is to wait for the official solution from @Lemongrass3110 and @Atemo. I hope they can provide an official solution soon and I hope this temporary solution helps you. @Goendoelz
@skstrife you could also just post the output of git diff as a comment, then you can be 100% certain that you communicated all the lines that you changed and someone else can make the PR on github.