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.
19 lines
460 B
Go
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)
|
|
}
|