refactor: 重构战斗初始化传递宠物列表
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-22 23:41:51 +08:00
committed by cnb
parent 61b0d6093f
commit 4fb5653c28
9 changed files with 65 additions and 68 deletions

View File

@@ -99,7 +99,7 @@ func (Controller) PlayerFightBoss(data1 *fight.ChallengeBossInboundInfo, p *play
ai.Prop[0] = 2
var fighc *fight.FightC
fighc, _ = fight.NewFight(p, ai, func(foi model.FightOverInfo) {
fighc, _ = fight.NewFight(p, ai, p.GetPetInfo(100), ai.GetPetInfo(0), func(foi model.FightOverInfo) {
if mdata.WinBonusID != 0 {
if len(bosinfo[0].Rule) == 0 {
if foi.Reason == 0 && foi.WinnerId == p.Info.UserID {
@@ -177,7 +177,7 @@ func (Controller) OnPlayerFightNpcMonster(data1 *fight.FightNpcMonsterInboundInf
p.Fightinfo.Status = info.BattleMode.FIGHT_WITH_NPC //打野怪
p.Fightinfo.Mode = info.BattleMode.MULTI_MODE //多人模式
fight.NewFight(p, ai, func(foi model.FightOverInfo) {
fight.NewFight(p, ai, p.GetPetInfo(100), ai.GetPetInfo(0), func(foi model.FightOverInfo) {
//p.Done.Exec(model.MilestoneMode.Moster, []uint32{p.Info.MapID, monsterInfo.PetList[0].ID, uint32(foi.Reason)}, nil)
if foi.Reason == 0 && foi.WinnerId == p.Info.UserID && p.CanGet() {