Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 检定指令ra中单项结果重复计算 #1036

Closed
4 tasks done
ENEOvO opened this issue Sep 9, 2024 · 0 comments · Fixed by #1061
Closed
4 tasks done

[Bug]: 检定指令ra中单项结果重复计算 #1036

ENEOvO opened this issue Sep 9, 2024 · 0 comments · Fixed by #1061
Labels
bug Something isn't working

Comments

@ENEOvO
Copy link

ENEOvO commented Sep 9, 2024

在提问之前...

  • 我理解 Issue 是用于反馈和解决问题的,而非吐槽评论区,将尽可能提供更多信息帮助问题解决
  • 我填写了简短且清晰明确的标题,以便开发者在翻阅 issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等
  • 我已查看master branch或最新测试版的更新内容,并未提及该 bug 已被修复的情况
  • 已有issue中并没有看见其他人与我反馈相同的问题

问题描述

尝试在自定义文案中为 .ra 根据 $tSuccessRank 添加大成功计数与大失败计数
发现每次计数会计数2次

如何复现

自定义文案 -> COC -> 检定_单项结果文本 添加一段 {$g计数 = $g计数 + 1;``}
image
发送 .text {$g计数} -> 0 // 还未进行检定,初始值是0
发送 .ra 聆听 // 进行检定
发送 .text {$g计数} -> 2 // 仅进行樂1次检定,但计数值为2
发送 .ra 聆听 // 进行检定
发送 .text {$g计数} -> 4 // 仅进行了2次检定,但计数值为4

你期望发生的

$g计数 仅 +1

实际上发生的

$g计数 +2

日志文件

2024-09-09T13:30:22.842+0800 info dice/config.go:2547 自动保存 {"dice": "default"}
本次ServiceAtNew群组数据,保存影响数据库操作数为: 4
2024-09-09T13:30:46.246+0800 info dice/im_session.go:758 收到(UI:1001)的私聊指令: .ra 聆听 {"dice": "default"}
2024-09-09T13:30:46.248+0800 info dice/im_helpers.go:258 发给(帐号UI:1001): 的"聆听"检定结果为: D100=30/20 失败! {"dice": "default"}
本次ServiceAtNew群组数据,保存影响数据库操作数为: 4
2024-09-09T13:30:57.043+0800 info dice/im_session.go:758 收到(UI:1001)的私聊指令: .text {$g计数} {"dice": "default"}
2024-09-09T13:30:57.043+0800 info dice/im_helpers.go:258 发给(帐号UI:1001): 2 {"dice": "default"}
2024-09-09T13:31:00.162+0800 info dice/im_session.go:758 收到(UI:1001)的私聊指令: .ra 聆听 {"dice": "default"}
2024-09-09T13:31:00.164+0800 info dice/im_helpers.go:258 发给(帐号UI:1001): 的"聆听"检定结果为: D100=45/20 失败! {"dice": "default"}
2024-09-09T13:31:03.556+0800 info dice/im_session.go:758 收到(UI:1001)的私聊指令: .text {$g计数} {"dice": "default"}
2024-09-09T13:31:03.557+0800 info dice/im_helpers.go:258 发给(帐号UI:1001): 4 {"dice": "default"}
本次ServiceAtNew群组数据,保存影响数据库操作数为: 4
2024-09-09T13:36:31.559+0800 info dice/im_session.go:758 收到(UI:1001)的私聊指令: .text {$g计数} {"dice": "default"}
2024-09-09T13:36:31.559+0800 info dice/im_helpers.go:258 发给(帐号UI:1001): 4 {"dice": "default"}

截图

image

海豹核心版本

1.5.0-dev
1.4.6+20240810

操作系统

Windows 11

帐号类型

1.5.0-dev 搭载仅搭载一个QQ,出现问题
1.4.6+20240810 内置辅助工具 -> 指令测试,出现问题

使用协议

No response

附加内容

在检定部分没有标注是否可以使用 $tSuccessRank
image

在1.5.0-dev中使用 $tSuccessRank 可以正常工作,计数值每次 +1
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant