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.
20 lines
551 B
Go
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
|
|
}
|