fix(fight): 修复空变更提交问题

This commit is contained in:
1
2025-11-11 08:28:18 +00:00
parent 5548fb3d02
commit d94cda883a

View File

@@ -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) {