fix: 修复Effect初始化空指针问题
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
xinian
2026-03-08 17:48:34 +08:00
committed by cnb
parent 3b1aa450df
commit c154302af4
2 changed files with 7 additions and 4 deletions

View File

@@ -70,7 +70,7 @@ func (our *Input) SortPet() {
for _, s := range our.AllPet {
if s.Info.Hp > 0 {
for _, e1 := range s.Info.EffectInfo {
t := our.InitEffect(EffectType.NewSel, int(e1.EID))
t := our.InitEffect(EffectType.NewSel, int(e1.EID), e1.Args...)
if t != nil {
ef := t.ID()
if cool.Config.ServerInfo.IsDebug != 0 {
@@ -82,7 +82,7 @@ func (our *Input) SortPet() {
t.ID(ef)
t.Duration(-1)
t.SetArgs(our, e1.Args...) //设置入参,施加方永远是我方
our.AddEffect(our, t)
}