feat(fight): 添加技能实体空值检查 为Effect93的Skill_Use方法添加空值检查,当技能实体为空时直接返回true, 避免潜在的空指针引用错误 ```
This commit is contained in:
@@ -20,6 +20,9 @@ type Effect93 struct {
|
||||
}
|
||||
|
||||
func (e *Effect93) Skill_Use() bool {
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
|
||||
// 概率判定
|
||||
ok, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
|
||||
|
||||
Reference in New Issue
Block a user