Files
bd2/go/internal/server/world/mission_unlock.go
T
Flechazo 5b5a219dc2 feat(server): add special loot and data-driven gameplay rules
Generate equipment loot atomically, grant random boxes and prevent repeat claims.
Read gacha pools, pity, products, tickets, missions, presets, chapter rewards
and inventory costs from GameData; extend both collaboration UR ticket pools.
Sync owned recipes, configure startup state and calendars in versioned seeds,
and validate unlock tickets and revival talents.
2026-10-04 19:15:59 +08:00

19 lines
460 B
Go

package world
import "math"
// MissionsUnlocked uses the same pack authorization as map entry. A quest
// condition requires a committed normal-difficulty clear in that pack.
func (s *Service) MissionsUnlocked(pack, quest uint64) bool {
if pack == 0 {
return quest == 0
}
if pack > math.MaxInt32 || quest > math.MaxInt32 {
return false
}
if quest == 0 {
return s.packUnlocked(int(pack))
}
return s.state.QuestCleared(int(quest), int(pack), 0)
}