Describe the bug
26.10版本测试发现
pl.getTotalExperience() 获取到的经验值似乎与预期不一致
/xp 1395 可以升到完整30级,但pl.getTotalExperience()显示1065点,是不是lse的经验值计算有错误?
pl.addExperience
pl.reduceExperience
pl.setTotalExperience
增减设置都与预期不一致
To Reproduce
测试时没有穿戴任何装备,物品栏已清空。
mc.listen("onChat", (pl, msg)=>{
if (msg === "exp"){
let t = pl.getTotalExperience();
log(`当前经验: ${t}`);
//+500测试
pl.addExperience(350);
if (pl.getTotalExperience() != t+350){
log(`+350测试失败, 当前经验: ${pl.getTotalExperience()} ${pl.getCurrentExperience()}`);
}else{
log(`+350测试成功, 当前经验: ${pl.getTotalExperience()} ${pl.getCurrentExperience()}`);
}
t = pl.getTotalExperience();
//-500测试
pl.reduceExperience(350);
if (pl.getTotalExperience() != t-350){
log(`-350测试失败, 当前经验: ${pl.getTotalExperience()} ${pl.getCurrentExperience()}`);
}else{
log(`-350测试成功, 当前经验: ${pl.getTotalExperience()} ${pl.getCurrentExperience()}`);
}
t = pl.getTotalExperience();
//+10000测试
pl.addExperience(10000);
if (pl.getTotalExperience() != t+10000){
log(`+10000测试失败, 当前经验: ${pl.getTotalExperience()} ${pl.getCurrentExperience()}`);
}else{
log(`+10000测试成功, 当前经验: ${pl.getTotalExperience()} ${pl.getCurrentExperience()}`);
}
t = pl.getTotalExperience();
//-10000测试
pl.reduceExperience(10000);
if (pl.getTotalExperience() != t-10000){
log(`-10000测试失败, 当前经验: ${pl.getTotalExperience()} ${pl.getCurrentExperience()}`);
}else{
log(`-10000测试成功, 当前经验: ${pl.getTotalExperience()} ${pl.getCurrentExperience()}`);
}
t = pl.getTotalExperience();
//set 350测试
pl.setTotalExperience(350);
if (pl.getTotalExperience() != 350){
log(`set 350测试失败, 当前经验: ${pl.getTotalExperience()} ${pl.getCurrentExperience()}`);
}else{
log(`set 350测试成功, 当前经验: ${pl.getTotalExperience()} ${pl.getCurrentExperience()}`);
}
t = pl.getTotalExperience();
//set 500测试
pl.setTotalExperience(500);
if (pl.getTotalExperience() != 500){
log(`set 500测试失败, 当前经验: ${pl.getTotalExperience()} ${pl.getCurrentExperience()}`);
}else{
log(`set 500测试成功, 当前经验: ${pl.getTotalExperience()} ${pl.getCurrentExperience()}`);
}
t = pl.getTotalExperience();
log('测试完成');
}
});
20:47:17.704 INFO [Exp] 当前经验: 434
20:47:17.704 INFO [Exp] +350测试失败, 当前经验: 679 22
20:47:17.704 INFO [Exp] -350测试失败, 当前经验: 434 7
20:47:17.704 INFO [Exp] +10000测试失败, 当前经验: 8589 248
20:47:17.706 INFO [Exp] -10000测试失败, 当前经验: 434 7
20:47:17.706 INFO [Exp] set 350测试成功, 当前经验: 350 35
20:47:17.706 INFO [Exp] set 500测试失败, 当前经验: 434 7
20:47:17.706 INFO [Exp] 测试完成
Expected behavior
总经验增减设与预期一致
Screenshots
No response
Platform
win11
BDS Version
26.10
LeviLamina Version
26.10.11
LegacyScriptEngine Version
0.18.2
Additional context
No response
Describe the bug
26.10版本测试发现
pl.getTotalExperience() 获取到的经验值似乎与预期不一致
/xp 1395 可以升到完整30级,但pl.getTotalExperience()显示1065点,是不是lse的经验值计算有错误?
pl.addExperience
pl.reduceExperience
pl.setTotalExperience
增减设置都与预期不一致
To Reproduce
测试时没有穿戴任何装备,物品栏已清空。
20:47:17.704 INFO [Exp] 当前经验: 434
20:47:17.704 INFO [Exp] +350测试失败, 当前经验: 679 22
20:47:17.704 INFO [Exp] -350测试失败, 当前经验: 434 7
20:47:17.704 INFO [Exp] +10000测试失败, 当前经验: 8589 248
20:47:17.706 INFO [Exp] -10000测试失败, 当前经验: 434 7
20:47:17.706 INFO [Exp] set 350测试成功, 当前经验: 350 35
20:47:17.706 INFO [Exp] set 500测试失败, 当前经验: 434 7
20:47:17.706 INFO [Exp] 测试完成
Expected behavior
总经验增减设与预期一致
Screenshots
No response
Platform
win11
BDS Version
26.10
LeviLamina Version
26.10.11
LegacyScriptEngine Version
0.18.2
Additional context
No response