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
MIT License
52 stars 21 forks source link

Fix formatting coins with commas. #182

Closed stevewgr closed 1 year ago

stevewgr commented 1 year ago

Description

This PR implements formatting coins with commas for ui-tooltip. Note that this function can be possibly used for other scenarios, such as coins in player's inventory.

This also fixes a crash where the Texts.tbl format specifier expects a string, but was given an int. I reverted this commit, since the "fix" was wrong and the client was at fault: https://github.com/ko4life-net/ko-assets/commit/6181e4ac6be70c4c4afe31f6e216a9329f4466d7

Related to this PR: https://github.com/ko4life-net/ko-assets/pull/8

Also note that I put it near _LoadStringFromResource for now just for uniformity, as it may be used globally for other scenarios. We'll move them to some utility header file in the future once it's appriopriate in order to keep My_Struct3D.h more about 3D math.