feat: 添加地图节点匹配和战斗等级上限

This commit is contained in:
xinian
2026-04-06 05:24:14 +08:00
committed by cnb
parent a905954b5c
commit 5a44154d30
4 changed files with 35 additions and 4 deletions

View File

@@ -27,7 +27,10 @@ func (Controller) PlayerFightBoss(req *ChallengeBossInboundInfo, p *player.Playe
return nil, err
}
mapNode := service.NewMapNodeService().GetDataNode(p.Info.MapID, req.BossId)
mapNode := p.GetSpace().GetMatchedMapNode(req.BossId)
if mapNode == nil {
return nil, errorcode.ErrorCodes.ErrPokemonNotExists
}
bossConfigs, err := loadMapBossConfigs(mapNode)
if err != 0 {
return nil, err

View File

@@ -55,7 +55,7 @@ func (h Controller) OnPlayerHandleFightInvite(data *HandleFightInviteInboundInfo
return
}
_, err = fight.NewFight(v, c, v.GetInfo().PetList, c.GetInfo().PetList, func(foi model.FightOverInfo) {
_, err = fight.NewFight(v, c, v.GetPetInfo(100), c.GetPetInfo(100), func(foi model.FightOverInfo) {
//println("好友对战测试", foi.Reason)