Skip to content

Commit

Permalink
鼠鼠我啊再也不会重复出现了
Browse files Browse the repository at this point in the history
  • Loading branch information
singer233 committed Jul 24, 2024
1 parent ae07bea commit aa00d16
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/utils/arknights_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,13 @@ func GetOperatorByName(name string) Operator {
func GetOperatorsByName(name string) []Operator {
updateData()
var operatorList []Operator
var set = make(map[int]bool)
for _, op := range operatorTree.Search(strings.ToLower(name)) {
operatorList = append(operatorList, operators[op])
_, contain := set[op]
if !contain {
set[op] = true
operatorList = append(operatorList, operators[op])
}
}
return operatorList
}
Expand Down

0 comments on commit aa00d16

Please sign in to comment.