From d94cda883a2ae62f7b315a4855df48f9c913c946 Mon Sep 17 00:00:00 2001 From: 1 <1@72wo.cn> Date: Tue, 11 Nov 2025 08:28:18 +0000 Subject: [PATCH] =?UTF-8?q?fix(fight):=20=E4=BF=AE=E5=A4=8D=E7=A9=BA?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E6=8F=90=E4=BA=A4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logic/service/fight/action.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/logic/service/fight/action.go b/logic/service/fight/action.go index eff710e4..3867afe4 100644 --- a/logic/service/fight/action.go +++ b/logic/service/fight/action.go @@ -88,7 +88,12 @@ func (f *FightC) UseSkill(c common.PlayerI, id int32) { ret := &action.SelectSkillAction{ BaseAction: action.NewBaseAction(c.GetInfo().UserID), } - + if f.GetInputByPlayer(c, false).CurrentPet == nil { + return + } + if f.GetInputByPlayer(c, false).CurrentPet.Info.Hp <= 0 { + return + } for _, v := range f.GetInputByPlayer(c, false).CurrentPet.Skills { if v != nil && v.ID == int(id) {