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

功能改进 #5

Open
7 of 8 tasks
monsterxcn opened this issue Oct 22, 2022 · 8 comments
Open
7 of 8 tasks

功能改进 #5

monsterxcn opened this issue Oct 22, 2022 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@monsterxcn
Copy link
Owner

monsterxcn commented Oct 22, 2022

  • 抽卡记录导入 完成于 4604c89
  • 限定五星标记 完成于 e9afaf9
  • 限定五星花费分析 完成于 e9afaf9
  • 卡池运势标记 完成于 6ace13e
  • 出货之最分析 完成于 e9afaf9
  • 物品图片绘制
  • 抽卡成就 完成于 0f27711
  • 适配 UIGF v2.3 完成于 68ca1d2

* 欢迎在此 issue 下方提出功能改进建议,尽可能实现,感谢喵💕

@monsterxcn monsterxcn added the enhancement New feature or request label Oct 22, 2022
@monsterxcn monsterxcn self-assigned this Oct 22, 2022
@monsterxcn monsterxcn pinned this issue Oct 22, 2022
@monsterxcn
Copy link
Owner Author

限定五星相关处理需要卡池信息,采用由 @DGP-Studio 提供的文件:

https://github.com/DGP-Studio/Snap.Metadata/blob/main/Output/GachaEvent.json

@liuzj288

This comment was marked as resolved.

@monsterxcn

This comment was marked as resolved.

@monsterxcn
Copy link
Owner Author

@liuzj288

This comment was marked as duplicate.

@monsterxcn

This comment was marked as duplicate.

@monsterxcn
Copy link
Owner Author

monsterxcn commented Jan 5, 2023

抽卡记录导入采用如下设计:

  1. 支持两种 JSON 数据格式导入:

    • 内部格式:导入前发送本地记录给用户留作备份;接收到此文件时强制恢复本地记录
    • UIGF v2.2 格式:插件导出本地记录时使用的 JSON 格式;接收到此文件时尝试合并到本地记录
  2. 普通用户和超级用户具有不同权限:

    • 普通用户:如果有本地记录,导入的记录 UID 必须与本地相同,不同则阻止导入;如果没有本地记录则正常执行恢复或合并(新增)
    • 超级用户:如果导入的记录 UID 与本地相同,则正常为超级用户执行恢复或合并;如果导入的记录 UID 与本地不同,则先查找在 Bot 上是否有某用户本地记录与导入的记录 UID 相同,存在则为该用户执行恢复或合并,不存在则阻止导入;如果没有本地记录则正常为超级用户执行恢复或合并(新增)
  3. 记录合并的基本原则:

    • 所有非官方生成的记录数据的 "id" 均不被信任(表现为 "1000" 开头)
    • 一份文件中由记录数据的 "id" 确定的抽卡记录的相对顺序被信任
    • 导入记录与本地记录在某时刻只会对应唯一确定的单抽(1 条数据)或十连(10 条数据)
    • 一次十连中的 10 条数据在合并时当作一个整体,不改变其相对顺序

更新:部分真实数据表明,单次十连的 10 条数据有小概率会对应连续的两秒。

因此,上述假设的记录合并基本原则第 3 条应为:导入记录与本地记录在某时刻一般情况下对应唯一确定的单抽(1 条数据)或十连(10 条数据),某时刻对应的数据条数既非 1 也非 10 时,应当与紧邻的前一秒或后一秒对应数据组成一次十连。

@monsterxcn monsterxcn unpinned this issue Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants