Files
bd2/go/internal/server/world/cash_packages.go
T
Flechazo d8771caef2 feat(all): add hunting and events, commerce and rewards, binary calendars, GameData caching and login diagnostics
Implement hunting AP and progress, event tasks, exchanges, games, stories and actions; connect battle and reward handling.

Add CashShop plugin and installation, server purchases and entitlements, recharge rules and plugin version metadata.

Distribute binary calendars independently; cache GameData in memory and fix single-connection query deadlocks.

Improve automatic login and recovery diagnostics; document configuration and release flows.
2026-10-05 11:50:31 +08:00

20 lines
551 B
Go

package world
// CashPackagePackCleared verifies the complete main quest chain at the
// requested difficulty using persisted server progress.
func (s *Service) CashPackagePackCleared(packID, difficulty uint64) bool {
if s.storyCatalog == nil || difficulty > 2 || packID == 0 {
return false
}
pack, ok := s.storyCatalog.Packs[int(packID)]
if !ok || len(pack.MainQuestIDs) == 0 {
return false
}
for _, quest := range pack.MainQuestIDs {
if !s.state.QuestCleared(quest, int(packID), int(difficulty)) {
return false
}
}
return true
}