diff --git a/logic/controller/fight_base.go b/logic/controller/fight_base.go index 9846e1fb2..25d74e046 100644 --- a/logic/controller/fight_base.go +++ b/logic/controller/fight_base.go @@ -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 } diff --git a/logic/service/fight/action.go b/logic/service/fight/action.go index 920155583..9b6d2d2af 100644 --- a/logic/service/fight/action.go +++ b/logic/service/fight/action.go @@ -151,7 +151,11 @@ func (f *FightC) UseItem(c common.PlayerI, cacthid, itemid uint32) { return } - + +if f.Info.Mode== info.BattleMode.PET_MELEE { + go f.UseSkill(c, 0) + return +} select { case f.actionChan <- &action.UseItemAction{BaseAction: action.NewBaseAction(c.GetInfo().UserID), ItemID: itemid, CacthTime: cacthid}: // 发送成功,可选记录日志 diff --git a/logic/service/fight/fightc.go b/logic/service/fight/fightc.go index 9a953dac5..816a0d562 100644 --- a/logic/service/fight/fightc.go +++ b/logic/service/fight/fightc.go @@ -330,12 +330,12 @@ func (f *FightC) enterturn(firstAttack, secondAttack *action.SelectSkillAction) }) f.Switch = make(map[uint32]*action.ActiveSwitchAction) if f.closefight && f.Info.Mode == info.BattleMode.PET_MELEE { - f.Broadcast(func(fighter *input.Input) { - if fighter.UserID != f.WinnerId { - fighter.Player.SendPackCmd(2505, &attackValueResult) - } + // f.Broadcast(func(fighter *input.Input) { + // if fighter.UserID != f.WinnerId { + // fighter.Player.SendPackCmd(2505, &attackValueResult) + // } - }) + // }) return } f.Broadcast(func(fighter *input.Input) {