File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,6 +235,9 @@ public int AvailableXP
235235 [ NotMapped ]
236236 public int KudosGained { get { return ContributionsByAccountID . Sum ( x => ( int ? ) x . KudosValue ) ?? 0 ; } }
237237
238+ [ NotMapped ]
239+ public int KudosDonated { get { return ContributionsByAccountID . Where ( x => x . ManuallyAddedAccountID == null ) . Sum ( x => ( int ? ) x . KudosValue ) ?? 0 ; } }
240+
238241 [ NotMapped ]
239242 public int KudosSpent { get { return KudosPurchases . Sum ( x => ( int ? ) x . KudosValue ) ?? 0 ; } }
240243
@@ -654,7 +657,7 @@ public List<BadgeType> GetBadges()
654657 var ret = new List < BadgeType > ( ) ;
655658 if ( Level > 200 ) ret . Add ( BadgeType . player_level ) ;
656659 if ( ( GetRating ( RatingCategory . MatchMaking ) . Rank <= 3 || GetRating ( RatingCategory . Casual ) . Rank <= 3 ) ) ret . Add ( BadgeType . player_elo ) ;
657- var total = HasKudos ? KudosGained : 0 ;
660+ var total = HasKudos ? KudosDonated : 0 ;
658661
659662 if ( total >= GlobalConst . KudosForDiamond ) ret . Add ( BadgeType . donator_3 ) ;
660663 else if ( total >= GlobalConst . KudosForGold ) ret . Add ( BadgeType . donator_2 ) ;
You can’t perform that action at this time.
0 commit comments