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

@@ -28,6 +28,7 @@ const (
queueTTL = 12 * time.Second
banPickTimeout = 45 * time.Second
banPickStartCmd = 2461
battleLevelCap = 100
)
type localQueueTicket struct {
@@ -665,7 +666,11 @@ func resolveBattlePets(catchTimes []uint32, limit int) []model.PetInfo {
if pet == nil || pet.Data.ID == 0 {
continue
}
result = append(result, pet.Data)
petInfo := pet.Data
if petInfo.Level > battleLevelCap {
petInfo.Level = battleLevelCap
}
result = append(result, petInfo)
}
return result
}