This commit is contained in:
@@ -21,7 +21,7 @@ func (h Controller) OnReadyToFight(data *fight.ReadyToFightInboundInfo, c *playe
|
||||
if err := h.checkFightStatus(c); err != 0 {
|
||||
return nil, err
|
||||
}
|
||||
c.FightC.ReadyFight(c)
|
||||
go c.FightC.ReadyFight(c)
|
||||
return nil, -1
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ func (h Controller) UseSkill(data *fight.UseSkillInInfo, c *player.Player) (resu
|
||||
if err := h.checkFightStatus(c); err != 0 {
|
||||
return nil, err
|
||||
}
|
||||
c.FightC.UseSkill(c, data.SkillId)
|
||||
go c.FightC.UseSkill(c, data.SkillId)
|
||||
return nil, 0
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ func (h Controller) Escape(data *fight.EscapeFightInboundInfo, c *player.Player)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
c.FightC.Over(c, info.BattleOverReason.PlayerEscape)
|
||||
go c.FightC.Over(c, info.BattleOverReason.PlayerEscape)
|
||||
return nil, 0
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ func (h Controller) ChangePet(data *fight.ChangePetInboundInfo, c *player.Player
|
||||
if err := h.checkFightStatus(c); err != 0 {
|
||||
return nil, err
|
||||
}
|
||||
c.FightC.ChangePet(c, data.CatchTime)
|
||||
go c.FightC.ChangePet(c, data.CatchTime)
|
||||
return nil, -1
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ func (h Controller) Capture(data *fight.CatchMonsterInboundInfo, c *player.Playe
|
||||
return nil, errorcode.ErrorCodes.ErrCannotPerformAction
|
||||
}
|
||||
}
|
||||
c.FightC.Capture(c, data.CapsuleId)
|
||||
go c.FightC.Capture(c, data.CapsuleId)
|
||||
return nil, -1
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ func (h Controller) LoadPercent(data *fight.LoadPercentInboundInfo, c *player.Pl
|
||||
if c.FightC == nil {
|
||||
return nil, -1
|
||||
}
|
||||
c.FightC.LoadPercent(c, int32(data.Percent))
|
||||
go c.FightC.LoadPercent(c, int32(data.Percent))
|
||||
return nil, -1
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ func (h Controller) UsePetItemInboundInfo(data *fight.UsePetItemInboundInfo, c *
|
||||
return nil, errorcode.ErrorCodes.ErrCannotPerformAction
|
||||
}
|
||||
}
|
||||
c.FightC.UseItem(c, data.CatchTime, data.ItemId)
|
||||
go c.FightC.UseItem(c, data.CatchTime, data.ItemId)
|
||||
return nil, -1
|
||||
}
|
||||
|
||||
@@ -95,6 +95,6 @@ func (h Controller) FightChat(data *fight.ChatInfo, c *player.Player) (result *f
|
||||
if err := h.checkFightStatus(c); err != 0 {
|
||||
return nil, err
|
||||
}
|
||||
c.FightC.Chat(c, data.Message)
|
||||
go c.FightC.Chat(c, data.Message)
|
||||
return nil, -1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user