mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
新增莱特伤害计算等
This commit is contained in:
parent
cecc33b24d
commit
85d368619f
7 changed files with 123 additions and 19 deletions
|
|
@ -222,13 +222,6 @@ export class BuffManager {
|
|||
return buffs
|
||||
}
|
||||
|
||||
/**
|
||||
* 遍历buff列表
|
||||
*/
|
||||
forEach(fnc: (buff: buff, index: number) => void) {
|
||||
return this.buffs.forEach(fnc)
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据单个指定属性筛选buff,不作进一步判断
|
||||
*/
|
||||
|
|
@ -253,6 +246,16 @@ export class BuffManager {
|
|||
return this._filter(this.buffs, param, valueOcalc)
|
||||
}
|
||||
|
||||
/** 遍历buff列表 */
|
||||
forEach(fnc: (buff: buff, index: number) => void) {
|
||||
return this.buffs.forEach(fnc)
|
||||
}
|
||||
|
||||
/** 查找指定buff */
|
||||
find<T extends keyof buff>(type: T, value: buff[T]) {
|
||||
return this.buffs.find(buff => buff[type] === value)
|
||||
}
|
||||
|
||||
operator<T extends keyof buff>(type: T, value: buff[T], fnc: (buff: buff) => void) {
|
||||
this.forEach(buff => {
|
||||
if (buff[type] === value) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue