Пример #1
0
        private static Knight AddKnight()
        {
            var firstVow = new Vow()
            {
                Name = "Vow11", StartDate = new DateTime()
            };
            var secondVow = new Vow()
            {
                Name = "Vow21", StartDate = new DateTime()
            };

            var royalFamily = new RoyalFamily()
            {
                Name = "Hohntzoler2"
            };

            var knight = new Knight()
            {
                Name = "Benn2", RoyalFamily = royalFamily, Vows = new List <KnightVows>()
                {
                    new KnightVows()
                    {
                        Vow = firstVow
                    }, new KnightVows()
                    {
                        Vow = secondVow
                    }
                }
            };

            return(knight);
        }
Пример #2
0
        public override void CheckAbnormality(S_ABNORMALITY_REFRESH p)
        {
            if (!IsViewModelAvailable <MysticLayoutVM>(out var vm))
            {
                return;
            }

            CheckVoc(p);

            if (!Game.IsMe(p.TargetId))
            {
                return;
            }

            if (CritAuraIDs.Contains(p.AbnormalityId))
            {
                vm !.Auras.CritAura = true;
            }
            else if (ManaAuraIDs.Contains(p.AbnormalityId))
            {
                vm !.Auras.ManaAura = true;
            }
            else if (CritResAuraIDs.Contains(p.AbnormalityId))
            {
                vm !.Auras.CritResAura = true;
            }
            else if (SwiftAuraIDs.Contains(p.AbnormalityId))
            {
                vm !.Auras.SwiftAura = true;
            }
            else if (p.AbnormalityId == VowId)
            {
                vm !.Vow.RefreshEffect(p.Duration);
            }
            else if (p.AbnormalityId == TovId)
            {
                vm !.ThrallOfVengeance.RefreshEffect(p.Duration);
            }
            else if (p.AbnormalityId == TowId)
            {
                vm !.ThrallOfWrath.RefreshEffect(p.Duration);
            }
            else if (ElementalizeIDs.Contains(p.AbnormalityId))
            {
                vm !.Elementalize = true;
            }
        }
Пример #3
0
 /// <summary>
 /// 许愿
 /// </summary>
 /// <param name="vow"></param>
 /// <returns></returns>
 public async Task <bool> AddVow(Vow vow)
 {
     return(await _vowRepository.InsertAsync(vow));
 }