fix原神日历角色天赋显示

This commit is contained in:
Aluxes 2024-01-28 02:13:15 +08:00
parent 3cf75563a1
commit 4353e615c3

View File

@ -50,7 +50,7 @@ class Material extends Base {
return false return false
} }
static forEach (type = 'all', fn, filter = false) { static forEach (type = 'all', fn, filter = false, game = 'gs') {
if (!lodash.isFunction(filter)) { if (!lodash.isFunction(filter)) {
filter = () => true filter = () => true
} }
@ -58,7 +58,7 @@ class Material extends Base {
if (type !== 'all' && type !== ds.type) { if (type !== 'all' && type !== ds.type) {
return true return true
} }
let obj = new Material(name) let obj = Material.get(name, game)
if (filter(obj)) { if (filter(obj)) {
return fn(obj) !== false return fn(obj) !== false
} }