Skip to content

Commit

Permalink
only count balanced custom matches for elo (#2418)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeinFreund authored Oct 12, 2018
1 parent acae3cf commit b50fb0e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ZkData/Ef/WHR/RatingSystems.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,11 @@ private static void FillApplicableRatings(SpringBattle battle, SpringBattleConte
battle.ApplicableRatings = 0;
if (battle.HasBots) return;
if (battle.IsMission) return;
if (battle.SpringBattlePlayers?.Select(x => x.AllyNumber).Distinct().Count() < 2) return;
if (battle.SpringBattlePlayers?.Where(x => !x.IsSpectator).Select(x => x.AllyNumber).Distinct().Count() < 2) return;
if (battle.ResourceByMapResourceID?.MapIsSpecial == true) return;

//only count balanced custom matches for elo
if (battle.Mode == AutohostMode.None && battle.SpringBattlePlayers?.Where(x => !x.IsSpectator).GroupBy(x => x.AllyNumber).Select(x => x.Count()).Distinct().Count() > 1) return;
if (battle.Duration < GlobalConst.MinDurationForElo) return;
battle.ApplicableRatings |= (RatingCategoryFlags)result.LobbyStartContext.ApplicableRating;
//battle.ApplicableRatings |= RatingCategoryFlags.Casual;
Expand Down

0 comments on commit b50fb0e

Please sign in to comment.