private TextObject ToNotificationString(
     MultiplayerGameNotificationsComponent.MultiplayerNotificationEnum value,
     NotificationProperty attribute,
     params int[] parameters)
 {
     if (parameters.Length != 0)
     {
         this.SetGameTextVariables(value, parameters);
     }
     return(GameTexts.FindText(attribute.StringId));
 }
        private void ShowNotification(
            MultiplayerGameNotificationsComponent.MultiplayerNotificationEnum notification,
            params int[] parameters)
        {
            if (GameNetwork.IsDedicatedServer)
            {
                return;
            }
            NotificationProperty attribute = (NotificationProperty)((IEnumerable <object>)notification.GetType().GetField(notification.ToString()).GetCustomAttributes(typeof(NotificationProperty), false)).Single <object>();

            if (attribute == null)
            {
                return;
            }
            int[] array = ((IEnumerable <int>)parameters).Where <int>((Func <int, bool>)(x => x != -1)).ToArray <int>();
            InformationManager.AddQuickInformation(this.ToNotificationString(notification, attribute, array), soundEventPath: this.ToSoundString(notification, attribute, array));
        }
        private string ToSoundString(
            MultiplayerGameNotificationsComponent.MultiplayerNotificationEnum value,
            NotificationProperty attribute,
            params int[] parameters)
        {
            string str = string.Empty;

            if (attribute.SoundIdTwo.IsStringNoneOrEmpty())
            {
                str = attribute.SoundIdOne;
            }
            else
            {
                switch (value)
                {
                case MultiplayerGameNotificationsComponent.MultiplayerNotificationEnum.BattleYouHaveXTheRound:
                    Team team1 = parameters[0] == 0 ? Mission.Current.AttackerTeam : Mission.Current.DefenderTeam;
                    Team team2 = GameNetwork.IsMyPeerReady ? GameNetwork.MyPeer.GetComponent <MissionPeer>().Team : (Team)null;
                    str = attribute.SoundIdOne;
                    if (team2 != null && team2 != team1)
                    {
                        str = attribute.SoundIdTwo;
                        break;
                    }
                    break;

                case MultiplayerGameNotificationsComponent.MultiplayerNotificationEnum.FlagXCapturedByYourTeam:
                    str = attribute.SoundIdOne;
                    break;

                case MultiplayerGameNotificationsComponent.MultiplayerNotificationEnum.FlagXCapturedByOtherTeam:
                    str = attribute.SoundIdTwo;
                    break;
                }
            }
            return(str);
        }