fix(logic/service/fight/boss): 修复 NewSeIdx_32 技能逻辑判断条件

增加对技能实体的多个判空和属性检查,确保在技能实体为 nil、类型为状态类技能、
攻击时间为 0 或不作用于敌方时,直接返回 true,避免后续逻辑异常。
This commit is contained in:
2025-12-22 18:41:39 +08:00
parent f9d7f0ea68
commit 8505bfd4e3

View File

@@ -17,7 +17,18 @@ func (e *NewSel32) OnSkill() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if e.Ctx().SkillEntity.AttackTime == 0 {
return true
}
if !e.Ctx().SkillEntity.Side {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].Div(alpacadecimal.NewFromInt(10)).IntPart()), 100)
if !success {
return true