Skip to content

Commit

Permalink
Merge pull request #14 from Astrian/debug
Browse files Browse the repository at this point in the history
fix a bug with ap calculate bug
  • Loading branch information
Astrian Zheng authored May 17, 2019
2 parents 987a558 + 79597d9 commit d63007c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 929 deletions.
2 changes: 1 addition & 1 deletion api/logdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = async function (faction, location, level, ap, trekker, operator
data['操作人'] = null
}
else if (record.get('正在登记经验值') === 2) {
if (parseInt(record.get('入场初始经验')) - parseInt(ap) < 5000) {
if (parseInt(ap) - parseInt(record.get('入场初始经验')) < 5000) {
error = `${record.get('特工代号')} 的活动 AP 差额不足 5000,无法进行登记。该特工的入场 AP 值为 ${record.get('入场初始经验')}。你可以尝试检查错误数据并重新登记,或使用 /cancelaprec 取消登记。`
} else {
data['活动结束经验'] = parseInt(ap)
Expand Down
Loading

0 comments on commit d63007c

Please sign in to comment.