Files
bd2/go/internal/server/player/achievement_projection.go
T
Flechazo aec053f7d2 fix(server): restore achievements, progress, claims and experience
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.
2026-10-04 19:54:26 +08:00

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
}