```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

refactor(fight): 重构精灵特效类型枚举结构
This commit is contained in:
昔念
2026-03-27 00:28:25 +08:00
parent a3740d417d
commit ed84e4d2df
2 changed files with 23 additions and 14 deletions

View File

@@ -389,11 +389,22 @@ func (pet *PetInfo) RnadEffect() {
}
}
// 1是特性特质<!-- Stat: 精灵特效Stat: 0: 无效(默认值), 1: 永久, 2: 有`有效次数'的特效 3: 爆发特效 4: 异能精灵特质5特训6魂印-->
// 0: Boss特性
// 1: 特性
// 2: 能量珠
// 3: 爆发特效
// 4: 异能精灵特质
// 5: 特训
// 6: 魂印
// 7 :繁殖加成
// 8 :体力提升加成
// 繁殖加成,体力提升加成 ,这里是防止和其他重复所以定义不同类别,但是实际上,能量珠那些事调用不同id的effect实现
// <!-- Stat: 精灵特效Stat: 0: 无效(默认值), 1: 永久, 2: 有`有效次数'的特效 3: 爆发特效 4: 异能精灵特质5特训6魂印-->
func (pet *PetInfo) GetEffect(ptype int) (int, *PetEffectInfo, bool) {
return utils.FindWithIndex(pet.EffectInfo, func(item PetEffectInfo) bool {
return gconv.Int(xmlres.EffectMAP[int(item.Idx)].Stat) == 1
return item.Status == 1
})
}