public void SetStatisticsInfo(NodeAddedEvent e, ProfileSummarySectionUINode sectionUI, ProfileScreenWithUserGroupNode profileScreen, [JoinByUser] UserStatisticsNode statistics) { Dictionary <string, long> dictionary = statistics.userStatistics.Statistics; long parameterValue = StatsTool.GetParameterValue <string>(dictionary, "VICTORIES"); sectionUI.profileSummarySectionUI.SetWinLossStatistics(parameterValue, StatsTool.GetParameterValue <string>(dictionary, "DEFEATS"), StatsTool.GetParameterValue <string>(dictionary, "ALL_BATTLES_PARTICIPATED") - StatsTool.GetParameterValue <string>(dictionary, "ALL_CUSTOM_BATTLES_PARTICIPATED")); }
public void SetEquipmentStatisticsInfo(NodeAddedEvent e, SingleNode <MostPlayedEquipmentUIComponent> ui, ProfileScreenWithUserGroupNode profileScreen, [JoinByUser] UserStatisticsNode statistics, [JoinAll] SingleNode <SelectedPresetComponent> selectedPreset) { Dictionary <long, long> hullStatistics = statistics.favoriteEquipmentStatistics.HullStatistics; Dictionary <long, long> turretStatistics = statistics.favoriteEquipmentStatistics.TurretStatistics; if (!hullStatistics.Any <KeyValuePair <long, long> >() && !turretStatistics.Any <KeyValuePair <long, long> >()) { ui.component.SwitchState(false); } else { ui.component.SwitchState(true); Entity entityById = base.GetEntityById(StatsTool.GetItemWithLagestValue(hullStatistics)); Entity entity2 = base.GetEntityById(StatsTool.GetItemWithLagestValue(turretStatistics)); string turretUID = entity2.GetComponent <MarketItemGroupComponent>().Key.ToString(); ui.component.SetMostPlayed(turretUID, entity2.GetComponent <DescriptionItemComponent>().Name, entityById.GetComponent <MarketItemGroupComponent>().Key.ToString(), entityById.GetComponent <DescriptionItemComponent>().Name); } }
public void GetUserTotalBattlesCount(GetChangeTurretTutorialValidationDataEvent e, Node any, [JoinAll] SingleNode <SelfUserComponent> selfUser, [JoinByUser] UserStatisticsNode statistics) { Dictionary <string, long> dictionary = statistics.userStatistics.Statistics; e.BattlesCount = StatsTool.GetParameterValue <string>(dictionary, "ALL_BATTLES_PARTICIPATED") - StatsTool.GetParameterValue <string>(dictionary, "ALL_CUSTOM_BATTLES_PARTICIPATED"); }