diff --git a/logic/service/fightc.go b/logic/service/fightc.go index 0856ea57..4235ec57 100644 --- a/logic/service/fightc.go +++ b/logic/service/fightc.go @@ -91,20 +91,21 @@ func (f *FightC) ReadyFight(c PlayerI) { case 1: // 1v1 if c == f.Our { f.AFinished = true - f.OurCurrentPet = info.CreateBattlePetEntity(f.Info.OurPetList[0]) + if f.BFinished { rrsult() } } else { f.Opp = c + f.OppCurrentPet = info.CreateBattlePetEntity(f.Info.OpponentPetList[0]) f.BFinished = true if f.AFinished { rrsult() } } case 3: // 野怪战斗 - + f.OppCurrentPet = info.CreateBattlePetEntity(f.Info.OpponentPetList[0]) //判断捕捉率大于0 if gconv.Int(xmlres.PetMAP[int(f.Info.OpponentPetList[0].ID)].CatchRate) > 0 { rett.Info2.Catchable = 1 @@ -129,7 +130,7 @@ func (f *FightC) NewFight(i *info.NoteReadyToFightInfo, plays PlayerI) { f.Info = i f.StartTime = time.Now() f.actionChan = make(chan info.BattleActionI, 2) // 初始化全局操作通道 - + f.OurCurrentPet = info.CreateBattlePetEntity(f.Info.OurPetList[0]) switch i.FightId { case 1: // 1v1,等双方进入