From 9ebe4173a5979e88028baf78f815c459ee214acd Mon Sep 17 00:00:00 2001 From: 1 <1@72wo.cn> Date: Sun, 21 Sep 2025 17:17:12 +0000 Subject: [PATCH] =?UTF-8?q?refactor(fight):=20=E4=BC=98=E5=8C=96=E6=88=98?= =?UTF-8?q?=E6=96=97=E8=83=9C=E5=88=A9=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E7=A7=BB=E9=99=A4=E5=86=97=E4=BD=99=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=B9=B6=E4=BF=AE=E6=AD=A3=E6=97=A5=E5=BF=97=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logic/service/fight/fightc.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/logic/service/fight/fightc.go b/logic/service/fight/fightc.go index 6cf7cf81..a9255daa 100644 --- a/logic/service/fight/fightc.go +++ b/logic/service/fight/fightc.go @@ -181,8 +181,6 @@ func (b *FightC) IsWin(c *input.Input, cache uint32) bool { if c.Player.GetInfo().UserID == b.ownerID { //如果是房主 bbb = b.Opp.AllPet - } else { - bbb = b.Our.AllPet } for _, v := range bbb { @@ -205,7 +203,6 @@ func (b *FightC) IsWin(c *input.Input, cache uint32) bool { func (f *FightC) Broadcast(t func(ff *input.Input)) { t(f.Our) - t(f.Opp) } @@ -275,7 +272,7 @@ func (f *FightC) battleLoop() { } actions[uint32(action.GetPlayerID())] = action - fmt.Println("玩家%d 执行动作", action.GetPlayerID()) + fmt.Println("玩家%i 执行动作", action.GetPlayerID()) case <-timeout: @@ -342,6 +339,8 @@ func (f *FightC) battleLoop() { WinnerId: f.ownerID, }) f.closefight = true + } else { + tt.CatchPetInfo(info.CatchMonsterOutboundInfo{}) } } else { //说明不是可以捕捉的