DGP-Studio / Snap.Hutao

实用的开源多功能原神工具箱 🧰 / Multifunctional Open-source Genshin Impact Toolkit 🧰
https://hut.ao
MIT License
4.11k stars 192 forks source link

[Feat]: 通过米游社新版养成计算器接口获取玩家背包材料信息 #1664

Closed YifePlayte closed 6 months ago

YifePlayte commented 6 months ago

背景与动机

最近米游社更新了新版养成计算器,其支持根据玩家实际游戏内背包材料数量显示“还需”多少材料,而经过抓包发现实际上其接口(被抓包接口url:https://api-takumi.mihoyo.com/event/e20200928calculate/v3/batch_compute )返回的json数据类似这样: Screenshot_2024-05-30-02-08-12-378_com guoshi httpcanary-edit 可以根据overall_consume下的各个材料的num(本次请求计算得到的所需总数)和lack_num(本次请求计算得到的“还需”数,若所需材料溢出则值为负数)求得玩家背包内对应材料的实际数量为num - lack_num。

想要实现或优化的功能

根据以上发现,可以优化“养成计划-背包物品”功能,通过借用此接口获得玩家背包内材料数量,避免手动输入

Lightczx commented 6 months ago

1651

github-actions[bot] commented 5 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topic.