ISOR3X / pawn-editor

5 stars 4 forks source link

midnight skill reset doesn't occur when loading a char from another game into a more recent one #110

Open Manaether opened 2 months ago

Manaether commented 2 months ago

Problem : The value of lastXpSinceMidnightResetTimestamp isn't reset on char loading. This cause the skills experience per day to accumulate until the game reach the saved timestamp then correctly reset it again

How to reproduce : Create a game and play X day, then save one character. Create a new game and import the saved character, and make it do work to get xp and see that at midnight it will not reset

Solution : On load set value of lastXpSinceMidnightResetTimestamp -1

<lastXpSinceMidnightResetTimestamp>-1</lastXpSinceMidnightResetTimestamp>