fix(logic/service/fight/boss): 修复 NewSeIdx_32 技能逻辑判断条件
增加对技能实体的多个判空和属性检查,确保在技能实体为 nil、类型为状态类技能、 攻击时间为 0 或不作用于敌方时,直接返回 true,避免后续逻辑异常。
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user