fix: 修复战斗模式下的技能和物品使用逻辑
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -61,7 +61,8 @@ func (h Controller) Capture(data *fight.CatchMonsterInboundInfo, c *player.Playe
|
||||
}
|
||||
if c.GetSpace().IsTime {
|
||||
if data.CapsuleId < 300009 {
|
||||
return nil, errorcode.ErrorCodes.ErrCannotPerformAction
|
||||
go c.FightC.UseSkill(c, 0)
|
||||
return nil, -1
|
||||
}
|
||||
}
|
||||
go c.FightC.Capture(c, data.CapsuleId)
|
||||
@@ -84,9 +85,10 @@ func (h Controller) UsePetItemInboundInfo(data *fight.UsePetItemInboundInfo, c *
|
||||
}
|
||||
if c.GetSpace().IsTime {
|
||||
if data.ItemId < 300009 {
|
||||
return nil, errorcode.ErrorCodes.ErrCannotPerformAction
|
||||
go c.FightC.UseSkill(c, 0)
|
||||
}
|
||||
}
|
||||
|
||||
go c.FightC.UseItem(c, data.CatchTime, data.ItemId)
|
||||
return nil, -1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user