amoeba / accharplanner

Character Planner for Asheron's Call
https://planner.treestats.net/
ISC License
5 stars 6 forks source link

Figure out calculation bug for WintersEbb's "Wyrd the Wheezy" #377

Open amoeba opened 3 years ago

amoeba commented 3 years ago

When I import https://treestats.net/WintersEbb/Wyrd%20the%20Wheezy into the planner, it pops out with a Spent value above the Total. TreeStats reports total XP of 746,858 with 23,287 unassigned which calculates out to 723,571 spent. That's sorta close to the planner's reported 728,284 spent and a difference of 4,287.

Figure out why the Spent is different (723k vs 728k). I already looked at the stats, vitals, and skill base values and they match up.

jkisor commented 2 years ago

totalXPEarned may be incorrect. It's currently looked-up as the total xp to achieve the current level and doesn't account for the XP between levels. https://github.com/amoeba/accharplanner/blob/3400cf5d038821819414ed3734b887119d8ae2c4/src/store/getters.ts#L67-L74

Unassigned Xp depends on totalXPEarned which causes it to be off as well. Noting the < 0 check... revealing that sometimes total XP is lower than the XP invested. https://github.com/amoeba/accharplanner/blob/3400cf5d038821819414ed3734b887119d8ae2c4/src/store/getters.ts#L153-L161