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

新增get.nameList()判断武将是否是某个ID或返回武将的所有id #1539

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

tangXins
Copy link
Contributor

@tangXins tangXins commented Jul 1, 2024

PR受影响的平台

所有平台

诱因和背景

很多时候需要检查武将的id是否是某个id,但是需要检查name,name1,name2,使用一个函数直接进一步到位。

PR描述

传入两个参数,分别是Player和字符串武将id,返回{Array|boolean},如果未指定特定字符串,则返回玩家id列表Array,如果未指定Player,则返回空数组。

PR测试

console.log(获取.nameList(game.me))

扩展适配

无需适配

检查清单

  • 我已经进行了充足的测试,且现有的测试都已通过
  • 如果此次PR中添加了新的武将/新的语音文件,则我已在character/rank.js中添加对应的武将强度评级/在lib.translate中加入语音文件的文字台词
  • 如果此次PR涉及到新功能的添加,我已在PR描述中写入详细文档
  • 如果此次PR需要扩展跟进,我已在扩展适配中写入详细文档
  • 如果这个PR解决了一个issue,我在诱因和背景中明确链接到该issue
  • 我保证该PR中没有随意修改换行符等内容,没有制造出大量的Diff
  • 我保证该PR遵循项目中.editorconfigeslint.config.mjsprettier.config.mjs所规定的代码样式,并且已经通过prettier格式化过代码

很多时候需要检查武将的id是否是某个id,但是需要检查name,name1,name2,使用一个函数直接进一步到位。
@Spmario233 Spmario233 merged commit 742db3d into libccy:PR-Branch Jul 1, 2024
@Spmario233 Spmario233 mentioned this pull request Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants