Load ordinary achievements and send transactional gameplay progress notifications. Restore main-story clears and recorded gacha history without duplicate credit. Validate claim thresholds and prior tiers, credit wallet rewards and persist achievement experience in login responses.
17 lines
559 B
Go
17 lines
559 B
Go
package player
|
|
|
|
// GachaGrantSummary is a read-only projection of real durable purchase grants.
|
|
// It deliberately excludes grants without a schedule group; ordinary quest
|
|
// rewards also use ViewCostumeIDs and must not be counted as gacha draws.
|
|
func (s *CollectionStore) GachaGrantSummary() map[string]uint64 {
|
|
s.mu.Lock()
|
|
defer s.mu.Unlock()
|
|
out := map[string]uint64{}
|
|
for identity, grant := range s.data.Grants {
|
|
if grant.GachaGroupID != 0 && len(grant.ViewCostumeIDs) > 0 {
|
|
out[identity] = uint64(len(grant.ViewCostumeIDs))
|
|
}
|
|
}
|
|
return out
|
|
}
|