コード例 #1
0
        public void AddSynchroCommandsToSoulbreak(Soulbreak soulbreak)
        {
            var Synchros = soulbreakRepository.GetSynchrosByCharacterAndSoulbreak(soulbreak.Info.Character, soulbreak.Info.Name);

            soulbreak.SynchroCommands = new List <SynchroCommand>();

            foreach (var synchro in Synchros)
            {
                var newSynchro = new SynchroCommand();

                newSynchro.Info = synchro;

                newSynchro.SynchroStatuses = statusRepository.GetStatusesByEffectText(synchro.Name, synchro.Effects);
                FilterAttachElementFromStatuses(newSynchro.SynchroStatuses);

                newSynchro.SynchroOthers = new Dictionary <string, List <SheetOthers> >();

                foreach (var status in newSynchro.SynchroStatuses.SelectMany(x => x.Value))
                {
                    statusRepository.GetOthersByNamesAndSource(status.Name, newSynchro.SynchroOthers);
                }

                foreach (var other in newSynchro.SynchroOthers)
                {
                    foreach (var otherStatus in other.Value)
                    {
                        FilterAttachElementFromStatuses(otherStatus.OtherStatuses);
                    }
                }

                soulbreak.SynchroCommands.Add(newSynchro);
            }
        }
コード例 #2
0
        public void AddBraveCommandsToSoulbreak(Soulbreak soulbreak)
        {
            var braves = soulbreakRepository.GetBravesByCharacterAndSoulbreak(soulbreak.Info.Character, soulbreak.Info.Name);

            soulbreak.BraveCommands = new List <BraveCommand>();

            foreach (var brave in braves)
            {
                var newBrave = new BraveCommand();

                newBrave.Info          = brave;
                newBrave.BraveStatuses = statusRepository.GetStatusesByEffectText(brave.Name, brave.Effects);
                FilterAttachElementFromStatuses(newBrave.BraveStatuses);
                newBrave.BraveOthers = new Dictionary <string, List <SheetOthers> >();

                foreach (var status in newBrave.BraveStatuses.SelectMany(x => x.Value))
                {
                    statusRepository.GetOthersByNamesAndSource(status.Name, newBrave.BraveOthers);
                }

                foreach (var other in newBrave.BraveOthers)
                {
                    foreach (var otherStatus in other.Value)
                    {
                        FilterAttachElementFromStatuses(otherStatus.OtherStatuses);
                    }
                }

                soulbreak.BraveCommands.Add(newBrave);
            }
        }
コード例 #3
0
        public List <Soulbreak> BuildSoulbreakInfoFromCharNameAndTier(string tier, string character, int?index = null)
        {
            var soulbreaksFromDb = soulbreakRepository.GetSoulbreaksByCharacterName(tier, character, index);
            var newSoulbreaks    = new List <Soulbreak>();

            foreach (var soulbreak in soulbreaksFromDb)
            {
                var newSoulbreak = new Soulbreak();
                newSoulbreak.SoulbreakStatuses = statusRepository.GetStatusesByEffectText(soulbreak.Name, soulbreak.Effects);
                FilterAttachElementFromStatuses(newSoulbreak.SoulbreakStatuses);
                newSoulbreak.SoulbreakOthers = new Dictionary <string, List <SheetOthers> >();

                foreach (var status in newSoulbreak.SoulbreakStatuses.SelectMany(x => x.Value))
                {
                    statusRepository.GetOthersByNamesAndSource(status.Name, newSoulbreak.SoulbreakOthers);
                }

                newSoulbreak.Info = soulbreak;


                foreach (var other in newSoulbreak.SoulbreakOthers)
                {
                    foreach (var otherStatus in other.Value)
                    {
                        FilterAttachElementFromStatuses(otherStatus.OtherStatuses);
                    }
                }

                AddSynchroCommandsToSoulbreak(newSoulbreak);
                AddBurstCommandsToSoulbreak(newSoulbreak);
                AddBraveCommandsToSoulbreak(newSoulbreak);

                newSoulbreaks.Add(newSoulbreak);
            }
            ;

            return(newSoulbreaks);
        }