Hercules
Hercules copied to clipboard
Fix Soul Balls in newer clients
Pull Request Prelude
- [x] I have followed proper Hercules code styling.
- [x] I have read and understood the contribution guidelines before making this PR.
- [x] I am aware that this PR may be closed if the above-mentioned criteria are not fulfilled.
Changes Proposed
Fixes soul balls not being properly displayed in newer clients. (2020+).
2020+ clients split the logic for spirit spheres and soul balls, players may now have both at the same time, and a new packet was introduced for soul balls only (being separated from the spirit spheres one).
Implementation based on rAthena logic/packet. also huge thanks to 4144 for packet dates.
I decided to split clif_spiritball into 2 functions and leave the number of balls to the caller so we can simplify those functions. There were 2 reasons for that:
- We now have to deal with different packets for each case depending on client
- Pretty much every call was converting sd/hd to bl, to convert back to sd/hd inside the function... leaving to the caller simplifies things and gives flexibility if someone is looking for some sort of customization
Issues addressed: None, I think (someone mentioned it in discord)